From 431823cc2d16160926f63bc65b277ff528e053f9 Mon Sep 17 00:00:00 2001 From: jain-raunak Date: Fri, 28 Jun 2024 11:16:58 +0530 Subject: [PATCH 1/4] updated sdk --- .DS_Store | Bin 0 -> 6148 bytes README.md | 169 +- api/swagger.yaml | 3821 +++++++++++++++-- docs/AbTestCampaignResult.md | 4 +- docs/AccountApi.md | 4 +- docs/Body.md | 5 +- docs/Body1.md | 5 +- docs/Body10.md | 8 +- docs/Body11.md | 12 +- docs/Body12.md | 14 +- docs/Body13.md | 15 + docs/Body14.md | 10 + docs/Body15.md | 13 + docs/Body16.md | 10 + docs/Body17.md | 13 + docs/Body2.md | 6 +- docs/Body3.md | 4 +- docs/Body4.md | 3 +- docs/Body5.md | 9 +- docs/Body6.md | 14 +- docs/Body7.md | 14 +- docs/Body8.md | 10 +- docs/Body9.md | 3 +- docs/Cart.md | 11 + docs/CompaniesApi.md | 10 +- docs/Company.md | 2 +- docs/CompanyAttributesInner.md | 2 +- docs/Configuration.md | 10 + docs/ContactsApi.md | 51 +- docs/ConversationsApi.md | 10 +- docs/ConversationsMessage.md | 2 +- docs/ConversationsMessageFile.md | 2 +- docs/ConversionSourceMetrics.md | 14 + docs/ConversionSourceProduct.md | 17 + docs/CorporateGroupDetailsResponse.md | 12 + docs/CorporateGroupDetailsResponseGroup.md | 12 + ...orporateGroupDetailsResponseSubaccounts.md | 12 + docs/CorporateGroupDetailsResponseUsers.md | 12 + docs/CouponsApi.md | 162 + docs/CreateAttribute.md | 5 +- docs/CreateContact.md | 2 +- docs/CreateCouponCollection.md | 14 + docs/CreateCoupons.md | 11 + docs/CreateDoiContact.md | 2 +- docs/CreateDomainModel.md | 3 +- docs/CreateDomainModelDnsRecords.md | 5 +- docs/CreateEmailCampaign.md | 7 +- docs/CreateExternalFeed.md | 2 +- docs/CreatePaymentRequest.md | 15 + docs/CreatePaymentResponse.md | 11 + docs/CreateSender.md | 2 +- docs/CreateSmsCampaign.md | 2 +- docs/CreateSmtpTemplate.md | 2 +- docs/CreateSubAccount.md | 1 + docs/CreateUpdateCategories.md | 1 + docs/CreateUpdateCategory.md | 1 + docs/CreateUpdateProduct.md | 1 + docs/CreateUpdateProducts.md | 1 + docs/CreateWebhook.md | 3 + docs/CreateWhatsAppCampaign.md | 2 +- docs/CreateWhatsAppCampaignRecipients.md | 2 +- docs/CreateWhatsAppTemplate.md | 10 +- docs/Deal.md | 2 +- docs/DealAttributesInner.md | 2 +- docs/DealsApi.md | 94 +- docs/DomainsApi.md | 14 +- docs/EcommerceApi.md | 202 +- docs/EmailCampaignsApi.md | 16 +- docs/Event.md | 14 + docs/EventIdentifiers.md | 14 + docs/EventsApi.md | 37 + docs/ExportWebhooksHistory.md | 3 +- docs/ExternalFeedsApi.md | 8 +- docs/GetAccount.md | 8 +- docs/GetAccountActivity.md | 2 +- docs/GetAccountRelay.md | 2 +- docs/GetAllExternalFeeds.md | 2 +- docs/GetAttributes.md | 2 +- docs/GetAttributesAttributes.md | 2 +- docs/GetCampaignOverview.md | 1 + docs/GetChildInfo.md | 6 +- docs/GetChildInfoApiKeys.md | 4 +- docs/GetContactCampaignStats.md | 18 +- docs/GetContactCampaignStatsClicked.md | 2 +- .../GetContactCampaignStatsUnsubscriptions.md | 4 +- docs/GetContactDetails.md | 4 +- docs/GetCorporateInvitedUsersList.md | 10 + ...tCorporateInvitedUsersListFeatureAccess.md | 13 + docs/GetCorporateInvitedUsersListGroups.md | 11 + docs/GetCorporateInvitedUsersListUsers.md | 14 + docs/GetCorporateUserPermission.md | 13 + ...GetCorporateUserPermissionFeatureAccess.md | 13 + docs/GetCorporateUserPermissionGroups.md | 11 + docs/GetCouponCollection.md | 18 + ...odel.md => GetDomainConfigurationModel.md} | 4 +- docs/GetDomainsList.md | 2 +- docs/GetEmailCampaign.md | 11 +- docs/GetEmailEventReport.md | 2 +- docs/GetExtendedCampaignOverview.md | 7 +- docs/GetExtendedCampaignOverviewSender.md | 2 +- docs/GetExtendedCampaignStats.md | 4 +- docs/GetExtendedClient.md | 2 +- docs/GetExtendedContactDetails.md | 6 +- docs/GetExtendedContactDetailsStatistics.md | 16 +- ...ExtendedContactDetailsStatisticsClicked.md | 2 +- ...ContactDetailsStatisticsUnsubscriptions.md | 4 +- docs/GetExtendedList.md | 2 +- docs/GetExternalFeedByUuid.md | 2 +- docs/GetInboundEmailEvents.md | 2 +- docs/GetInboundEmailEventsByUuid.md | 4 +- docs/GetInvitedUsersList.md | 10 + docs/GetInvitedUsersListFeatureAccess.md | 12 + docs/GetInvitedUsersListUsers.md | 13 + docs/GetOrders.md | 11 + docs/GetPaymentRequest.md | 16 + docs/GetProductDetails.md | 2 +- docs/GetReports.md | 2 +- docs/GetScheduledEmailByBatchId.md | 2 +- docs/GetSegments.md | 2 +- docs/GetSendersList.md | 2 +- docs/GetSendersListSenders.md | 2 +- docs/GetSmsCampaign.md | 4 +- docs/GetSmsEventReport.md | 2 +- docs/GetSmtpTemplateOverview.md | 2 +- docs/GetTransacAggregatedSmsReport.md | 5 +- docs/GetTransacBlockedContacts.md | 2 +- docs/GetTransacBlockedContactsContacts.md | 2 +- docs/GetTransacEmailContent.md | 2 +- docs/GetTransacEmailsList.md | 2 +- docs/GetTransacSmsReport.md | 2 +- docs/GetTransacSmsReportReports.md | 5 +- docs/GetUserPermission.md | 12 + docs/GetUserPermissionPrivileges.md | 11 + docs/GetWaTemplates.md | 2 +- docs/GetWebhook.md | 3 + docs/GetWebhookAuth.md | 11 + docs/GetWebhookHeaders.md | 11 + docs/GetWhatsappCampaigns.md | 2 +- docs/GetWhatsappEventReport.md | 2 +- docs/InboundParsingApi.md | 4 +- docs/InlineResponse200.md | 2 +- docs/InlineResponse2001.md | 11 + docs/InlineResponse2002.md | 10 + docs/InlineResponse2003.md | 10 + docs/InlineResponse2004.md | 10 + docs/InlineResponse2005.md | 11 + docs/InlineResponse2005Totals.md | 12 + docs/InlineResponse2006.md | 11 + docs/InlineResponse2007.md | 10 + docs/InlineResponse2008.md | 12 + docs/InlineResponse201.md | 2 +- docs/InlineResponse2011.md | 2 +- docs/InlineResponse2012.md | 2 +- docs/InlineResponse2013.md | 2 +- docs/InlineResponse2014.md | 10 + docs/InlineResponse2015.md | 10 + docs/InlineResponse400.md | 10 + docs/InviteAdminUser.md | 13 + docs/InviteAdminUserPrivileges.md | 11 + docs/Inviteuser.md | 12 + docs/InviteuserPrivileges.md | 11 + docs/MasterAccountApi.md | 484 ++- docs/MasterDetailsResponse.md | 4 +- docs/MasterDetailsResponseBillingInfo.md | 4 +- docs/MasterDetailsResponsePlanInfo.md | 2 +- docs/MasterDetailsResponsePlanInfoFeatures.md | 2 + docs/Note.md | 2 +- docs/Notification.md | 11 + docs/Order.md | 5 +- docs/OrderBatch.md | 1 + docs/OrderBilling.md | 1 + docs/PaymentsApi.md | 89 + docs/Pipeline.md | 2 + docs/Pipelines.md | 9 + docs/PostContactInfo.md | 2 +- docs/ProcessApi.md | 4 +- docs/PutRevokeUserPermission.md | 10 + docs/Putresendcancelinvitation.md | 10 + docs/RemainingCreditModel.md | 4 +- docs/RequestContactExport.md | 2 +- docs/RequestContactImport.md | 5 +- docs/RequestContactImportJsonBody.md | 11 + docs/ResellerApi.md | 16 +- docs/SMSCampaignsApi.md | 6 +- docs/SendReport.md | 2 +- docs/SendSmtpEmail.md | 18 +- docs/SendSmtpEmailMessageVersions.md | 12 +- docs/SendWhatsappMessage.md | 1 + docs/SendersApi.md | 8 +- docs/SetConfigDisplayCurrency.md | 10 + docs/SsoTokenRequest.md | 1 + docs/SsoTokenRequestCorporate.md | 10 + docs/SubAccountAppsToggleRequest.md | 22 + docs/SubAccountDetailsResponse.md | 3 +- docs/SubAccountDetailsResponseGroups.md | 11 + docs/SubAccountDetailsResponsePlanInfo.md | 4 +- ...ubAccountDetailsResponsePlanInfoCredits.md | 5 +- ...ccountDetailsResponsePlanInfoCreditsSms.md | 11 + ...ilsResponsePlanInfoCreditsWpSubscribers.md | 11 + ...bAccountDetailsResponsePlanInfoFeatures.md | 6 +- docs/SubAccountUpdatePlanRequest.md | 4 +- docs/SubAccountUpdatePlanRequestCredits.md | 2 + docs/SubAccountUpdatePlanRequestFeatures.md | 4 +- docs/SubAccountsResponse.md | 2 +- docs/SubAccountsResponseGroups.md | 11 + docs/SubAccountsResponseSubAccounts.md | 1 + docs/TasksApi.md | 10 +- docs/TransactionalEmailsApi.md | 32 +- docs/TransactionalSMSApi.md | 8 +- docs/TransactionalWhatsAppApi.md | 6 +- docs/UpdateAttribute.md | 3 +- docs/UpdateBatchContacts.md | 2 +- docs/UpdateBatchContactsContacts.md | 2 +- docs/UpdateContact.md | 2 +- docs/UpdateCouponCollection.md | 13 + docs/UpdateEmailCampaign.md | 7 +- docs/UpdateExternalFeed.md | 2 +- docs/UpdateSender.md | 2 +- docs/UpdateSmtpTemplate.md | 2 +- docs/UpdateWebhook.md | 3 + docs/UpdateWhatsAppCampaign.md | 13 + docs/UserApi.md | 171 + docs/WebhooksApi.md | 14 +- docs/WhatsAppCampaignsApi.md | 80 +- git_push.sh | 52 + go.mod | 14 +- go.sum | 373 +- lib/api_account.go | 101 +- lib/api_companies.go | 379 +- lib/api_contacts.go | 1622 +++---- lib/api_conversations.go | 528 +-- lib/api_coupons.go | 764 ++++ lib/api_deals.go | 777 +++- lib/api_domains.go | 306 +- lib/api_ecommerce.go | 1700 ++++++-- lib/api_email_campaigns.go | 769 ++-- lib/api_events.go | 146 + lib/api_external_feeds.go | 309 +- lib/api_files.go | 309 +- lib/api_inbound_parsing.go | 192 +- lib/api_master_account.go | 2523 +++++++++-- lib/api_notes.go | 315 +- lib/api_payments.go | 462 ++ lib/api_process.go | 131 +- lib/api_reseller.go | 1095 ++--- lib/api_senders.go | 361 +- lib/api_sms_campaigns.go | 559 +-- lib/api_tasks.go | 335 +- lib/api_transactional_emails.go | 1181 ++--- lib/api_transactional_sms.go | 259 +- lib/api_transactional_whats_app.go | 139 +- lib/api_user.go | 781 ++++ lib/api_webhooks.go | 335 +- lib/api_whats_app_campaigns.go | 653 ++- lib/client.go | 38 +- lib/configuration.go | 6 +- lib/model_ab_test_campaign_result.go | 10 +- ...l_ab_test_campaign_result_clicked_links.go | 4 +- ...odel_ab_test_campaign_result_statistics.go | 14 +- lib/model_ab_test_version_clicks.go | 4 +- lib/model_ab_test_version_clicks_inner.go | 4 +- lib/model_ab_test_version_stats.go | 4 +- lib/model_add_child_domain.go | 4 +- lib/model_add_contact_to_list.go | 4 +- lib/model_add_credits.go | 4 +- lib/model_authenticate_domain_model.go | 4 +- lib/model_block_domain.go | 4 +- lib/model_body.go | 14 +- lib/model_body_1.go | 14 +- lib/model_body_10.go | 20 +- lib/model_body_11.go | 31 +- lib/model_body_12.go | 36 +- lib/model_body_13.go | 26 + lib/model_body_14.go | 16 + lib/model_body_15.go | 22 + lib/model_body_16.go | 16 + lib/model_body_17.go | 22 + lib/model_body_2.go | 16 +- lib/model_body_3.go | 12 +- lib/model_body_4.go | 10 +- lib/model_body_5.go | 22 +- lib/model_body_6.go | 35 +- lib/model_body_7.go | 36 +- lib/model_body_8.go | 24 +- lib/model_body_9.go | 10 +- lib/model_body_variables_items.go | 4 +- lib/model_cart.go | 19 + lib/model_companies_list.go | 4 +- lib/model_company.go | 4 +- lib/model_company_attributes.go | 4 +- lib/model_company_attributes_inner.go | 14 +- lib/model_component_items.go | 6 +- lib/model_configuration.go | 17 + lib/model_conversations_message.go | 8 +- lib/model_conversations_message_file.go | 6 +- ...l_conversations_message_file_image_info.go | 4 +- lib/model_conversion_source_metrics.go | 19 + lib/model_conversion_source_product.go | 22 + lib/model_corporate_group_details_response.go | 17 + ..._corporate_group_details_response_group.go | 20 + ...rate_group_details_response_subaccounts.go | 20 + ..._corporate_group_details_response_users.go | 20 + lib/model_create_api_key_request.go | 4 +- lib/model_create_api_key_response.go | 4 +- lib/model_create_attribute.go | 8 +- lib/model_create_attribute_enumeration.go | 4 +- lib/model_create_category_model.go | 6 +- lib/model_create_child.go | 4 +- lib/model_create_contact.go | 6 +- lib/model_create_coupon_collection.go | 28 + lib/model_create_coupons.go | 17 + lib/model_create_doi_contact.go | 6 +- lib/model_create_domain.go | 4 +- lib/model_create_domain_model.go | 8 +- lib/model_create_domain_model_dns_records.go | 7 +- ...te_domain_model_dns_records_dkim_record.go | 10 +- lib/model_create_email_campaign.go | 6 +- lib/model_create_email_campaign_recipients.go | 4 +- lib/model_create_email_campaign_sender.go | 4 +- lib/model_create_external_feed.go | 6 +- lib/model_create_list.go | 4 +- lib/model_create_model.go | 4 +- lib/model_create_payment_request.go | 23 + lib/model_create_payment_response.go | 18 + lib/model_create_product_model.go | 6 +- lib/model_create_reseller.go | 4 +- lib/model_create_sender.go | 4 +- lib/model_create_sender_ips.go | 4 +- lib/model_create_sender_model.go | 4 +- lib/model_create_sms_campaign.go | 6 +- lib/model_create_sms_campaign_recipients.go | 4 +- lib/model_create_smtp_email.go | 6 +- lib/model_create_smtp_template.go | 6 +- lib/model_create_smtp_template_sender.go | 4 +- lib/model_create_sub_account.go | 6 +- lib/model_create_sub_account_response.go | 4 +- lib/model_create_update_batch_category.go | 4 +- ...odel_create_update_batch_category_model.go | 4 +- lib/model_create_update_batch_products.go | 4 +- ...odel_create_update_batch_products_model.go | 4 +- lib/model_create_update_categories.go | 10 +- lib/model_create_update_category.go | 10 +- lib/model_create_update_contact_model.go | 4 +- lib/model_create_update_folder.go | 4 +- lib/model_create_update_product.go | 6 +- lib/model_create_update_products.go | 6 +- lib/model_create_webhook.go | 11 +- lib/model_create_whats_app_campaign.go | 10 +- ...el_create_whats_app_campaign_recipients.go | 10 +- lib/model_create_whats_app_template.go | 19 +- lib/model_created_batch_id.go | 4 +- lib/model_created_process_id.go | 4 +- lib/model_deal.go | 4 +- lib/model_deal_attributes.go | 4 +- lib/model_deal_attributes_inner.go | 14 +- lib/model_deals_list.go | 4 +- lib/model_delete_hardbounces.go | 4 +- lib/model_email_export_recipients.go | 4 +- lib/model_error_model.go | 4 +- lib/model_event.go | 23 + lib/model_event_identifiers.go | 25 + lib/model_export_webhooks_history.go | 8 +- lib/model_file_data.go | 4 +- lib/model_file_downloadable_link.go | 4 +- lib/model_file_list.go | 4 +- lib/model_get_account.go | 12 +- lib/model_get_account_activity.go | 4 +- lib/model_get_account_activity_logs.go | 4 +- lib/model_get_account_marketing_automation.go | 4 +- lib/model_get_account_plan.go | 4 +- lib/model_get_account_relay.go | 8 +- lib/model_get_account_relay_data.go | 4 +- lib/model_get_aggregated_report.go | 4 +- lib/model_get_all_external_feeds.go | 6 +- lib/model_get_all_external_feeds_feeds.go | 6 +- lib/model_get_attributes.go | 4 +- lib/model_get_attributes_attributes.go | 4 +- lib/model_get_attributes_enumeration.go | 4 +- lib/model_get_blocked_domains.go | 4 +- lib/model_get_campaign_overview.go | 6 +- lib/model_get_campaign_recipients.go | 6 +- lib/model_get_campaign_stats.go | 4 +- lib/model_get_categories.go | 4 +- lib/model_get_category_details.go | 4 +- ...model_get_child_account_creation_status.go | 4 +- lib/model_get_child_domain.go | 4 +- lib/model_get_child_domains.go | 4 +- lib/model_get_child_info.go | 12 +- lib/model_get_child_info_api_keys.go | 4 +- lib/model_get_child_info_api_keys_v2.go | 4 +- lib/model_get_child_info_api_keys_v3.go | 4 +- lib/model_get_child_info_credits.go | 4 +- lib/model_get_child_info_statistics.go | 4 +- lib/model_get_children_list.go | 4 +- lib/model_get_client.go | 4 +- lib/model_get_contact_campaign_stats.go | 22 +- ...odel_get_contact_campaign_stats_clicked.go | 8 +- ...model_get_contact_campaign_stats_opened.go | 4 +- ...ntact_campaign_stats_transac_attributes.go | 4 +- ..._contact_campaign_stats_unsubscriptions.go | 4 +- lib/model_get_contact_details.go | 6 +- lib/model_get_contacts.go | 4 +- lib/model_get_corporate_invited_users_list.go | 16 + ...orate_invited_users_list_feature_access.go | 23 + ...get_corporate_invited_users_list_groups.go | 19 + ..._get_corporate_invited_users_list_users.go | 22 + lib/model_get_corporate_user_permission.go | 21 + ...orporate_user_permission_feature_access.go | 23 + ...el_get_corporate_user_permission_groups.go | 19 + lib/model_get_coupon_collection.go | 36 + lib/model_get_device_browser_stats.go | 4 +- ...> model_get_domain_configuration_model.go} | 10 +- lib/model_get_domains_list.go | 4 +- lib/model_get_domains_list_domains.go | 4 +- lib/model_get_email_campaign.go | 14 +- lib/model_get_email_campaigns.go | 4 +- lib/model_get_email_event_report.go | 4 +- lib/model_get_email_event_report_events.go | 4 +- lib/model_get_extended_campaign_overview.go | 16 +- ...l_get_extended_campaign_overview_sender.go | 6 +- lib/model_get_extended_campaign_stats.go | 4 +- lib/model_get_extended_client.go | 8 +- lib/model_get_extended_client_address.go | 4 +- lib/model_get_extended_contact_details.go | 6 +- ...get_extended_contact_details_statistics.go | 6 +- ...nded_contact_details_statistics_clicked.go | 4 +- ...ed_contact_details_statistics_delivered.go | 4 +- ...tended_contact_details_statistics_links.go | 4 +- ...ontact_details_statistics_messages_sent.go | 4 +- ...ended_contact_details_statistics_opened.go | 4 +- ...tact_details_statistics_unsubscriptions.go | 4 +- ...cs_unsubscriptions_admin_unsubscription.go | 4 +- ...ics_unsubscriptions_user_unsubscription.go | 4 +- lib/model_get_extended_list.go | 6 +- lib/model_get_extended_list_campaign_stats.go | 8 +- lib/model_get_external_feed_by_uuid.go | 6 +- ...model_get_external_feed_by_uuid_headers.go | 4 +- lib/model_get_folder.go | 4 +- lib/model_get_folder_lists.go | 4 +- lib/model_get_folders.go | 4 +- lib/model_get_inbound_email_events.go | 4 +- lib/model_get_inbound_email_events_by_uuid.go | 6 +- ...nbound_email_events_by_uuid_attachments.go | 4 +- ...l_get_inbound_email_events_by_uuid_logs.go | 4 +- lib/model_get_inbound_email_events_events.go | 4 +- lib/model_get_invited_users_list.go | 16 + ...l_get_invited_users_list_feature_access.go | 21 + lib/model_get_invited_users_list_users.go | 21 + lib/model_get_ip.go | 4 +- lib/model_get_ip_from_sender.go | 4 +- lib/model_get_ips.go | 4 +- lib/model_get_ips_from_sender.go | 4 +- lib/model_get_list.go | 4 +- lib/model_get_lists.go | 4 +- lib/model_get_orders.go | 17 + lib/model_get_payment_request.go | 25 + lib/model_get_process.go | 4 +- lib/model_get_processes.go | 4 +- lib/model_get_product_details.go | 4 +- lib/model_get_products.go | 4 +- lib/model_get_reports.go | 4 +- lib/model_get_reports_reports.go | 4 +- lib/model_get_scheduled_email_by_batch_id.go | 6 +- ...get_scheduled_email_by_batch_id_batches.go | 4 +- ...model_get_scheduled_email_by_message_id.go | 4 +- lib/model_get_segments.go | 4 +- lib/model_get_segments_segments.go | 4 +- lib/model_get_senders_list.go | 4 +- lib/model_get_senders_list_ips.go | 4 +- lib/model_get_senders_list_senders.go | 4 +- lib/model_get_shared_template_url.go | 4 +- lib/model_get_sms_campaign.go | 4 +- lib/model_get_sms_campaign_overview.go | 4 +- lib/model_get_sms_campaign_stats.go | 4 +- lib/model_get_sms_campaigns.go | 4 +- lib/model_get_sms_event_report.go | 4 +- lib/model_get_sms_event_report_events.go | 6 +- lib/model_get_smtp_template_overview.go | 8 +- ...model_get_smtp_template_overview_sender.go | 4 +- lib/model_get_smtp_templates.go | 6 +- lib/model_get_sso_token.go | 4 +- lib/model_get_stats_by_browser.go | 4 +- lib/model_get_stats_by_device.go | 4 +- lib/model_get_stats_by_domain.go | 4 +- ...model_get_transac_aggregated_sms_report.go | 10 +- lib/model_get_transac_blocked_contacts.go | 6 +- ...l_get_transac_blocked_contacts_contacts.go | 8 +- ...del_get_transac_blocked_contacts_reason.go | 4 +- lib/model_get_transac_email_content.go | 4 +- lib/model_get_transac_email_content_events.go | 4 +- lib/model_get_transac_emails_list.go | 6 +- ...ransac_emails_list_transactional_emails.go | 4 +- lib/model_get_transac_sms_report.go | 4 +- lib/model_get_transac_sms_report_reports.go | 10 +- lib/model_get_user_permission.go | 21 + lib/model_get_user_permission_privileges.go | 16 + lib/model_get_wa_templates.go | 4 +- lib/model_get_wa_templates_templates.go | 4 +- lib/model_get_webhook.go | 13 +- lib/model_get_webhook_auth.go | 19 + lib/model_get_webhook_headers.go | 18 + lib/model_get_webhooks.go | 4 +- lib/model_get_whats_app_config.go | 4 +- lib/model_get_whatsapp_campaign_overview.go | 10 +- lib/model_get_whatsapp_campaigns.go | 4 +- lib/model_get_whatsapp_campaigns_campaigns.go | 8 +- lib/model_get_whatsapp_event_report.go | 4 +- lib/model_get_whatsapp_event_report_events.go | 4 +- lib/model_inline_response_200.go | 8 +- lib/model_inline_response_200_1.go | 18 + lib/model_inline_response_200_2.go | 17 + lib/model_inline_response_200_3.go | 16 + lib/model_inline_response_200_4.go | 16 + lib/model_inline_response_200_5.go | 17 + lib/model_inline_response_200_5_totals.go | 18 + lib/model_inline_response_200_6.go | 16 + lib/model_inline_response_200_7.go | 16 + lib/model_inline_response_200_8.go | 20 + lib/model_inline_response_201.go | 8 +- lib/model_inline_response_201_1.go | 8 +- lib/model_inline_response_201_2.go | 9 +- lib/model_inline_response_201_3.go | 6 +- lib/model_inline_response_201_4.go | 16 + lib/model_inline_response_201_5.go | 16 + lib/model_inline_response_400.go | 15 + lib/model_invite_admin_user.go | 21 + lib/model_invite_admin_user_privileges.go | 19 + lib/model_inviteuser.go | 19 + lib/model_inviteuser_privileges.go | 19 + lib/model_manage_ip.go | 4 +- lib/model_master_details_response.go | 8 +- ...el_master_details_response_billing_info.go | 10 +- ...r_details_response_billing_info_address.go | 4 +- ...ster_details_response_billing_info_name.go | 4 +- ...model_master_details_response_plan_info.go | 4 +- ...ter_details_response_plan_info_features.go | 8 +- lib/model_note.go | 4 +- lib/model_note_data.go | 4 +- lib/model_note_id.go | 4 +- lib/model_note_list.go | 4 +- lib/model_notification.go | 19 + lib/model_order.go | 10 +- lib/model_order_batch.go | 6 +- lib/model_order_billing.go | 6 +- lib/model_order_products.go | 4 +- lib/model_otp.go | 4 +- lib/model_pipeline.go | 8 +- lib/model_pipeline_stage.go | 4 +- lib/model_pipelines.go | 15 + lib/model_post_contact_info.go | 4 +- lib/model_post_contact_info_contacts.go | 8 +- lib/model_post_send_failed.go | 8 +- lib/model_post_send_sms_test_failed.go | 8 +- lib/model_put_revoke_user_permission.go | 17 + lib/model_putresendcancelinvitation.go | 17 + lib/model_remaining_credit_model.go | 6 +- lib/model_remaining_credit_model_child.go | 4 +- lib/model_remaining_credit_model_reseller.go | 4 +- lib/model_remove_contact_from_list.go | 4 +- lib/model_remove_credits.go | 4 +- lib/model_request_contact_export.go | 6 +- ...st_contact_export_custom_contact_filter.go | 10 +- lib/model_request_contact_import.go | 16 +- lib/model_request_contact_import_json_body.go | 17 + lib/model_request_contact_import_new_list.go | 4 +- lib/model_request_sms_recipient_export.go | 4 +- lib/model_schedule_smtp_email.go | 6 +- lib/model_send_report.go | 8 +- lib/model_send_report_email.go | 4 +- lib/model_send_sms.go | 6 +- lib/model_send_smtp_email.go | 10 +- lib/model_send_smtp_email_attachment.go | 4 +- lib/model_send_smtp_email_bcc.go | 4 +- lib/model_send_smtp_email_cc.go | 4 +- lib/model_send_smtp_email_message_versions.go | 12 +- lib/model_send_smtp_email_reply_to.go | 4 +- lib/model_send_smtp_email_reply_to_1.go | 4 +- lib/model_send_smtp_email_sender.go | 4 +- lib/model_send_smtp_email_to.go | 4 +- lib/model_send_smtp_email_to_1.go | 4 +- lib/model_send_test_email.go | 4 +- lib/model_send_test_sms.go | 4 +- lib/model_send_transac_sms.go | 4 +- lib/model_send_whatsapp_message.go | 6 +- lib/model_set_config_display_currency.go | 16 + lib/model_sso_token_request.go | 8 +- lib/model_sso_token_request_corporate.go | 16 + lib/model_sub_account_apps_toggle_request.go | 41 + lib/model_sub_account_details_response.go | 10 +- ...del_sub_account_details_response_groups.go | 18 + ..._sub_account_details_response_plan_info.go | 6 +- ...ount_details_response_plan_info_credits.go | 8 +- ...tails_response_plan_info_credits_emails.go | 4 +- ..._details_response_plan_info_credits_sms.go | 19 + ...sponse_plan_info_credits_wp_subscribers.go | 19 + ...unt_details_response_plan_info_features.go | 8 +- ...tails_response_plan_info_features_inbox.go | 6 +- ...esponse_plan_info_features_landing_page.go | 6 +- ...tails_response_plan_info_features_users.go | 4 +- lib/model_sub_account_update_plan_request.go | 6 +- ...sub_account_update_plan_request_credits.go | 8 +- ...ub_account_update_plan_request_features.go | 8 +- lib/model_sub_accounts_response.go | 6 +- lib/model_sub_accounts_response_groups.go | 18 + ...odel_sub_accounts_response_sub_accounts.go | 6 +- lib/model_task.go | 4 +- lib/model_task_list.go | 4 +- lib/model_task_reminder.go | 4 +- lib/model_task_types.go | 4 +- lib/model_update_attribute.go | 6 +- lib/model_update_attribute_enumeration.go | 4 +- lib/model_update_batch_contacts.go | 4 +- lib/model_update_batch_contacts_contacts.go | 8 +- lib/model_update_batch_contacts_model.go | 4 +- lib/model_update_campaign_status.go | 4 +- lib/model_update_child.go | 4 +- lib/model_update_child_account_status.go | 4 +- lib/model_update_child_domain.go | 4 +- lib/model_update_contact.go | 6 +- lib/model_update_coupon_collection.go | 26 + lib/model_update_email_campaign.go | 6 +- lib/model_update_email_campaign_recipients.go | 4 +- lib/model_update_email_campaign_sender.go | 4 +- lib/model_update_external_feed.go | 6 +- lib/model_update_list.go | 4 +- lib/model_update_sender.go | 4 +- lib/model_update_sms_campaign.go | 6 +- lib/model_update_smtp_template.go | 6 +- lib/model_update_smtp_template_sender.go | 4 +- lib/model_update_webhook.go | 11 +- lib/model_update_whats_app_campaign.go | 21 + lib/model_upload_image_model.go | 4 +- lib/model_upload_image_to_gallery.go | 4 +- lib/model_variables_items.go | 6 +- lib/model_whatsapp_camp_stats.go | 12 +- lib/model_whatsapp_camp_template.go | 14 +- lib/response.go | 4 +- test.go | 33 + 638 files changed, 20032 insertions(+), 7585 deletions(-) create mode 100644 .DS_Store create mode 100644 docs/Body13.md create mode 100644 docs/Body14.md create mode 100644 docs/Body15.md create mode 100644 docs/Body16.md create mode 100644 docs/Body17.md create mode 100644 docs/Cart.md create mode 100644 docs/Configuration.md create mode 100644 docs/ConversionSourceMetrics.md create mode 100644 docs/ConversionSourceProduct.md create mode 100644 docs/CorporateGroupDetailsResponse.md create mode 100644 docs/CorporateGroupDetailsResponseGroup.md create mode 100644 docs/CorporateGroupDetailsResponseSubaccounts.md create mode 100644 docs/CorporateGroupDetailsResponseUsers.md create mode 100644 docs/CouponsApi.md create mode 100644 docs/CreateCouponCollection.md create mode 100644 docs/CreateCoupons.md create mode 100644 docs/CreatePaymentRequest.md create mode 100644 docs/CreatePaymentResponse.md create mode 100644 docs/Event.md create mode 100644 docs/EventIdentifiers.md create mode 100644 docs/EventsApi.md create mode 100644 docs/GetCorporateInvitedUsersList.md create mode 100644 docs/GetCorporateInvitedUsersListFeatureAccess.md create mode 100644 docs/GetCorporateInvitedUsersListGroups.md create mode 100644 docs/GetCorporateInvitedUsersListUsers.md create mode 100644 docs/GetCorporateUserPermission.md create mode 100644 docs/GetCorporateUserPermissionFeatureAccess.md create mode 100644 docs/GetCorporateUserPermissionGroups.md create mode 100644 docs/GetCouponCollection.md rename docs/{GetDomainonfigurationModel.md => GetDomainConfigurationModel.md} (89%) create mode 100644 docs/GetInvitedUsersList.md create mode 100644 docs/GetInvitedUsersListFeatureAccess.md create mode 100644 docs/GetInvitedUsersListUsers.md create mode 100644 docs/GetOrders.md create mode 100644 docs/GetPaymentRequest.md create mode 100644 docs/GetUserPermission.md create mode 100644 docs/GetUserPermissionPrivileges.md create mode 100644 docs/GetWebhookAuth.md create mode 100644 docs/GetWebhookHeaders.md create mode 100644 docs/InlineResponse2001.md create mode 100644 docs/InlineResponse2002.md create mode 100644 docs/InlineResponse2003.md create mode 100644 docs/InlineResponse2004.md create mode 100644 docs/InlineResponse2005.md create mode 100644 docs/InlineResponse2005Totals.md create mode 100644 docs/InlineResponse2006.md create mode 100644 docs/InlineResponse2007.md create mode 100644 docs/InlineResponse2008.md create mode 100644 docs/InlineResponse2014.md create mode 100644 docs/InlineResponse2015.md create mode 100644 docs/InlineResponse400.md create mode 100644 docs/InviteAdminUser.md create mode 100644 docs/InviteAdminUserPrivileges.md create mode 100644 docs/Inviteuser.md create mode 100644 docs/InviteuserPrivileges.md create mode 100644 docs/Notification.md create mode 100644 docs/PaymentsApi.md create mode 100644 docs/Pipelines.md create mode 100644 docs/PutRevokeUserPermission.md create mode 100644 docs/Putresendcancelinvitation.md create mode 100644 docs/RequestContactImportJsonBody.md create mode 100644 docs/SetConfigDisplayCurrency.md create mode 100644 docs/SsoTokenRequestCorporate.md create mode 100644 docs/SubAccountAppsToggleRequest.md create mode 100644 docs/SubAccountDetailsResponseGroups.md create mode 100644 docs/SubAccountDetailsResponsePlanInfoCreditsSms.md create mode 100644 docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md create mode 100644 docs/SubAccountsResponseGroups.md create mode 100644 docs/UpdateCouponCollection.md create mode 100644 docs/UpdateWhatsAppCampaign.md create mode 100644 docs/UserApi.md create mode 100644 git_push.sh create mode 100644 lib/api_coupons.go create mode 100644 lib/api_events.go create mode 100644 lib/api_payments.go create mode 100644 lib/api_user.go create mode 100644 lib/model_body_13.go create mode 100644 lib/model_body_14.go create mode 100644 lib/model_body_15.go create mode 100644 lib/model_body_16.go create mode 100644 lib/model_body_17.go create mode 100644 lib/model_cart.go create mode 100644 lib/model_configuration.go create mode 100644 lib/model_conversion_source_metrics.go create mode 100644 lib/model_conversion_source_product.go create mode 100644 lib/model_corporate_group_details_response.go create mode 100644 lib/model_corporate_group_details_response_group.go create mode 100644 lib/model_corporate_group_details_response_subaccounts.go create mode 100644 lib/model_corporate_group_details_response_users.go create mode 100644 lib/model_create_coupon_collection.go create mode 100644 lib/model_create_coupons.go create mode 100644 lib/model_create_payment_request.go create mode 100644 lib/model_create_payment_response.go create mode 100644 lib/model_event.go create mode 100644 lib/model_event_identifiers.go create mode 100644 lib/model_get_corporate_invited_users_list.go create mode 100644 lib/model_get_corporate_invited_users_list_feature_access.go create mode 100644 lib/model_get_corporate_invited_users_list_groups.go create mode 100644 lib/model_get_corporate_invited_users_list_users.go create mode 100644 lib/model_get_corporate_user_permission.go create mode 100644 lib/model_get_corporate_user_permission_feature_access.go create mode 100644 lib/model_get_corporate_user_permission_groups.go create mode 100644 lib/model_get_coupon_collection.go rename lib/{model_get_domainonfiguration_model.go => model_get_domain_configuration_model.go} (81%) create mode 100644 lib/model_get_invited_users_list.go create mode 100644 lib/model_get_invited_users_list_feature_access.go create mode 100644 lib/model_get_invited_users_list_users.go create mode 100644 lib/model_get_orders.go create mode 100644 lib/model_get_payment_request.go create mode 100644 lib/model_get_user_permission.go create mode 100644 lib/model_get_user_permission_privileges.go create mode 100644 lib/model_get_webhook_auth.go create mode 100644 lib/model_get_webhook_headers.go create mode 100644 lib/model_inline_response_200_1.go create mode 100644 lib/model_inline_response_200_2.go create mode 100644 lib/model_inline_response_200_3.go create mode 100644 lib/model_inline_response_200_4.go create mode 100644 lib/model_inline_response_200_5.go create mode 100644 lib/model_inline_response_200_5_totals.go create mode 100644 lib/model_inline_response_200_6.go create mode 100644 lib/model_inline_response_200_7.go create mode 100644 lib/model_inline_response_200_8.go create mode 100644 lib/model_inline_response_201_4.go create mode 100644 lib/model_inline_response_201_5.go create mode 100644 lib/model_inline_response_400.go create mode 100644 lib/model_invite_admin_user.go create mode 100644 lib/model_invite_admin_user_privileges.go create mode 100644 lib/model_inviteuser.go create mode 100644 lib/model_inviteuser_privileges.go create mode 100644 lib/model_notification.go create mode 100644 lib/model_pipelines.go create mode 100644 lib/model_put_revoke_user_permission.go create mode 100644 lib/model_putresendcancelinvitation.go create mode 100644 lib/model_request_contact_import_json_body.go create mode 100644 lib/model_set_config_display_currency.go create mode 100644 lib/model_sso_token_request_corporate.go create mode 100644 lib/model_sub_account_apps_toggle_request.go create mode 100644 lib/model_sub_account_details_response_groups.go create mode 100644 lib/model_sub_account_details_response_plan_info_credits_sms.go create mode 100644 lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go create mode 100644 lib/model_sub_accounts_response_groups.go create mode 100644 lib/model_update_coupon_collection.go create mode 100644 lib/model_update_whats_app_campaign.go create mode 100644 test.go diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9eeeb9ba2d262911c1003c6c8baaae2ff88cc4c6 GIT binary patch literal 6148 zcmeHK&x_MQ6n@jzZMuulgUVinfY+tA>nf<1+D#4%{(z0R2bJ11bvJC1DNSn+rO>nD zzu>>%Rq!bIC-}d3((g^C*kreY7ZGOXS77Al!6V*A! zelBOMq(?Yd@Eo%5N76@+M~oQ-i~|3<0{o_ysYgQ!52D=r`v9KC4`pf*o3u|)$RQW? z5j_STl2?fNScs`mK$7~D=6T|Jfww`&;58^l9Td3l)^JmrP+Z`CFL28gQAmECRXRSO zcRIXgws9IHP%X;aZ$f-B(jVEcRH+s&!r&31#vfcBag@b9g zeq~=K<6f8yMk*i-2B5q+3X?!iJ93f)sfzV7hgGv`-TL-y)@ttU*n4+w&3EkC-Q6bI zw|D3BnsxQY&HIPl(TF1pQ_>FgXvToKl-YAJ=!rJoPRp}ueAY)u)ibrn#2@qfJ!%A*h^awe4N&|Y0 z=M~YQz~{VL<=2pVE@p8M=c>FZW({Z9YDAUBm_0?^;9SekFIcx#Ho6zUbQW1#7htVs ziADjVz@I6=-v=9ov8{2Dq55>7Qbzz_1;fhFRzLqhn+Jexjf)I10uxy%Fbfs>h#~aZ zL1f|Zw>5u}VHQq8T^aM}D+_%>5&GyMY(*#0&d}6G0i!@(fpXTZ^ZxIyKmX^0OwTA_ z6!@~kQIx@Fa|77cxX2JAF!Ljz MWH6Oc;IAt16UivrZU6uP literal 0 HcmV?d00001 diff --git a/README.md b/README.md index e81fc32..b806951 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,19 @@ -# Brevo's API v3 Go Library +# Go API client for swagger -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. +Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | -This is the wrapper for the API. It implements all the features of the API v3. +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. -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 Golang 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.x.x +- API version: 3.0.0 - Package version: 1.0.0 -- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen +- Build package: io.swagger.codegen.languages.GoClientCodegen For more information, please visit [https://account.brevo.com/support](https://account.brevo.com/support) -## Installation & Usage -Install the package to your GoLang project. +## Installation +Put the package under your project folder and add the following in import: ```golang -go get github.com/getbrevo/brevo-go -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: -```golang -package main -import ( - "fmt" - "context" - brevo "github.com/getbrevo/brevo-go/lib" -) - -func main() { - var ctx context.Context - cfg := brevo.NewConfiguration() - //Configure API key authorization: api-key - cfg.AddDefaultHeader("api-key", "YOUR_API_KEY") - //Configure API key authorization: partner-key - cfg.AddDefaultHeader("partner-key","YOUR_API_KEY") - - br := brevo.NewAPIClient(cfg) - result, resp, err := br.AccountApi.GetAccount(ctx) - if err != nil { - fmt.Println("Error when calling AccountApi->get_account: ",err.Error()) - return - } - fmt.Println("GetAccount Object:",result," GetAccount Response: ",resp) - return -} +import "./swagger" ``` ## Documentation for API Endpoints @@ -101,18 +69,26 @@ Class | Method | HTTP request | Description *ConversationsApi* | [**ConversationsPushedMessagesIdGet**](docs/ConversationsApi.md#conversationspushedmessagesidget) | **Get** /conversations/pushedMessages/{id} | Get an automated message *ConversationsApi* | [**ConversationsPushedMessagesIdPut**](docs/ConversationsApi.md#conversationspushedmessagesidput) | **Put** /conversations/pushedMessages/{id} | Update an automated message *ConversationsApi* | [**ConversationsPushedMessagesPost**](docs/ConversationsApi.md#conversationspushedmessagespost) | **Post** /conversations/pushedMessages | Send an automated message to a visitor +*CouponsApi* | [**CreateCouponCollection**](docs/CouponsApi.md#createcouponcollection) | **Post** /couponCollections | Create а coupon collection +*CouponsApi* | [**CreateCoupons**](docs/CouponsApi.md#createcoupons) | **Post** /coupons | Create coupons for a coupon collection +*CouponsApi* | [**GetCouponCollection**](docs/CouponsApi.md#getcouponcollection) | **Get** /couponCollections/{id} | Get a coupon collection by id +*CouponsApi* | [**GetCouponCollections**](docs/CouponsApi.md#getcouponcollections) | **Get** /couponCollections | Get all your coupon collections +*CouponsApi* | [**UpdateCouponCollection**](docs/CouponsApi.md#updatecouponcollection) | **Patch** /couponCollections/{id} | Update a coupon collection by id *DealsApi* | [**CrmAttributesDealsGet**](docs/DealsApi.md#crmattributesdealsget) | **Get** /crm/attributes/deals | Get deal attributes *DealsApi* | [**CrmDealsGet**](docs/DealsApi.md#crmdealsget) | **Get** /crm/deals | Get all deals *DealsApi* | [**CrmDealsIdDelete**](docs/DealsApi.md#crmdealsiddelete) | **Delete** /crm/deals/{id} | Delete a deal *DealsApi* | [**CrmDealsIdGet**](docs/DealsApi.md#crmdealsidget) | **Get** /crm/deals/{id} | Get a deal *DealsApi* | [**CrmDealsIdPatch**](docs/DealsApi.md#crmdealsidpatch) | **Patch** /crm/deals/{id} | Update a deal +*DealsApi* | [**CrmDealsImportPost**](docs/DealsApi.md#crmdealsimportpost) | **Post** /crm/deals/import | Import deals(creation and updation) *DealsApi* | [**CrmDealsLinkUnlinkIdPatch**](docs/DealsApi.md#crmdealslinkunlinkidpatch) | **Patch** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies *DealsApi* | [**CrmDealsPost**](docs/DealsApi.md#crmdealspost) | **Post** /crm/deals | Create a deal +*DealsApi* | [**CrmPipelineDetailsAllGet**](docs/DealsApi.md#crmpipelinedetailsallget) | **Get** /crm/pipeline/details/all | Get all pipelines *DealsApi* | [**CrmPipelineDetailsGet**](docs/DealsApi.md#crmpipelinedetailsget) | **Get** /crm/pipeline/details | Get pipeline stages +*DealsApi* | [**CrmPipelineDetailsPipelineIDGet**](docs/DealsApi.md#crmpipelinedetailspipelineidget) | **Get** /crm/pipeline/details/{pipelineID} | Get a pipeline *DomainsApi* | [**AuthenticateDomain**](docs/DomainsApi.md#authenticatedomain) | **Put** /senders/domains/{domainName}/authenticate | Authenticate a domain *DomainsApi* | [**CreateDomain**](docs/DomainsApi.md#createdomain) | **Post** /senders/domains | Create a new domain *DomainsApi* | [**DeleteDomain**](docs/DomainsApi.md#deletedomain) | **Delete** /senders/domains/{domainName} | Delete a domain -*DomainsApi* | [**GetDomainonfiguration**](docs/DomainsApi.md#getdomainonfiguration) | **Get** /senders/domains/{domainName} | Validate domain configuration +*DomainsApi* | [**GetDomainConfiguration**](docs/DomainsApi.md#getdomainconfiguration) | **Get** /senders/domains/{domainName} | Validate domain configuration *DomainsApi* | [**GetDomains**](docs/DomainsApi.md#getdomains) | **Get** /senders/domains | Get the list of all your domains *EcommerceApi* | [**CreateBatchOrder**](docs/EcommerceApi.md#createbatchorder) | **Post** /orders/status/batch | Create orders in batch *EcommerceApi* | [**CreateOrder**](docs/EcommerceApi.md#createorder) | **Post** /orders/status | Managing the status of the order @@ -121,10 +97,16 @@ Class | Method | HTTP request | Description *EcommerceApi* | [**CreateUpdateCategory**](docs/EcommerceApi.md#createupdatecategory) | **Post** /categories | Create/Update a category *EcommerceApi* | [**CreateUpdateProduct**](docs/EcommerceApi.md#createupdateproduct) | **Post** /products | Create/Update a product *EcommerceApi* | [**EcommerceActivatePost**](docs/EcommerceApi.md#ecommerceactivatepost) | **Post** /ecommerce/activate | Activate the eCommerce app +*EcommerceApi* | [**EcommerceAttributionMetricsConversionSourceConversionSourceIdGet**](docs/EcommerceApi.md#ecommerceattributionmetricsconversionsourceconversionsourceidget) | **Get** /ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId} | Get detailed attribution metrics for a single Brevo campaign +*EcommerceApi* | [**EcommerceAttributionMetricsGet**](docs/EcommerceApi.md#ecommerceattributionmetricsget) | **Get** /ecommerce/attribution/metrics | Get attribution metrics for one or more Brevo campaigns +*EcommerceApi* | [**EcommerceAttributionProductsConversionSourceConversionSourceIdGet**](docs/EcommerceApi.md#ecommerceattributionproductsconversionsourceconversionsourceidget) | **Get** /ecommerce/attribution/products/{conversionSource}/{conversionSourceId} | Get attributed product sales for a single Brevo campaign +*EcommerceApi* | [**EcommerceConfigDisplayCurrencyGet**](docs/EcommerceApi.md#ecommerceconfigdisplaycurrencyget) | **Get** /ecommerce/config/displayCurrency | Get the ISO 4217 compliant display currency code for your Brevo account *EcommerceApi* | [**GetCategories**](docs/EcommerceApi.md#getcategories) | **Get** /categories | Return all your categories *EcommerceApi* | [**GetCategoryInfo**](docs/EcommerceApi.md#getcategoryinfo) | **Get** /categories/{id} | Get a category details +*EcommerceApi* | [**GetOrders**](docs/EcommerceApi.md#getorders) | **Get** /orders | Get order details *EcommerceApi* | [**GetProductInfo**](docs/EcommerceApi.md#getproductinfo) | **Get** /products/{id} | Get a product's details *EcommerceApi* | [**GetProducts**](docs/EcommerceApi.md#getproducts) | **Get** /products | Return all your products +*EcommerceApi* | [**SetConfigDisplayCurrency**](docs/EcommerceApi.md#setconfigdisplaycurrency) | **Post** /ecommerce/config/displayCurrency | Set the ISO 4217 compliant display currency code for your Brevo account *EmailCampaignsApi* | [**CreateEmailCampaign**](docs/EmailCampaignsApi.md#createemailcampaign) | **Post** /emailCampaigns | Create an email campaign *EmailCampaignsApi* | [**DeleteEmailCampaign**](docs/EmailCampaignsApi.md#deleteemailcampaign) | **Delete** /emailCampaigns/{campaignId} | Delete an email campaign *EmailCampaignsApi* | [**EmailExportRecipients**](docs/EmailCampaignsApi.md#emailexportrecipients) | **Post** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign @@ -138,6 +120,7 @@ Class | Method | HTTP request | Description *EmailCampaignsApi* | [**UpdateCampaignStatus**](docs/EmailCampaignsApi.md#updatecampaignstatus) | **Put** /emailCampaigns/{campaignId}/status | Update an email campaign status *EmailCampaignsApi* | [**UpdateEmailCampaign**](docs/EmailCampaignsApi.md#updateemailcampaign) | **Put** /emailCampaigns/{campaignId} | Update an email campaign *EmailCampaignsApi* | [**UploadImageToGallery**](docs/EmailCampaignsApi.md#uploadimagetogallery) | **Post** /emailCampaigns/images | Upload an image to your account's image gallery +*EventsApi* | [**CreateEvent**](docs/EventsApi.md#createevent) | **Post** /events | Create an event *ExternalFeedsApi* | [**CreateExternalFeed**](docs/ExternalFeedsApi.md#createexternalfeed) | **Post** /feeds | Create an external feed *ExternalFeedsApi* | [**DeleteExternalFeed**](docs/ExternalFeedsApi.md#deleteexternalfeed) | **Delete** /feeds/{uuid} | Delete an external feed *ExternalFeedsApi* | [**GetAllExternalFeeds**](docs/ExternalFeedsApi.md#getallexternalfeeds) | **Get** /feeds | Fetch all external feeds @@ -151,19 +134,38 @@ Class | Method | HTTP request | Description *InboundParsingApi* | [**GetInboundEmailAttachment**](docs/InboundParsingApi.md#getinboundemailattachment) | **Get** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. *InboundParsingApi* | [**GetInboundEmailEvents**](docs/InboundParsingApi.md#getinboundemailevents) | **Get** /inbound/events | Get the list of all the events for the received emails. *InboundParsingApi* | [**GetInboundEmailEventsByUuid**](docs/InboundParsingApi.md#getinboundemaileventsbyuuid) | **Get** /inbound/events/{uuid} | Fetch all events history for one particular received email. +*MasterAccountApi* | [**CorporateGroupIdDelete**](docs/MasterAccountApi.md#corporategroupiddelete) | **Delete** /corporate/group/{id} | Delete a group +*MasterAccountApi* | [**CorporateGroupIdGet**](docs/MasterAccountApi.md#corporategroupidget) | **Get** /corporate/group/{id} | GET a group details +*MasterAccountApi* | [**CorporateGroupIdPut**](docs/MasterAccountApi.md#corporategroupidput) | **Put** /corporate/group/{id} | Update a group of sub-accounts +*MasterAccountApi* | [**CorporateGroupPost**](docs/MasterAccountApi.md#corporategrouppost) | **Post** /corporate/group | Create a new group of sub-accounts +*MasterAccountApi* | [**CorporateGroupUnlinkGroupIdSubAccountsPut**](docs/MasterAccountApi.md#corporategroupunlinkgroupidsubaccountsput) | **Put** /corporate/group/unlink/{groupId}/subAccounts | Delete sub-account from group *MasterAccountApi* | [**CorporateMasterAccountGet**](docs/MasterAccountApi.md#corporatemasteraccountget) | **Get** /corporate/masterAccount | Get the details of requested master account +*MasterAccountApi* | [**CorporateSsoTokenPost**](docs/MasterAccountApi.md#corporatessotokenpost) | **Post** /corporate/ssoToken | Generate SSO token to access admin account *MasterAccountApi* | [**CorporateSubAccountGet**](docs/MasterAccountApi.md#corporatesubaccountget) | **Get** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +*MasterAccountApi* | [**CorporateSubAccountIdApplicationsTogglePut**](docs/MasterAccountApi.md#corporatesubaccountidapplicationstoggleput) | **Put** /corporate/subAccount/{id}/applications/toggle | Enable/disable sub-account application(s) *MasterAccountApi* | [**CorporateSubAccountIdDelete**](docs/MasterAccountApi.md#corporatesubaccountiddelete) | **Delete** /corporate/subAccount/{id} | Delete a sub-account *MasterAccountApi* | [**CorporateSubAccountIdGet**](docs/MasterAccountApi.md#corporatesubaccountidget) | **Get** /corporate/subAccount/{id} | Get sub-account details *MasterAccountApi* | [**CorporateSubAccountIdPlanPut**](docs/MasterAccountApi.md#corporatesubaccountidplanput) | **Put** /corporate/subAccount/{id}/plan | Update sub-account plan +*MasterAccountApi* | [**CorporateSubAccountIpAssociatePost**](docs/MasterAccountApi.md#corporatesubaccountipassociatepost) | **Post** /corporate/subAccount/ip/associate | Associate an IP to sub-accounts +*MasterAccountApi* | [**CorporateSubAccountIpDissociatePut**](docs/MasterAccountApi.md#corporatesubaccountipdissociateput) | **Put** /corporate/subAccount/ip/dissociate | Dissociate an IP from sub-accounts *MasterAccountApi* | [**CorporateSubAccountKeyPost**](docs/MasterAccountApi.md#corporatesubaccountkeypost) | **Post** /corporate/subAccount/key | Create an API key for a sub-account *MasterAccountApi* | [**CorporateSubAccountPost**](docs/MasterAccountApi.md#corporatesubaccountpost) | **Post** /corporate/subAccount | Create a new sub-account under a master account. -*MasterAccountApi* | [**CorporateSubAccountSsoTokenPost**](docs/MasterAccountApi.md#corporatesubaccountssotokenpost) | **Post** /corporate/subAccount/ssoToken | Generate SSO token to access Brevo +*MasterAccountApi* | [**CorporateSubAccountSsoTokenPost**](docs/MasterAccountApi.md#corporatesubaccountssotokenpost) | **Post** /corporate/subAccount/ssoToken | Generate SSO token to access sub-account +*MasterAccountApi* | [**CorporateUserInvitationActionEmailPut**](docs/MasterAccountApi.md#corporateuserinvitationactionemailput) | **Put** /corporate/user/invitation/{action}/{email} | Resend / cancel admin user invitation +*MasterAccountApi* | [**CorporateUserRevokeEmailDelete**](docs/MasterAccountApi.md#corporateuserrevokeemaildelete) | **Delete** /corporate/user/revoke/{email} | Revoke an admin user +*MasterAccountApi* | [**GetAccountActivity**](docs/MasterAccountApi.md#getaccountactivity) | **Get** /organization/activities | Get user activity logs +*MasterAccountApi* | [**GetCorporateInvitedUsersList**](docs/MasterAccountApi.md#getcorporateinviteduserslist) | **Get** /corporate/invited/users | Get the list of all admin users +*MasterAccountApi* | [**GetCorporateUserPermission**](docs/MasterAccountApi.md#getcorporateuserpermission) | **Get** /corporate/user/{email}/permissions | Check admin user permissions +*MasterAccountApi* | [**GetSubAccountGroups**](docs/MasterAccountApi.md#getsubaccountgroups) | **Get** /corporate/groups | Get the list of groups +*MasterAccountApi* | [**InviteAdminUser**](docs/MasterAccountApi.md#inviteadminuser) | **Post** /corporate/user/invitation/send | Send invitation to an admin user *NotesApi* | [**CrmNotesGet**](docs/NotesApi.md#crmnotesget) | **Get** /crm/notes | Get all notes *NotesApi* | [**CrmNotesIdDelete**](docs/NotesApi.md#crmnotesiddelete) | **Delete** /crm/notes/{id} | Delete a note *NotesApi* | [**CrmNotesIdGet**](docs/NotesApi.md#crmnotesidget) | **Get** /crm/notes/{id} | Get a note *NotesApi* | [**CrmNotesIdPatch**](docs/NotesApi.md#crmnotesidpatch) | **Patch** /crm/notes/{id} | Update a note *NotesApi* | [**CrmNotesPost**](docs/NotesApi.md#crmnotespost) | **Post** /crm/notes | Create a note +*PaymentsApi* | [**CreatePaymentRequest**](docs/PaymentsApi.md#createpaymentrequest) | **Post** /payments/requests | Create a payment request +*PaymentsApi* | [**DeletePaymentRequest**](docs/PaymentsApi.md#deletepaymentrequest) | **Delete** /payments/requests/{id} | Delete a payment request. +*PaymentsApi* | [**GetPaymentRequest**](docs/PaymentsApi.md#getpaymentrequest) | **Get** /payments/requests/{id} | Get payment request details *ProcessApi* | [**GetProcess**](docs/ProcessApi.md#getprocess) | **Get** /processes/{processId} | Return the informations for a process *ProcessApi* | [**GetProcesses**](docs/ProcessApi.md#getprocesses) | **Get** /processes | Return all the processes for your account *ResellerApi* | [**AddCredits**](docs/ResellerApi.md#addcredits) | **Post** /reseller/children/{childIdentifier}/credits/add | Add Email and/or SMS credits to a specific child account @@ -225,7 +227,7 @@ Class | Method | HTTP request | Description *TransactionalEmailsApi* | [**SendTestTemplate**](docs/TransactionalEmailsApi.md#sendtesttemplate) | **Post** /smtp/templates/{templateId}/sendTest | Send a template to your test list *TransactionalEmailsApi* | [**SendTransacEmail**](docs/TransactionalEmailsApi.md#sendtransacemail) | **Post** /smtp/email | Send a transactional email *TransactionalEmailsApi* | [**SmtpBlockedContactsEmailDelete**](docs/TransactionalEmailsApi.md#smtpblockedcontactsemaildelete) | **Delete** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact -*TransactionalEmailsApi* | [**SmtpLogMessageIdDelete**](docs/TransactionalEmailsApi.md#smtplogmessageiddelete) | **Delete** /smtp/log/{messageId} | Delete an SMTP transactional log +*TransactionalEmailsApi* | [**SmtpLogIdentifierDelete**](docs/TransactionalEmailsApi.md#smtplogidentifierdelete) | **Delete** /smtp/log/{identifier} | Delete an SMTP transactional log *TransactionalEmailsApi* | [**UpdateSmtpTemplate**](docs/TransactionalEmailsApi.md#updatesmtptemplate) | **Put** /smtp/templates/{templateId} | Update an email template *TransactionalSMSApi* | [**GetSmsEvents**](docs/TransactionalSMSApi.md#getsmsevents) | **Get** /transactionalSMS/statistics/events | Get all your SMS activity (unaggregated events) *TransactionalSMSApi* | [**GetTransacAggregatedSmsReport**](docs/TransactionalSMSApi.md#gettransacaggregatedsmsreport) | **Get** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time @@ -233,9 +235,15 @@ Class | Method | HTTP request | Description *TransactionalSMSApi* | [**SendTransacSms**](docs/TransactionalSMSApi.md#sendtransacsms) | **Post** /transactionalSMS/sms | Send SMS message to a mobile number *TransactionalWhatsAppApi* | [**GetWhatsappEventReport**](docs/TransactionalWhatsAppApi.md#getwhatsappeventreport) | **Get** /whatsapp/statistics/events | Get all your WhatsApp activity (unaggregated events) *TransactionalWhatsAppApi* | [**SendWhatsappMessage**](docs/TransactionalWhatsAppApi.md#sendwhatsappmessage) | **Post** /whatsapp/sendMessage | Send a WhatsApp message +*UserApi* | [**EditUserPermission**](docs/UserApi.md#edituserpermission) | **Post** /organization/user/update/permissions | Update permission for a user +*UserApi* | [**GetInvitedUsersList**](docs/UserApi.md#getinviteduserslist) | **Get** /organization/invited/users | Get the list of all your users +*UserApi* | [**GetUserPermission**](docs/UserApi.md#getuserpermission) | **Get** /organization/user/{email}/permissions | Check user permission +*UserApi* | [**Inviteuser**](docs/UserApi.md#inviteuser) | **Post** /organization/user/invitation/send | Send invitation to user +*UserApi* | [**PutRevokeUserPermission**](docs/UserApi.md#putrevokeuserpermission) | **Put** /organization/user/invitation/revoke/{email} | Revoke user permission +*UserApi* | [**Putresendcancelinvitation**](docs/UserApi.md#putresendcancelinvitation) | **Put** /organization/user/invitation/{action}/{email} | Resend / Cancel invitation *WebhooksApi* | [**CreateWebhook**](docs/WebhooksApi.md#createwebhook) | **Post** /webhooks | Create a webhook *WebhooksApi* | [**DeleteWebhook**](docs/WebhooksApi.md#deletewebhook) | **Delete** /webhooks/{webhookId} | Delete a webhook -*WebhooksApi* | [**ExportWebhooksHistory**](docs/WebhooksApi.md#exportwebhookshistory) | **Post** /webhooks/export | Export all transactional events +*WebhooksApi* | [**ExportWebhooksHistory**](docs/WebhooksApi.md#exportwebhookshistory) | **Post** /webhooks/export | Export all webhook events *WebhooksApi* | [**GetWebhook**](docs/WebhooksApi.md#getwebhook) | **Get** /webhooks/{webhookId} | Get a webhook details *WebhooksApi* | [**GetWebhooks**](docs/WebhooksApi.md#getwebhooks) | **Get** /webhooks | Get all webhooks *WebhooksApi* | [**UpdateWebhook**](docs/WebhooksApi.md#updatewebhook) | **Put** /webhooks/{webhookId} | Update a webhook @@ -246,6 +254,8 @@ Class | Method | HTTP request | Description *WhatsAppCampaignsApi* | [**GetWhatsAppCampaigns**](docs/WhatsAppCampaignsApi.md#getwhatsappcampaigns) | **Get** /whatsappCampaigns | Return all your created WhatsApp campaigns *WhatsAppCampaignsApi* | [**GetWhatsAppConfig**](docs/WhatsAppCampaignsApi.md#getwhatsappconfig) | **Get** /whatsappCampaigns/config | Get your WhatsApp API account information *WhatsAppCampaignsApi* | [**GetWhatsAppTemplates**](docs/WhatsAppCampaignsApi.md#getwhatsapptemplates) | **Get** /whatsappCampaigns/template-list | Return all your created WhatsApp templates +*WhatsAppCampaignsApi* | [**SendWhatsAppTemplateApproval**](docs/WhatsAppCampaignsApi.md#sendwhatsapptemplateapproval) | **Post** /whatsappCampaigns/template/approval/{templateId} | Send your WhatsApp template for approval +*WhatsAppCampaignsApi* | [**UpdateWhatsAppCampaign**](docs/WhatsAppCampaignsApi.md#updatewhatsappcampaign) | **Put** /whatsappCampaigns/{campaignId} | Update a WhatsApp campaign ## Documentation For Models @@ -266,6 +276,11 @@ Class | Method | HTTP request | Description - [Body10](docs/Body10.md) - [Body11](docs/Body11.md) - [Body12](docs/Body12.md) + - [Body13](docs/Body13.md) + - [Body14](docs/Body14.md) + - [Body15](docs/Body15.md) + - [Body16](docs/Body16.md) + - [Body17](docs/Body17.md) - [Body2](docs/Body2.md) - [Body3](docs/Body3.md) - [Body4](docs/Body4.md) @@ -275,14 +290,22 @@ Class | Method | HTTP request | Description - [Body8](docs/Body8.md) - [Body9](docs/Body9.md) - [BodyVariablesItems](docs/BodyVariablesItems.md) + - [Cart](docs/Cart.md) - [CompaniesList](docs/CompaniesList.md) - [Company](docs/Company.md) - [CompanyAttributes](docs/CompanyAttributes.md) - [CompanyAttributesInner](docs/CompanyAttributesInner.md) - [ComponentItems](docs/ComponentItems.md) + - [Configuration](docs/Configuration.md) - [ConversationsMessage](docs/ConversationsMessage.md) - [ConversationsMessageFile](docs/ConversationsMessageFile.md) - [ConversationsMessageFileImageInfo](docs/ConversationsMessageFileImageInfo.md) + - [ConversionSourceMetrics](docs/ConversionSourceMetrics.md) + - [ConversionSourceProduct](docs/ConversionSourceProduct.md) + - [CorporateGroupDetailsResponse](docs/CorporateGroupDetailsResponse.md) + - [CorporateGroupDetailsResponseGroup](docs/CorporateGroupDetailsResponseGroup.md) + - [CorporateGroupDetailsResponseSubaccounts](docs/CorporateGroupDetailsResponseSubaccounts.md) + - [CorporateGroupDetailsResponseUsers](docs/CorporateGroupDetailsResponseUsers.md) - [CreateApiKeyRequest](docs/CreateApiKeyRequest.md) - [CreateApiKeyResponse](docs/CreateApiKeyResponse.md) - [CreateAttribute](docs/CreateAttribute.md) @@ -290,6 +313,8 @@ Class | Method | HTTP request | Description - [CreateCategoryModel](docs/CreateCategoryModel.md) - [CreateChild](docs/CreateChild.md) - [CreateContact](docs/CreateContact.md) + - [CreateCouponCollection](docs/CreateCouponCollection.md) + - [CreateCoupons](docs/CreateCoupons.md) - [CreateDoiContact](docs/CreateDoiContact.md) - [CreateDomain](docs/CreateDomain.md) - [CreateDomainModel](docs/CreateDomainModel.md) @@ -301,6 +326,8 @@ Class | Method | HTTP request | Description - [CreateExternalFeed](docs/CreateExternalFeed.md) - [CreateList](docs/CreateList.md) - [CreateModel](docs/CreateModel.md) + - [CreatePaymentRequest](docs/CreatePaymentRequest.md) + - [CreatePaymentResponse](docs/CreatePaymentResponse.md) - [CreateProductModel](docs/CreateProductModel.md) - [CreateReseller](docs/CreateReseller.md) - [CreateSender](docs/CreateSender.md) @@ -336,6 +363,8 @@ Class | Method | HTTP request | Description - [DeleteHardbounces](docs/DeleteHardbounces.md) - [EmailExportRecipients](docs/EmailExportRecipients.md) - [ErrorModel](docs/ErrorModel.md) + - [Event](docs/Event.md) + - [EventIdentifiers](docs/EventIdentifiers.md) - [ExportWebhooksHistory](docs/ExportWebhooksHistory.md) - [FileData](docs/FileData.md) - [FileDownloadableLink](docs/FileDownloadableLink.md) @@ -375,8 +404,16 @@ Class | Method | HTTP request | Description - [GetContactCampaignStatsUnsubscriptions](docs/GetContactCampaignStatsUnsubscriptions.md) - [GetContactDetails](docs/GetContactDetails.md) - [GetContacts](docs/GetContacts.md) + - [GetCorporateInvitedUsersList](docs/GetCorporateInvitedUsersList.md) + - [GetCorporateInvitedUsersListFeatureAccess](docs/GetCorporateInvitedUsersListFeatureAccess.md) + - [GetCorporateInvitedUsersListGroups](docs/GetCorporateInvitedUsersListGroups.md) + - [GetCorporateInvitedUsersListUsers](docs/GetCorporateInvitedUsersListUsers.md) + - [GetCorporateUserPermission](docs/GetCorporateUserPermission.md) + - [GetCorporateUserPermissionFeatureAccess](docs/GetCorporateUserPermissionFeatureAccess.md) + - [GetCorporateUserPermissionGroups](docs/GetCorporateUserPermissionGroups.md) + - [GetCouponCollection](docs/GetCouponCollection.md) - [GetDeviceBrowserStats](docs/GetDeviceBrowserStats.md) - - [GetDomainonfigurationModel](docs/GetDomainonfigurationModel.md) + - [GetDomainConfigurationModel](docs/GetDomainConfigurationModel.md) - [GetDomainsList](docs/GetDomainsList.md) - [GetDomainsListDomains](docs/GetDomainsListDomains.md) - [GetEmailCampaigns](docs/GetEmailCampaigns.md) @@ -405,12 +442,17 @@ Class | Method | HTTP request | Description - [GetInboundEmailEventsByUuidAttachments](docs/GetInboundEmailEventsByUuidAttachments.md) - [GetInboundEmailEventsByUuidLogs](docs/GetInboundEmailEventsByUuidLogs.md) - [GetInboundEmailEventsEvents](docs/GetInboundEmailEventsEvents.md) + - [GetInvitedUsersList](docs/GetInvitedUsersList.md) + - [GetInvitedUsersListFeatureAccess](docs/GetInvitedUsersListFeatureAccess.md) + - [GetInvitedUsersListUsers](docs/GetInvitedUsersListUsers.md) - [GetIp](docs/GetIp.md) - [GetIpFromSender](docs/GetIpFromSender.md) - [GetIps](docs/GetIps.md) - [GetIpsFromSender](docs/GetIpsFromSender.md) - [GetList](docs/GetList.md) - [GetLists](docs/GetLists.md) + - [GetOrders](docs/GetOrders.md) + - [GetPaymentRequest](docs/GetPaymentRequest.md) - [GetProcess](docs/GetProcess.md) - [GetProcesses](docs/GetProcesses.md) - [GetProductDetails](docs/GetProductDetails.md) @@ -448,9 +490,13 @@ Class | Method | HTTP request | Description - [GetTransacEmailsListTransactionalEmails](docs/GetTransacEmailsListTransactionalEmails.md) - [GetTransacSmsReport](docs/GetTransacSmsReport.md) - [GetTransacSmsReportReports](docs/GetTransacSmsReportReports.md) + - [GetUserPermission](docs/GetUserPermission.md) + - [GetUserPermissionPrivileges](docs/GetUserPermissionPrivileges.md) - [GetWaTemplates](docs/GetWaTemplates.md) - [GetWaTemplatesTemplates](docs/GetWaTemplatesTemplates.md) - [GetWebhook](docs/GetWebhook.md) + - [GetWebhookAuth](docs/GetWebhookAuth.md) + - [GetWebhookHeaders](docs/GetWebhookHeaders.md) - [GetWebhooks](docs/GetWebhooks.md) - [GetWhatsAppConfig](docs/GetWhatsAppConfig.md) - [GetWhatsappCampaignOverview](docs/GetWhatsappCampaignOverview.md) @@ -459,10 +505,26 @@ Class | Method | HTTP request | Description - [GetWhatsappEventReport](docs/GetWhatsappEventReport.md) - [GetWhatsappEventReportEvents](docs/GetWhatsappEventReportEvents.md) - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse2003](docs/InlineResponse2003.md) + - [InlineResponse2004](docs/InlineResponse2004.md) + - [InlineResponse2005](docs/InlineResponse2005.md) + - [InlineResponse2005Totals](docs/InlineResponse2005Totals.md) + - [InlineResponse2006](docs/InlineResponse2006.md) + - [InlineResponse2007](docs/InlineResponse2007.md) + - [InlineResponse2008](docs/InlineResponse2008.md) - [InlineResponse201](docs/InlineResponse201.md) - [InlineResponse2011](docs/InlineResponse2011.md) - [InlineResponse2012](docs/InlineResponse2012.md) - [InlineResponse2013](docs/InlineResponse2013.md) + - [InlineResponse2014](docs/InlineResponse2014.md) + - [InlineResponse2015](docs/InlineResponse2015.md) + - [InlineResponse400](docs/InlineResponse400.md) + - [InviteAdminUser](docs/InviteAdminUser.md) + - [InviteAdminUserPrivileges](docs/InviteAdminUserPrivileges.md) + - [Inviteuser](docs/Inviteuser.md) + - [InviteuserPrivileges](docs/InviteuserPrivileges.md) - [ManageIp](docs/ManageIp.md) - [MasterDetailsResponse](docs/MasterDetailsResponse.md) - [MasterDetailsResponseBillingInfo](docs/MasterDetailsResponseBillingInfo.md) @@ -474,6 +536,7 @@ Class | Method | HTTP request | Description - [NoteData](docs/NoteData.md) - [NoteId](docs/NoteId.md) - [NoteList](docs/NoteList.md) + - [Notification](docs/Notification.md) - [Order](docs/Order.md) - [OrderBatch](docs/OrderBatch.md) - [OrderBilling](docs/OrderBilling.md) @@ -481,10 +544,13 @@ Class | Method | HTTP request | Description - [Otp](docs/Otp.md) - [Pipeline](docs/Pipeline.md) - [PipelineStage](docs/PipelineStage.md) + - [Pipelines](docs/Pipelines.md) - [PostContactInfo](docs/PostContactInfo.md) - [PostContactInfoContacts](docs/PostContactInfoContacts.md) - [PostSendFailed](docs/PostSendFailed.md) - [PostSendSmsTestFailed](docs/PostSendSmsTestFailed.md) + - [PutRevokeUserPermission](docs/PutRevokeUserPermission.md) + - [Putresendcancelinvitation](docs/Putresendcancelinvitation.md) - [RemainingCreditModel](docs/RemainingCreditModel.md) - [RemainingCreditModelChild](docs/RemainingCreditModelChild.md) - [RemainingCreditModelReseller](docs/RemainingCreditModelReseller.md) @@ -493,6 +559,7 @@ Class | Method | HTTP request | Description - [RequestContactExport](docs/RequestContactExport.md) - [RequestContactExportCustomContactFilter](docs/RequestContactExportCustomContactFilter.md) - [RequestContactImport](docs/RequestContactImport.md) + - [RequestContactImportJsonBody](docs/RequestContactImportJsonBody.md) - [RequestContactImportNewList](docs/RequestContactImportNewList.md) - [RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) - [ScheduleSmtpEmail](docs/ScheduleSmtpEmail.md) @@ -513,11 +580,17 @@ Class | Method | HTTP request | Description - [SendTestSms](docs/SendTestSms.md) - [SendTransacSms](docs/SendTransacSms.md) - [SendWhatsappMessage](docs/SendWhatsappMessage.md) + - [SetConfigDisplayCurrency](docs/SetConfigDisplayCurrency.md) - [SsoTokenRequest](docs/SsoTokenRequest.md) + - [SsoTokenRequestCorporate](docs/SsoTokenRequestCorporate.md) + - [SubAccountAppsToggleRequest](docs/SubAccountAppsToggleRequest.md) - [SubAccountDetailsResponse](docs/SubAccountDetailsResponse.md) + - [SubAccountDetailsResponseGroups](docs/SubAccountDetailsResponseGroups.md) - [SubAccountDetailsResponsePlanInfo](docs/SubAccountDetailsResponsePlanInfo.md) - [SubAccountDetailsResponsePlanInfoCredits](docs/SubAccountDetailsResponsePlanInfoCredits.md) - [SubAccountDetailsResponsePlanInfoCreditsEmails](docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md) + - [SubAccountDetailsResponsePlanInfoCreditsSms](docs/SubAccountDetailsResponsePlanInfoCreditsSms.md) + - [SubAccountDetailsResponsePlanInfoCreditsWpSubscribers](docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md) - [SubAccountDetailsResponsePlanInfoFeatures](docs/SubAccountDetailsResponsePlanInfoFeatures.md) - [SubAccountDetailsResponsePlanInfoFeaturesInbox](docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md) - [SubAccountDetailsResponsePlanInfoFeaturesLandingPage](docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) @@ -526,6 +599,7 @@ Class | Method | HTTP request | Description - [SubAccountUpdatePlanRequestCredits](docs/SubAccountUpdatePlanRequestCredits.md) - [SubAccountUpdatePlanRequestFeatures](docs/SubAccountUpdatePlanRequestFeatures.md) - [SubAccountsResponse](docs/SubAccountsResponse.md) + - [SubAccountsResponseGroups](docs/SubAccountsResponseGroups.md) - [SubAccountsResponseSubAccounts](docs/SubAccountsResponseSubAccounts.md) - [Task](docs/Task.md) - [TaskList](docs/TaskList.md) @@ -541,6 +615,7 @@ Class | Method | HTTP request | Description - [UpdateChildAccountStatus](docs/UpdateChildAccountStatus.md) - [UpdateChildDomain](docs/UpdateChildDomain.md) - [UpdateContact](docs/UpdateContact.md) + - [UpdateCouponCollection](docs/UpdateCouponCollection.md) - [UpdateEmailCampaign](docs/UpdateEmailCampaign.md) - [UpdateEmailCampaignRecipients](docs/UpdateEmailCampaignRecipients.md) - [UpdateEmailCampaignSender](docs/UpdateEmailCampaignSender.md) @@ -551,6 +626,7 @@ Class | Method | HTTP request | Description - [UpdateSmtpTemplate](docs/UpdateSmtpTemplate.md) - [UpdateSmtpTemplateSender](docs/UpdateSmtpTemplateSender.md) - [UpdateWebhook](docs/UpdateWebhook.md) + - [UpdateWhatsAppCampaign](docs/UpdateWhatsAppCampaign.md) - [UploadImageModel](docs/UploadImageModel.md) - [UploadImageToGallery](docs/UploadImageToGallery.md) - [VariablesItems](docs/VariablesItems.md) @@ -595,4 +671,3 @@ r, err := client.Service.Operation(auth, args) contact@brevo.com -# brevo-go diff --git a/api/swagger.yaml b/api/swagger.yaml index 92fa7ad..061e908 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -11,7 +11,8 @@ info: \ |\n | 400 | Error. Bad Request |\n | 401 | Error. Authentication Needed\ \ |\n | 402 | Error. Not enough credit, plan upgrade needed |\n | 403 |\ \ Error. Permission denied |\n | 404 | Error. Object does not exist |\n |\ - \ 405 | Error. Method not allowed |\n | 406 | Error. Not Acceptable |\n" + \ 405 | Error. Method not allowed |\n | 406 | Error. Not Acceptable |\n \ + \ | 422 | Error. Unprocessable Entity |\n" version: "3.0.0" title: "Brevo API" contact: @@ -67,7 +68,9 @@ paths: - name: "statistics" in: "query" description: "Filter on the type of statistics required. Example **globalStats**\ - \ value will only fetch globalStats info of the campaign in returned response." + \ value will only fetch globalStats info of the campaign in returned response.This\ + \ option only returns data for events occurred in the last 6 months.For\ + \ older campaigns, it’s advisable to use the **Get Campaign Report** endpoint." required: false type: "string" enum: @@ -149,6 +152,7 @@ paths: - id: 12 name: "EN - Sales Summer 2017" subject: "20% OFF for 2017 Summer Sales" + previewText: "Don't miss the sale!" type: "classic" status: "sent" scheduledAt: "2017-06-01T12:30:00Z" @@ -235,6 +239,7 @@ paths: - id: 22 name: "Weekly - 1" subject: "Week 1 - Newsletter" + previewText: "your weekly newsletter!" type: "Classic" status: "draft" scheduledAt: "" @@ -386,6 +391,7 @@ paths: id: 22 name: "Weekly - 1" subject: "Week 1 - Newsletter" + previewText: "your weekly newsletter!" type: "classic" status: "draft" scheduledAt: "2017-09-22T12:30:00Z" @@ -1020,18 +1026,18 @@ paths: \

This is the actual html content sent

" schema: $ref: "#/definitions/getTransacEmailContent" - /smtp/log/{messageId}: + /smtp/log/{identifier}: delete: tags: - "Transactional emails" summary: "Delete an SMTP transactional log" parameters: - - name: "messageId" + - name: "identifier" in: "path" - description: "MessageId of the transactional log to delete" + description: "MessageId or Email of the transactional log(s) to delete" required: true type: "string" - x-exportParamName: "MessageId" + x-exportParamName: "Identifier" responses: "204": description: "Transactional Logs deleted" @@ -2040,6 +2046,32 @@ paths: - "desc" x-exportParamName: "Sort" x-optionalDataType: "String" + - name: "segmentId" + in: "query" + description: "Id of the segment. **Either listIds or segmentId can be passed.**" + required: false + type: "integer" + format: "int64" + x-exportParamName: "SegmentId" + x-optionalDataType: "Int64" + - name: "listIds" + in: "query" + description: "Ids of the list. **Either listIds or segmentId can be passed.**" + required: false + type: "array" + items: + type: "integer" + format: "int64" + x-exportParamName: "ListIds" + - name: "filter" + in: "query" + description: "Filter the contacts on the basis of attributes. **Allowed operator:\ + \ equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1,\ + \ true), filter=equals(DOB, \"1989-11-23\"))**\n" + required: false + type: "string" + x-exportParamName: "Filter" + x-optionalDataType: "String" responses: "200": description: "All contacts listed" @@ -2353,10 +2385,6 @@ paths: description: "Contact campaign statistics informations" examples: application/json: - from: "sendermail@example.com" - tags: - - "tag1" - - "tag2" messagesSent: - campaignId: 21 eventTime: "2016-05-03T20:15:13Z" @@ -2481,6 +2509,7 @@ paths: - "category" - "calculated" - "global" + - "normal" x-exportParamName: "AttributeCategory" - name: "attributeName" in: "path" @@ -2948,6 +2977,26 @@ paths: type: "integer" format: "int64" x-exportParamName: "ListId" + - name: "startDate" + in: "query" + description: "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" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "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" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" responses: "200": description: "List informations" @@ -2955,6 +3004,8 @@ paths: application/json: id: 12 name: "Newsletter_Weekly" + startDate: "2023-10-0T00:00:00Z" + endDate: "2023-04-0T00:00:00Z" totalSubscribers: 6533 totalBlacklisted: 63 uniqueSubscribers: 6596 @@ -3278,7 +3329,8 @@ paths: - "Contacts" summary: "Import contacts" description: "It returns the background process ID which on completion calls\ - \ the notify URL that you have set in the input." + \ the notify URL that you have set in the input.\n\n**Note**:\n- Any contact\ + \ attribute that doesn't exist in your account will be ignored at import end.\n" operationId: "importContacts" parameters: - in: "body" @@ -3806,6 +3858,7 @@ paths: replied: 8 accepted: 6 rejected: 14 + skipped: 3 schema: $ref: "#/definitions/getTransacAggregatedSmsReport" "400": @@ -3879,6 +3932,7 @@ paths: replied: 5091 accepted: 2318 rejected: 0 + skipped: 1 - date: "2017-05-01" requests: 18812 delivered: 17499 @@ -3889,6 +3943,7 @@ paths: replied: 10089 accepted: 4393 rejected: 0 + skipped: 0 - date: "2017-05-02" requests: 14321 delivered: 13427 @@ -3899,6 +3954,7 @@ paths: replied: 11563 accepted: 4689 rejected: 0 + skipped: 1 schema: $ref: "#/definitions/getTransacSmsReport" "400": @@ -3979,6 +4035,7 @@ paths: - "replies" - "blocked" - "rejected" + - "skipped" x-exportParamName: "Event" x-optionalDataType: "String" - name: "tags" @@ -4100,6 +4157,37 @@ paths: description: "Campaign Id not found" schema: $ref: "#/definitions/errorModel" + put: + tags: + - "WhatsApp Campaigns" + summary: "Update a WhatsApp campaign" + operationId: "updateWhatsAppCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "whatsAppCampaign" + description: "values to update WhatsApp Campaign" + required: false + schema: + $ref: "#/definitions/updateWhatsAppCampaign" + x-exportParamName: "WhatsAppCampaign" + responses: + "204": + description: "WhatsApp Campaign has been updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign id not found" + schema: + $ref: "#/definitions/errorModel" delete: tags: - "WhatsApp Campaigns" @@ -4135,8 +4223,7 @@ paths: in: "query" description: "**Mandatory if endDate is used**. Starting (urlencoded) UTC\ \ date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created.\n\ - **Prefer to pass your timezone in date-time format for accurate result**\ - \ \n" + **Prefer to pass your timezone in date-time format for accurate result**\n" required: false type: "string" x-exportParamName: "StartDate" @@ -4145,8 +4232,7 @@ paths: in: "query" description: "**Mandatory if startDate is used**. Ending (urlencoded) UTC\ \ date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created.\n\ - **Prefer to pass your timezone in date-time format for accurate result**\ - \ \n" + **Prefer to pass your timezone in date-time format for accurate result**\n" required: false type: "string" x-exportParamName: "EndDate" @@ -4183,6 +4269,16 @@ paths: - "desc" x-exportParamName: "Sort" x-optionalDataType: "String" + - name: "source" + in: "query" + description: "source of the template" + required: false + type: "string" + enum: + - "Automation" + - "Conversations" + x-exportParamName: "Source" + x-optionalDataType: "String" responses: "200": description: "WhatsApp templates informations" @@ -4352,6 +4448,27 @@ paths: description: "bad request" schema: $ref: "#/definitions/errorModel" + /whatsappCampaigns/template/approval/{templateId}: + post: + tags: + - "WhatsApp Campaigns" + summary: "Send your WhatsApp template for approval" + operationId: "sendWhatsAppTemplateApproval" + parameters: + - name: "templateId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + responses: + "200": + description: "WhatsApp template sent for approval" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" /whatsappCampaigns/config: get: tags: @@ -4659,7 +4776,7 @@ paths: tags: - "Domains" summary: "Validate domain configuration" - operationId: "getDomainonfiguration" + operationId: "getDomainConfiguration" parameters: - name: "domainName" in: "path" @@ -4671,7 +4788,7 @@ paths: "200": description: "domain configuration" schema: - $ref: "#/definitions/getDomainonfigurationModel" + $ref: "#/definitions/getDomainConfigurationModel" "400": description: "bad request" schema: @@ -4908,10 +5025,10 @@ paths: post: tags: - "Webhooks" - summary: "Export all transactional events" + summary: "Export all webhook events" description: "This endpoint will submit a request to get the history of webhooks\ - \ in the CSV file. The link to download that CSV file will send to the webhook\ - \ link provided in notifyURL of the body payload." + \ in the CSV file. The link to download the CSV file will be sent to the webhook\ + \ that was provided in the notifyURL." operationId: "exportWebhooksHistory" parameters: - in: "body" @@ -5610,6 +5727,7 @@ paths: get: tags: - "Account" + - "Master account" summary: "Get user activity logs" operationId: "getAccountActivity" parameters: @@ -5675,6 +5793,308 @@ paths: description: "bad request" schema: $ref: "#/definitions/errorModel" + /organization/invited/users: + get: + tags: + - "User" + summary: "Get the list of all your users" + operationId: "getInvitedUsersList" + parameters: [] + responses: + "200": + description: "list of all your users" + examples: + application/json: + users: + - email: "owner@company.com" + is_owner: true + status: "active" + feature_access: + marketing: "owner" + conversations: "owner" + crm: "owner" + - email: "pendingInvitedUser@company.com" + is_owner: false + status: "pending" + feature_access: + marketing: "custom" + conversations: "none" + crm: "full" + - email: "connectedInvitedUser@company.com" + is_owner: false + status: "active" + feature_access: + marketing: "none" + conversations: "full" + crm: "none" + schema: + $ref: "#/definitions/getInvitedUsersList" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /organization/user/{email}/permissions: + get: + tags: + - "User" + summary: "Check user permission" + operationId: "getUserPermission" + parameters: + - name: "email" + in: "path" + description: "Email of the invited user." + required: true + type: "string" + x-exportParamName: "Email" + responses: + "200": + description: "list of all the user's permissions" + examples: + application/json: + email: "invitedUser@company.com" + status: "active" + privileges: + - feature: "Email campaign" + permissions: + - "Create / edit / delete" + - "Send / schedule / suspend" + - feature: "Templates" + permissions: + - "Create / edit / delete" + - "Activate / deactivate" + - feature: "SMS campaign" + permissions: + - "Create / edit / delete" + - "Send / schedule / suspend" + - feature: "Facebook Ads" + permissions: + - "Schedule / pause" + - feature: "Landing pages" + permissions: + - "All" + - feature: "Workflows" + permissions: + - "Create / edit / delete" + - "Activate / deactivate / Pause" + - feature: "Contacts" + permissions: + - "View" + - "Contact forms" + - feature: "SMTP & API" + permissions: + - "SMTP" + - "API Keys" + - "Authorized IPs" + - feature: "User management" + permissions: + - "None" + - feature: "Sales Platform" + permissions: + - "Create / edit / delete owned deals and tasks" + - "Manage deals and tasks from other users" + - "Reports" + - "Settings" + - feature: "Conversations" + permissions: + - "None" + - feature: "Senders, Domains & Dedicated IPs" + permissions: + - "Senders management" + - "Domains management" + - "Dedicated IPs management" + - feature: "Push" + permissions: + - "View" + - "Create / edit / delete" + - "Send" + - "Settings" + - feature: "Companies" + permissions: + - "Create / edit / delete owned companies" + - "Manage companies from other users" + - "Settings" + schema: + $ref: "#/definitions/getUserPermission" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /organization/user/invitation/revoke/{email}: + put: + tags: + - "User" + summary: "Revoke user permission" + operationId: "putRevokeUserPermission" + parameters: + - name: "email" + in: "path" + description: "Email of the invited user." + required: true + type: "string" + x-exportParamName: "Email" + responses: + "200": + description: "Success" + examples: + application/json: + status: "OK" + credit_notes: + - "TEST-123" + schema: + $ref: "#/definitions/putRevokeUserPermission" + "403": + description: "Unauthorized access" + schema: + $ref: "#/definitions/errorModel" + /organization/user/invitation/{action}/{email}: + put: + tags: + - "User" + summary: "Resend / Cancel invitation" + operationId: "putresendcancelinvitation" + parameters: + - name: "action" + in: "path" + description: "action" + required: true + type: "string" + enum: + - "resend" + - "cancel" + x-exportParamName: "Action" + - name: "email" + in: "path" + description: "Email of the invited user." + required: true + type: "string" + x-exportParamName: "Email" + responses: + "200": + description: "Success" + examples: + application/json: + status: "OK" + credit_notes: + - "TEST-123" + schema: + $ref: "#/definitions/putresendcancelinvitation" + "403": + description: "Unauthorized access" + schema: + $ref: "#/definitions/errorModel" + /organization/user/invitation/send: + post: + tags: + - "User" + summary: "Send invitation to user" + description: "`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.\n\n`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.\n\ + \nFeatures and their respective permissions are as below:\n\n- `email_campaigns`:\n\ + \ - \"create_edit_delete\"\n - \"send_schedule_suspend\"\n- `sms_campaigns`:\n\ + \ - \"create_edit_delete\"\n - \"send_schedule_suspend\"\n- `contacts`:\n\ + \ - \"view\"\n - \"create_edit_delete\"\n - \"import\"\n - \"export\"\n\ + \ - \"list_and_attributes\"\n - \"forms\"\n- `templates`:\n - \"create_edit_delete\"\ + \n - \"activate_deactivate\"\n- `workflows`:\n - \"create_edit_delete\"\n\ + \ - \"activate_deactivate_pause\"\n - \"settings\"\n- `facebook_ads`:\n\ + \ - \"create_edit_delete\"\n - \"schedule_pause\"\n- `landing_pages`:\n\ + \ - \"all\"\n- `transactional_emails`:\n - \"settings\"\n - \"logs\"\n\ + - `smtp_api`:\n - \"smtp\"\n - \"api_keys\"\n - \"authorized_ips\"\n- `user_management`:\n\ + \ - \"all\"\n- `sales_platform`:\n - \"manage_owned_deals_tasks\"\n - \"\ + manage_others_deals_tasks\"\n - \"reports\"\n - \"settings\"\n- `phone`:\n\ + \ - \"all\"\n- `conversations`:\n - \"access\"\n - \"assign\"\n - \"configure\"\ + \n- `senders_domains_dedicated_ips`:\n - \"senders_management\"\n - \"domains_management\"\ + \n - \"dedicated_ips_management\"\n- `push_notifications`:\n - \"view\"\n\ + \ - \"create_edit_delete\"\n - \"send\"\n - \"settings\"\n- `companies`:\n\ + \ - \"manage_owned_companies\"\n - \"manage_other_companies\"\n - \"settings\"\ + \n\n**Note**:\n- 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.\n- The availability of feature and its permission\ + \ depends on your current plan. Please select the features and permissions\ + \ accordingly.\n" + operationId: "inviteuser" + parameters: + - in: "body" + name: "sendInvitation" + description: "Values to create an invitation" + required: true + schema: + $ref: "#/definitions/inviteuser" + x-exportParamName: "SendInvitation" + responses: + "200": + description: "Success" + examples: + application/json: + status: "OK" + invoice_id: "TEST-123" + schema: + $ref: "#/definitions/inviteuser" + "400": + description: "Bad request" + schema: + $ref: "#/definitions/errorModel" + /organization/user/update/permissions: + post: + tags: + - "User" + summary: "Update permission for a user" + description: "`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.\n\n`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.\n\ + \nFeatures and their respective permissions are as below:\n\n- `email_campaigns`:\n\ + \ - \"create_edit_delete\"\n - \"send_schedule_suspend\"\n- `sms_campaigns`:\n\ + \ - \"create_edit_delete\"\n - \"send_schedule_suspend\"\n- `contacts`:\n\ + \ - \"view\"\n - \"create_edit_delete\"\n - \"import\"\n - \"export\"\n\ + \ - \"list_and_attributes\"\n - \"forms\"\n- `templates`:\n - \"create_edit_delete\"\ + \n - \"activate_deactivate\"\n- `workflows`:\n - \"create_edit_delete\"\n\ + \ - \"activate_deactivate_pause\"\n - \"settings\"\n- `facebook_ads`:\n\ + \ - \"create_edit_delete\"\n - \"schedule_pause\"\n- `landing_pages`:\n\ + \ - \"all\"\n- `transactional_emails`:\n - \"settings\"\n - \"logs\"\n\ + - `smtp_api`:\n - \"smtp\"\n - \"api_keys\"\n - \"authorized_ips\"\n- `user_management`:\n\ + \ - \"all\"\n- `sales_platform`:\n - \"manage_owned_deals_tasks\"\n - \"\ + manage_others_deals_tasks\"\n - \"reports\"\n - \"settings\"\n- `phone`:\n\ + \ - \"all\"\n- `conversations`:\n - \"access\"\n - \"assign\"\n - \"configure\"\ + \n- `senders_domains_dedicated_ips`:\n - \"senders_management\"\n - \"domains_management\"\ + \n - \"dedicated_ips_management\"\n- `push_notifications`:\n - \"view\"\n\ + \ - \"create_edit_delete\"\n - \"send\"\n - \"settings\"\n- `companies`:\n\ + \ - \"manage_owned_companies\"\n - \"manage_other_companies\"\n - \"settings\"\ + \n\n**Note**:\n- The privileges array remains the same as in the send invitation;\ + \ the user simply needs to provide the permissions that need to be updated.\n\ + - The availability of feature and its permission depends on your current plan.\ + \ Please select the features and permissions accordingly.\n" + operationId: "EditUserPermission" + parameters: + - in: "body" + name: "updatePermissions" + description: "Values to update permissions for an invited user" + required: true + schema: + $ref: "#/definitions/inviteuser" + x-exportParamName: "UpdatePermissions" + responses: + "200": + description: "Success" + examples: + application/json: + status: "OK" + invoice_id: "TEST-123" + credit_notes: + - "TEST-123" + schema: + $ref: "#/definitions/inviteuser" + "403": + description: "Access Denied" + schema: + $ref: "#/definitions/errorModel" /processes: get: tags: @@ -5977,14 +6397,21 @@ paths: companyName: "Company1" active: true createdAt: 1629439311 + groups: + - id: "5f8f8c3b5f56a02d4433b3a8" + name: "Group 1" + - id: "4fbf3c3b1f56a02ac465b1a0" + name: "Group 2" - id: 3984002 companyName: "Company2" active: true createdAt: 1629439311 + groups: [] - id: 3524191 companyName: "Company3" active: true createdAt: 1614713641 + groups: [] schema: $ref: "#/definitions/subAccountsResponse" "400": @@ -6043,12 +6470,22 @@ paths: name: "Uday Pandit" email: "uday+1@brevo.com" companyName: "API-Sub-26thOct21-4" + groups: + - id: "5f8f8c3b5f56a02d4433b3a7" + name: "Group 1" + - id: "5f8f8c3b5f56a02d4433b3a8" + name: "Group 2" planInfo: credits: - sms: 1234 emails: quantity: 2000 remaining: 1955 + sms: + quantity: 2000 + remaining: 1955 + wpSubscribers: + quantity: 2000 + remaining: 1955 features: inbox: quantity: 20 @@ -6094,7 +6531,10 @@ paths: tags: - "Master account" summary: "Update sub-account plan" - description: "This endpoint will update the sub-account plan" + description: "This endpoint will update the sub-account plan. On the Corporate\ + \ solution new version v2, you can set an unlimited number of credits in your\ + \ sub-organization. Please pass the value “-1\" to set the consumable in unlimited\ + \ mode." parameters: - name: "id" in: "path" @@ -6125,11 +6565,51 @@ paths: message: "Access forbidden." schema: $ref: "#/definitions/errorModel" + /corporate/ssoToken: + post: + tags: + - "Master account" + summary: "Generate SSO token to access admin account" + description: "This endpoint generates an SSO token to authenticate and access\ + \ the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token],\ + \ where [token] will be replaced by the actual token." + parameters: + - in: "body" + name: "ssoTokenRequestCorporate" + description: "User email of admin account" + required: true + schema: + $ref: "#/definitions/ssoTokenRequestCorporate" + x-exportParamName: "SsoTokenRequestCorporate" + responses: + "200": + description: "Session token" + examples: + application/json: + token: "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0" + schema: + $ref: "#/definitions/getSsoToken" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid email address" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not an admin account" + examples: + application/json: + code: "permission_denied" + message: "Access forbidden." + schema: + $ref: "#/definitions/errorModel" /corporate/subAccount/ssoToken: post: tags: - "Master account" - summary: "Generate SSO token to access Brevo" + summary: "Generate SSO token to access sub-account" description: "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." @@ -6263,52 +6743,514 @@ paths: message: "id should be a positive number" schema: $ref: "#/definitions/errorModel" - /companies: - get: + /corporate/subAccount/{id}/applications/toggle: + put: tags: - - "Companies" - summary: "Get all companies" + - "Master account" + summary: "Enable/disable sub-account application(s)" + description: "API endpoint for the Corporate owner to enable/disable applications\ + \ on the sub-account" parameters: - - name: "filters" - in: "query" - description: "Filter by attrbutes. If you have filter for owner on your side\ - \ please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"}" - required: false - type: "string" - x-exportParamName: "Filters" - x-optionalDataType: "String" - - name: "linkedContactsIds" - in: "query" - description: "Filter by linked contacts ids" - required: false - type: "integer" - format: "int64" - x-exportParamName: "LinkedContactsIds" - x-optionalDataType: "Int64" - - name: "linkedDealsIds" - in: "query" - description: "Filter by linked deals ids" - required: false - type: "string" - format: "objectID" - x-exportParamName: "LinkedDealsIds" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "Index of the first document of the page" - required: false - type: "integer" - format: "int64" - x-exportParamName: "Page" - x-optionalDataType: "Int64" - - name: "limit" - in: "query" - description: "Number of documents per page" - required: false + - name: "id" + in: "path" + description: "Id of the sub-account organization (mandatory)" + required: true type: "integer" - default: 50 format: "int64" - x-exportParamName: "Limit" + x-exportParamName: "Id" + - in: "body" + name: "toggleApplications" + description: "List of applications to activate or deactivate on a sub-account" + required: true + schema: + $ref: "#/definitions/subAccountAppsToggleRequest" + x-exportParamName: "ToggleApplications" + responses: + "204": + description: "Sub-account application(s) enabled/disabled" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a master account" + examples: + application/json: + code: "permission_denied" + message: "Access forbidden." + schema: + $ref: "#/definitions/errorModel" + /corporate/group: + post: + tags: + - "Master account" + summary: "Create a new group of sub-accounts" + description: "This endpoint allows to create a group of sub-accounts" + parameters: + - in: "body" + name: "body" + description: "Group details to be created." + required: true + schema: + $ref: "#/definitions/body" + x-exportParamName: "Body" + responses: + "201": + description: "Group ID" + examples: + application/json: + id: "659xxxxxxxxxxxxxxxx6ef9c8" + schema: + $ref: "#/definitions/inline_response_201" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + /corporate/subAccount/ip/associate: + post: + tags: + - "Master account" + summary: "Associate an IP to sub-accounts" + description: "This endpoint allows to associate an IP to sub-accounts" + parameters: + - in: "body" + name: "body" + description: "Ip address association details" + required: true + schema: + $ref: "#/definitions/body_1" + x-exportParamName: "Body" + responses: + "201": + description: "IP has been associated with sub-accounts successfully" + examples: + application/json: [] + schema: + type: "object" + "400": + description: "bad request" + examples: + application/json: + code: "Invalid id." + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + /corporate/subAccount/ip/dissociate: + put: + tags: + - "Master account" + summary: "Dissociate an IP from sub-accounts" + description: "This endpoint allows to dissociate an IP from sub-accounts" + parameters: + - in: "body" + name: "body" + description: "Ip address dissociation details" + required: true + schema: + $ref: "#/definitions/body_2" + x-exportParamName: "Body" + responses: + "204": + description: "IP has been dissociated from sub-accounts successfully" + "400": + description: "bad request" + examples: + application/json: + code: "Invalid id." + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + /corporate/group/{id}: + get: + tags: + - "Master account" + summary: "GET a group details" + description: "This endpoint allows you to retrieve a specific group’s information\ + \ such as the list of sub-organizations and the user associated with the group." + parameters: + - name: "id" + in: "path" + description: "Id of the group of sub-organization" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Group details" + examples: + application/json: + group: + id: "5f926dba72a405440a4efc97" + groupName: "My group" + createdAt: "2024-02-09T06:14:40+00:00" + sub-accounts: + - id: "7866556" + companyName: "My sub organization" + createdAt: "2024-02-09T06:14:40+00:00" + - id: "6563051" + companyName: "Your sub organization" + createdAt: "2024-01-05T03:11:40+00:00" + users: + - email: "my-user@my-org.com" + lastName: "Smith" + firstName: "John" + - email: "your-user@your-org.com" + schema: + $ref: "#/definitions/corporateGroupDetailsResponse" + put: + tags: + - "Master account" + summary: "Update a group of sub-accounts" + description: "This endpoint allows you to update a group of sub-accounts" + parameters: + - name: "id" + in: "path" + description: "Id of the group" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Group details to be updated." + required: true + schema: + $ref: "#/definitions/body_3" + x-exportParamName: "Body" + responses: + "204": + description: "Group details updated" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Master account" + summary: "Delete a group" + description: "This endpoint allows you to delete a group of sub-organizations.\ + \ When a group is deleted, the sub-organizations are no longer part of this\ + \ group. The users associated with the group are no longer associated with\ + \ the group once deleted." + parameters: + - name: "id" + in: "path" + description: "Id of the group" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Group deleted" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + /corporate/group/unlink/{groupId}/subAccounts: + put: + tags: + - "Master account" + summary: "Delete sub-account from group" + description: "This endpoint allows you to remove a sub-organization from a group." + parameters: + - name: "groupId" + in: "path" + description: "Id of the group" + required: true + type: "string" + x-exportParamName: "GroupId" + - in: "body" + name: "body" + description: "List of sub-account ids" + required: true + schema: + $ref: "#/definitions/body_4" + x-exportParamName: "Body" + responses: + "204": + description: "SubAccounts removed from the group" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "subAccountIds should be array of numeric ids only" + schema: + $ref: "#/definitions/errorModel" + /corporate/user/invitation/send: + post: + tags: + - "Master account" + summary: "Send invitation to an admin user" + description: "`This endpoint allows you to invite a member to manage the Admin\ + \ account\n\nFeatures and their respective permissions are as below:\n\n-\ + \ `my_plan`:\n - \"all\"\n- `api`:\n - \"none\"\n- `user_management`:\n\ + \ - \"all\"\n- `app_management` | Not available in ENTv2:\n - \"all\"\n\n\ + **Note**:\n- 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.\n" + operationId: "inviteAdminUser" + parameters: + - in: "body" + name: "sendInvitation" + description: "Payload to send an invitation" + required: true + schema: + $ref: "#/definitions/inviteAdminUser" + x-exportParamName: "SendInvitation" + responses: + "200": + description: "Success" + examples: + application/json: + id: "2b4xxxxxxxxxxxxxxxxxxxxxda4" + schema: + $ref: "#/definitions/inviteAdminUser" + "400": + description: "Bad request" + schema: + $ref: "#/definitions/errorModel" + /corporate/user/invitation/{action}/{email}: + put: + tags: + - "Master account" + summary: "Resend / cancel admin user invitation" + description: "This endpoint will allow the user to:\n- Resend an admin user\ + \ invitation\n- Cancel an admin user invitation\n" + parameters: + - name: "action" + in: "path" + description: "Action to be performed (cancel / resend)" + required: true + type: "string" + x-exportParamName: "Action" + - name: "email" + in: "path" + description: "Email address of the recipient" + required: true + type: "string" + x-exportParamName: "Email" + responses: + "200": + description: "Response of the action performed" + examples: + application/json: + message: "Invitation resent successfully" + schema: + $ref: "#/definitions/inline_response_200" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invitation not found" + schema: + $ref: "#/definitions/errorModel" + /corporate/user/revoke/{email}: + delete: + tags: + - "Master account" + summary: "Revoke an admin user" + description: "This endpoint allows to revoke/remove an invited member of your\ + \ Admin account" + parameters: + - name: "email" + in: "path" + description: "Email of the invited user" + required: true + type: "string" + x-exportParamName: "Email" + responses: + "204": + description: "User revoked" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid request" + schema: + $ref: "#/definitions/errorModel" + /corporate/invited/users: + get: + tags: + - "Master account" + summary: "Get the list of all admin users" + description: "This endpoint allows you to list all Admin users of your Admin\ + \ account" + operationId: "getCorporateInvitedUsersList" + parameters: [] + responses: + "200": + description: "list of all admin users" + examples: + application/json: + users: + - groups: + - id: "65b1f22c09d6ed67ef1cd123" + name: "Test Group1" + - id: "43b1f16c09db4d67af1cd342" + name: "Test Group2" + email: "master-user2@company.com" + is_owner: false + status: "active" + feature_access: + user_management: + - "none" + api_keys: + - "none" + my_plan: + - "all" + apps_management: + - "all" + - groups: [] + email: "master-user3@company.com" + is_owner: false + status: "active" + feature_access: + user_management: + - "all" + api_keys: + - "none" + my_plan: + - "all" + apps_management: + - "all" + schema: + $ref: "#/definitions/getCorporateInvitedUsersList" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /corporate/user/{email}/permissions: + get: + tags: + - "Master account" + summary: "Check admin user permissions" + operationId: "getCorporateUserPermission" + parameters: + - name: "email" + in: "path" + description: "Email of the invited user" + required: true + type: "string" + x-exportParamName: "Email" + responses: + "200": + description: "List of user's permissions" + examples: + application/json: + email: "test@email.com" + status: "active" + groups: + - id: "6543ab3667ffbb00142e4486" + name: "Support" + - id: "174bab366732bbce142e4412" + name: "Technical" + feature_access: + api_keys: + - "all" + my_plan: + - "all" + user_management: + - "none" + apps_management: + - "all" + schema: + $ref: "#/definitions/getCorporateUserPermission" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid email address" + schema: + $ref: "#/definitions/errorModel" + /corporate/groups: + get: + tags: + - "Master account" + summary: "Get the list of groups" + description: "This endpoint allows you to list all groups created on your Admin\ + \ account." + operationId: "getSubAccountGroups" + parameters: [] + responses: + "200": + description: "list of all the sub-account groups" + examples: + application/json: + - id: "d3b142c709d6ed67ef1cd903" + groupName: "My group 1" + - id: "a5b192a709d6ed67ef8fd922" + groupName: "My group 2" + - id: "bbb142c709d6ed67ef1cd910" + groupName: "My group 3" + schema: + type: "array" + items: + $ref: "#/definitions/inline_response_200_1" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /companies: + get: + tags: + - "Companies" + summary: "Get all companies" + parameters: + - name: "filters" + in: "query" + description: "Filter by attrbutes. If you have filter for owner on your side\ + \ please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"}" + required: false + type: "string" + x-exportParamName: "Filters" + x-optionalDataType: "String" + - name: "linkedContactsIds" + in: "query" + description: "Filter by linked contacts ids" + required: false + type: "integer" + format: "int64" + x-exportParamName: "LinkedContactsIds" + x-optionalDataType: "Int64" + - name: "linkedDealsIds" + in: "query" + description: "Filter by linked deals ids" + required: false + type: "string" + format: "objectID" + x-exportParamName: "LinkedDealsIds" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Page" + x-optionalDataType: "Int64" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + format: "int64" + x-exportParamName: "Limit" x-optionalDataType: "Int64" - name: "sort" in: "query" @@ -6351,13 +7293,13 @@ paths: description: "Company create data." required: true schema: - $ref: "#/definitions/body" + $ref: "#/definitions/body_5" x-exportParamName: "Body" responses: "200": description: "Created new company" schema: - $ref: "#/definitions/inline_response_200" + $ref: "#/definitions/inline_response_200_2" "400": description: "Returned when invalid data posted" /companies/{id}: @@ -6432,7 +7374,7 @@ paths: description: "Updated company details." required: true schema: - $ref: "#/definitions/body_1" + $ref: "#/definitions/body_6" x-exportParamName: "Body" responses: "200": @@ -6480,7 +7422,7 @@ paths: description: "Linked / Unlinked contacts and deals ids." required: true schema: - $ref: "#/definitions/body_2" + $ref: "#/definitions/body_7" x-exportParamName: "Body" responses: "204": @@ -6498,12 +7440,56 @@ paths: tags: - "Deals" summary: "Get pipeline stages" + description: "This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID}\ + \ instead." parameters: [] responses: "200": description: "Returns list of pipeline stages" schema: $ref: "#/definitions/Pipeline" + deprecated: true + /crm/pipeline/details/{pipelineID}: + get: + tags: + - "Deals" + summary: "Get a pipeline" + parameters: + - name: "pipelineID" + in: "path" + required: true + type: "string" + x-exportParamName: "PipelineID" + responses: + "200": + description: "Returns pipeline and its details" + schema: + $ref: "#/definitions/Pipelines" + "400": + description: "Returned when pipeline id is invalid or does not exist" + examples: + application/json: + message: "Pipeline not found" + schema: + $ref: "#/definitions/errorModel" + /crm/pipeline/details/all: + get: + tags: + - "Deals" + summary: "Get all pipelines" + parameters: [] + responses: + "200": + description: "Returns list of pipelines and its details" + schema: + $ref: "#/definitions/Pipelines" + "400": + description: "Returned when pipeline id is invalid or does not exist" + examples: + application/json: + message: "Pipeline not found" + schema: + $ref: "#/definitions/errorModel" /crm/attributes/deals: get: tags: @@ -6521,13 +7507,14 @@ paths: - "Deals" summary: "Get all deals" parameters: - - name: "filters[attributes]" + - name: "filters[attributes.deal_name]" in: "query" - description: "Filter by attrbutes. If you have filter for owner on your side\ - \ please send it as `attributes.owner`.\"" + description: "Filter by attributes. If you have a filter for the owner on\ + \ your end, please send it as filters[attributes.deal_owner] and utilize\ + \ the account email for the filtering." required: false type: "string" - x-exportParamName: "FiltersAttributes" + x-exportParamName: "FiltersAttributesDealName" x-optionalDataType: "String" - name: "filters[linkedCompaniesIds]" in: "query" @@ -6601,13 +7588,13 @@ paths: description: "Deal create data." required: true schema: - $ref: "#/definitions/body_3" + $ref: "#/definitions/body_8" x-exportParamName: "Body" responses: "201": description: "Created new Deal" schema: - $ref: "#/definitions/inline_response_201" + $ref: "#/definitions/inline_response_201_1" "400": description: "Returned when invalid data posted" /crm/deals/{id}: @@ -6682,7 +7669,7 @@ paths: description: "Updated deal details." required: true schema: - $ref: "#/definitions/body_4" + $ref: "#/definitions/body_9" x-exportParamName: "Body" responses: "204": @@ -6717,7 +7704,7 @@ paths: description: "Linked / Unlinked contacts and companies ids." required: true schema: - $ref: "#/definitions/body_5" + $ref: "#/definitions/body_10" x-exportParamName: "Body" responses: "204": @@ -6731,6 +7718,47 @@ paths: message: "Not valid data." schema: $ref: "#/definitions/errorModel" + /crm/deals/import: + post: + tags: + - "Deals" + summary: "Import deals(creation and updation)" + description: "Import deals from a CSV file with mapping options." + consumes: + - "multipart/form-data" + parameters: + - name: "file" + in: "formData" + description: "The CSV file to upload.The file should have the first row as\ + \ the mapping attribute. Some default attribute names are\n(a) deal_id [brevo\ + \ mongoID to update deals]\n(b) associated_contact\n(c) associated_company\n\ + (f) any other attribute with internal name\n" + required: true + type: "file" + format: "binary" + x-exportParamName: "File" + - name: "mapping" + in: "formData" + description: "The mapping options in JSON format.\n json\n {\n \"\ + link_entities\": true, // Determines whether to link related entities during\ + \ the import process\n \"unlink_entities\": false, //Determines whether\ + \ to unlink related entities during the import process.\n \"update_existing_records\"\ + : true, // Determines whether to update based on deal ID or treat every\ + \ row as create\n \"unset_empty_attributes\": false // Determines whether\ + \ unset a specific attribute during update if values input is blank\n \ + \ }\n" + required: true + type: "string" + x-exportParamName: "Mapping" + responses: + "200": + description: "Successfully imported deals" + schema: + $ref: "#/definitions/inline_response_200_3" + "400": + description: "Bad request" + schema: + $ref: "#/definitions/inline_response_400" /crm/tasktypes: get: tags: @@ -6780,7 +7808,8 @@ paths: x-optionalDataType: "String" - name: "filter[assignTo]" in: "query" - description: "Filter by assignTo id" + description: "Filter by the \"assignTo\" ID. You can utilize account emails\ + \ for the \"assignTo\" attribute." required: false type: "string" x-exportParamName: "FilterAssignTo" @@ -6878,13 +7907,13 @@ paths: description: "Task name." required: true schema: - $ref: "#/definitions/body_6" + $ref: "#/definitions/body_11" x-exportParamName: "Body" responses: "201": description: "Created new task" schema: - $ref: "#/definitions/inline_response_201_1" + $ref: "#/definitions/inline_response_201_2" "400": description: "Returned when invalid data posted" /crm/tasks/{id}: @@ -6959,7 +7988,7 @@ paths: description: "Updated task details." required: true schema: - $ref: "#/definitions/body_7" + $ref: "#/definitions/body_12" x-exportParamName: "Body" responses: "204": @@ -7419,7 +8448,7 @@ paths: description: "Message fields." required: true schema: - $ref: "#/definitions/body_8" + $ref: "#/definitions/body_13" x-exportParamName: "Body" responses: "200": @@ -7486,7 +8515,7 @@ paths: name: "body" required: false schema: - $ref: "#/definitions/body_9" + $ref: "#/definitions/body_14" x-exportParamName: "Body" responses: "200": @@ -7549,7 +8578,7 @@ paths: name: "body" required: true schema: - $ref: "#/definitions/body_10" + $ref: "#/definitions/body_15" x-exportParamName: "Body" responses: "200": @@ -7612,7 +8641,7 @@ paths: name: "body" required: true schema: - $ref: "#/definitions/body_11" + $ref: "#/definitions/body_16" x-exportParamName: "Body" responses: "200": @@ -7674,7 +8703,7 @@ paths: description: "Agent fields." required: true schema: - $ref: "#/definitions/body_12" + $ref: "#/definitions/body_17" x-exportParamName: "Body" responses: "201": @@ -7697,9 +8726,268 @@ paths: "401": description: "unauthorized" schema: - $ref: "#/definitions/errorModel" - "404": - description: "api-key not found" + $ref: "#/definitions/errorModel" + "404": + description: "api-key not found" + schema: + $ref: "#/definitions/errorModel" + /ecommerce/config/displayCurrency: + get: + tags: + - "Ecommerce" + summary: "Get the ISO 4217 compliant display currency code for your Brevo account" + parameters: [] + responses: + "200": + description: "OK" + schema: + $ref: "#/definitions/inline_response_200_4" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Permission denied. eCommerce is not activated." + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Ecommerce" + summary: "Set the ISO 4217 compliant display currency code for your Brevo account" + operationId: "setConfigDisplayCurrency" + parameters: + - in: "body" + name: "setConfigDisplayCurrency" + description: "set ISO 4217 compliant display currency code payload" + required: true + schema: + $ref: "#/definitions/setConfigDisplayCurrency" + x-exportParamName: "SetConfigDisplayCurrency" + responses: + "200": + description: "OK" + schema: + $ref: "#/definitions/setConfigDisplayCurrency" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Permission denied. eCommerce is not activated." + schema: + $ref: "#/definitions/errorModel" + "422": + description: "Invalid ISO 4217 currency code." + schema: + $ref: "#/definitions/errorModel" + /ecommerce/attribution/metrics: + get: + tags: + - "Ecommerce" + summary: "Get attribution metrics for one or more Brevo campaigns" + parameters: + - name: "periodFrom" + in: "query" + description: "When getting metrics for a specific period, define the starting\ + \ datetime in RFC3339 format" + required: false + type: "string" + format: "date-time" + x-exportParamName: "PeriodFrom" + x-optionalDataType: "Time" + - name: "periodTo" + in: "query" + description: "When getting metrics for a specific period, define the end datetime\ + \ in RFC3339 format" + required: false + type: "string" + format: "date-time" + x-exportParamName: "PeriodTo" + x-optionalDataType: "Time" + - name: "emailCampaignId[]" + in: "query" + description: "The email campaign id(s) to get metrics for" + required: false + type: "array" + items: + type: "number" + format: "integer" + x-exportParamName: "EmailCampaignId" + responses: + "200": + description: "OK" + schema: + $ref: "#/definitions/inline_response_200_5" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}: + get: + tags: + - "Ecommerce" + summary: "Get detailed attribution metrics for a single Brevo campaign" + parameters: + - name: "conversionSource" + in: "path" + description: "The Brevo campaign type for which data will be retrieved" + required: true + type: "string" + enum: + - "email_campaign" + x-exportParamName: "ConversionSource" + - name: "conversionSourceId" + in: "path" + description: "The Brevo campaign id for which data will be retrieved" + required: true + type: "number" + format: "integer" + x-exportParamName: "ConversionSourceId" + responses: + "200": + description: "OK" + schema: + $ref: "#/definitions/inline_response_200_6" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /ecommerce/attribution/products/{conversionSource}/{conversionSourceId}: + get: + tags: + - "Ecommerce" + summary: "Get attributed product sales for a single Brevo campaign" + parameters: + - name: "conversionSource" + in: "path" + description: "The Brevo campaign type for which data will be retrieved" + required: true + type: "string" + enum: + - "email_campaign" + x-exportParamName: "ConversionSource" + - name: "conversionSourceId" + in: "path" + description: "The Brevo campaign id for which data will be retrieved" + required: true + type: "number" + format: "integer" + x-exportParamName: "ConversionSourceId" + responses: + "200": + description: "OK" + schema: + $ref: "#/definitions/inline_response_200_7" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /orders: + get: + tags: + - "Ecommerce" + summary: "Get order details" + description: "Get all the orders" + operationId: "getOrders" + parameters: + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + maximum: 100 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document in the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "modifiedSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "ModifiedSince" + x-optionalDataType: "String" + - name: "createdSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "CreatedSince" + x-optionalDataType: "String" + responses: + "200": + description: "orders fetched successfully" + examples: + response: + value: + orders: + - id: "order1803" + createdAt: "2021-12-31T11:42:35.638+0000" + updatedAt: "2022-03-03T14:48:31.867+0000" + contact_id: 2 + status: "complete" + amount: 2000 + storeId: "123" + billing: + address: "Sec 62, Noida" + city: "Noida" + countryCode: "IN" + country: "India" + phone: 9238283982 + postCode: 110001 + paymentMethod: "Net banking" + region: "North India" + products: + - productId: 21 + quantity: 2 + variantId: "P100" + price: 100 + - productId: 21 + quantity: 2 + variantId: "P15756" + price: 100 + email: "testvisitor@sendinblue.com" + coupons: + - "flat50" + - "flat40" + count: 1 + schema: + $ref: "#/definitions/getOrders" + "400": + description: "bad request" schema: $ref: "#/definitions/errorModel" /orders/status: @@ -7744,6 +9032,31 @@ paths: description: "bad request" schema: $ref: "#/definitions/errorModel" + /events: + post: + tags: + - "Events" + summary: "Create an event" + description: "Create an event to track a contact's interaction." + operationId: "createEvent" + parameters: + - in: "body" + name: "event" + required: true + schema: + $ref: "#/definitions/event" + x-exportParamName: "Event" + responses: + "204": + description: "An event posted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" /categories: get: tags: @@ -7797,6 +9110,24 @@ paths: type: "string" x-exportParamName: "Name" x-optionalDataType: "String" + - name: "modifiedSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "ModifiedSince" + x-optionalDataType: "String" + - name: "createdSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "CreatedSince" + x-optionalDataType: "String" responses: "200": description: "All categories listed" @@ -8000,6 +9331,24 @@ paths: items: type: "string" x-exportParamName: "Categories" + - name: "modifiedSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "ModifiedSince" + x-optionalDataType: "String" + - name: "createdSince" + in: "query" + description: "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.**\n" + required: false + type: "string" + x-exportParamName: "CreatedSince" + x-optionalDataType: "String" responses: "200": description: "All products listed" @@ -8125,6 +9474,212 @@ paths: description: "bad request" schema: $ref: "#/definitions/errorModel" + /couponCollections: + get: + tags: + - "Coupons" + summary: "Get all your coupon collections" + operationId: "getCouponCollections" + parameters: + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 50 + maximum: 100 + minimum: 0 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document on the page" + required: false + type: "integer" + default: 0 + minimum: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results by creation time in ascending/descending order" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "sortBy" + in: "query" + description: "The field used to sort coupon collections" + required: false + type: "string" + default: "createdAt" + enum: + - "createdAt" + - "remainingCoupons" + - "expirationDate" + x-exportParamName: "SortBy" + x-optionalDataType: "String" + responses: + "200": + description: "Coupon collections" + examples: + response: + value: + collections: + - id: "23befbae-1505-47a8-bd27-e30ef739f32c" + name: "Summer" + defaultCoupon: "10 OFF" + createdAt: "2017-03-12T12:30:00.000+0000" + totalCoupons: 10000 + remainingCoupons: 5000 + schema: + $ref: "#/definitions/getCouponCollection" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Record not found" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Coupons" + summary: "Create а coupon collection" + operationId: "createCouponCollection" + parameters: + - in: "body" + name: "createCouponCollection" + description: "Values to create a coupon collection" + required: true + schema: + $ref: "#/definitions/createCouponCollection" + x-exportParamName: "CreateCouponCollection" + responses: + "201": + description: "Coupon collection created" + schema: + $ref: "#/definitions/inline_response_201_3" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + /couponCollections/{id}: + get: + tags: + - "Coupons" + summary: "Get a coupon collection by id" + operationId: "getCouponCollection" + parameters: + - name: "id" + in: "path" + description: "Id of the collection to return" + required: true + type: "string" + format: "uuidv4" + x-exportParamName: "Id" + responses: + "200": + description: "Coupon collection" + examples: + response: + value: + - id: "23befbae-1505-47a8-bd27-e30ef739f32c" + name: "Summer" + defaultCoupon: "10 OFF" + createdAt: "2017-03-12T12:30:00.000+0000" + totalCoupons: 10000 + remainingCoupons: 5000 + schema: + $ref: "#/definitions/getCouponCollection" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Coupon collection not found" + schema: + $ref: "#/definitions/errorModel" + patch: + tags: + - "Coupons" + summary: "Update a coupon collection by id" + operationId: "updateCouponCollection" + parameters: + - name: "id" + in: "path" + description: "Id of the collection to update" + required: true + type: "string" + format: "uuidv4" + x-exportParamName: "Id" + - in: "body" + name: "updateCouponCollection" + description: "Values to update the coupon collection" + required: false + schema: + $ref: "#/definitions/updateCouponCollection" + x-exportParamName: "UpdateCouponCollection" + responses: + "200": + description: "Coupon collection updated" + schema: + $ref: "#/definitions/inline_response_200_8" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + /coupons: + post: + tags: + - "Coupons" + summary: "Create coupons for a coupon collection" + operationId: "createCoupons" + parameters: + - in: "body" + name: "createCoupons" + description: "Values to create coupons" + required: true + schema: + $ref: "#/definitions/createCoupons" + x-exportParamName: "CreateCoupons" + responses: + "204": + description: "Coupons creation in progress" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "401": + description: "unauthorized" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Coupon collection not found" + schema: + $ref: "#/definitions/errorModel" /whatsapp/sendMessage: post: tags: @@ -8147,7 +9702,7 @@ paths: "201": description: "successfully created" schema: - $ref: "#/definitions/inline_response_201_2" + $ref: "#/definitions/inline_response_201_4" "400": description: "bad request" schema: @@ -8416,7 +9971,7 @@ paths: "201": description: "successfully created" schema: - $ref: "#/definitions/inline_response_201_3" + $ref: "#/definitions/inline_response_201_5" "400": description: "bad request" schema: @@ -8510,15 +10065,115 @@ paths: x-exportParamName: "Uuid" responses: "204": - description: "Feed deleted" - examples: - application/json: {} - "400": - description: "bad request" + description: "Feed deleted" + examples: + application/json: {} + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Feed not found" + schema: + $ref: "#/definitions/errorModel" + /payments/requests: + post: + tags: + - "Payments" + summary: "Create a payment request" + operationId: "createPaymentRequest" + parameters: + - in: "body" + name: "create payment rquest" + description: "Create a payment request\n" + required: true + schema: + $ref: "#/definitions/createPaymentRequest" + x-exportParamName: "CreatePaymentRquest" + responses: + "201": + description: "Payment request created." + examples: + response: + value: + id: "6d4ec0b2b48ef803df4103ve" + url: "https://pay.brevo.com/6d4ec0b2b48ef803df4103ve" + schema: + $ref: "#/definitions/createPaymentResponse" + "400": + description: "Bad request." + schema: + $ref: "#/definitions/errorModel" + "401": + description: "Unauthorized." + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Permission denied. Either you don't have access to Brevo Payments\ + \ or your Brevo Payments account is not validated." + schema: + $ref: "#/definitions/errorModel" + /payments/requests/{id}: + get: + tags: + - "Payments" + summary: "Get payment request details" + operationId: "getPaymentRequest" + parameters: + - name: "id" + in: "path" + description: "Id of the payment Request" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Payment request details" + schema: + $ref: "#/definitions/getPaymentRequest" + "400": + description: "Bad request." + schema: + $ref: "#/definitions/errorModel" + "401": + description: "Unauthorized." + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Permission denied. Either you don't have access to Brevo Payments\ + \ or your Brevo Payments account is not validated." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Payment request not found." + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Payments" + summary: "Delete a payment request." + operationId: "deletePaymentRequest" + parameters: + - name: "id" + in: "path" + description: "ID of the payment request." + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Payment request deleted successfully." + "401": + description: "Unauthorized." + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Permission denied. Either you don't have access to Brevo Payments\ + \ or your Brevo Payments account is not validated." schema: $ref: "#/definitions/errorModel" "404": - description: "Feed not found" + description: "Payment request not found." schema: $ref: "#/definitions/errorModel" securityDefinitions: @@ -8560,6 +10215,135 @@ definitions: description: "Get user activity logs" items: $ref: "#/definitions/getAccountActivity_logs" + getInvitedUsersList: + type: "object" + properties: + users: + type: "array" + description: "Get invited users list" + items: + $ref: "#/definitions/getInvitedUsersList_users" + getCorporateInvitedUsersList: + type: "object" + properties: + users: + type: "array" + description: "Get invited users list" + items: + $ref: "#/definitions/getCorporateInvitedUsersList_users" + getCorporateUserPermission: + type: "object" + required: + - "email" + - "feature_access" + - "groups" + - "status" + properties: + email: + type: "string" + example: "invitedUser@company.com" + description: "Email address of the user." + status: + type: "string" + example: "active / pending" + description: "Status of the invited user." + groups: + type: "array" + items: + $ref: "#/definitions/getCorporateUserPermission_groups" + feature_access: + $ref: "#/definitions/getCorporateUserPermission_feature_access" + description: "Check admin user permissions" + getUserPermission: + type: "object" + required: + - "email" + - "privileges" + - "status" + properties: + email: + type: "string" + example: "invitedUser@company.com" + description: "Email address of the user." + status: + type: "string" + example: "active" + description: "Status of the invited user." + privileges: + type: "array" + description: "Granular feature permissions given to the user." + items: + $ref: "#/definitions/getUserPermission_privileges" + description: "Check user permission" + putRevokeUserPermission: + type: "object" + required: + - "email" + properties: + email: + type: "string" + example: "invitedUser@company.com" + description: "Email address of the user." + description: "Revoke user permission" + putresendcancelinvitation: + type: "object" + required: + - "email" + properties: + email: + type: "string" + example: "invitedUser@company.com" + description: "Email address of the user." + description: "Revoke user permission" + inviteAdminUser: + type: "object" + required: + - "all_features_access" + - "email" + - "privileges" + properties: + email: + type: "string" + format: "email" + example: "inviteuser@example.com" + description: "Email address for the organization" + all_features_access: + type: "boolean" + example: false + description: "All access to the features" + groupIds: + type: "array" + example: + - "2baxxxxxxxxxxxxxxxxxxxxxcaa" + - "65axxxxxxxxxxxxxxxxxxxxxc5a" + description: "Ids of Group" + items: + type: "string" + description: "Group Id" + privileges: + type: "array" + items: + $ref: "#/definitions/inviteAdminUser_privileges" + inviteuser: + type: "object" + required: + - "all_features_access" + - "email" + - "privileges" + properties: + email: + type: "string" + format: "email" + example: "inviteuser@example.com" + description: "Email address for the organization" + all_features_access: + type: "boolean" + example: true + description: "All access to the features" + privileges: + type: "array" + items: + $ref: "#/definitions/inviteuser_privileges" getChildrenList: type: "object" properties: @@ -8865,6 +10649,7 @@ definitions: - "account_under_validation" - "not_acceptable" - "bad_request" + - "unprocessable_entity" message: type: "string" example: "POST Method is not allowed on this path" @@ -9078,6 +10863,10 @@ definitions: example: "20% OFF for 2017 Summer Sales" description: "Subject of the campaign. Only available if `abTesting` flag\ \ of the campaign is `false`" + previewText: + type: "string" + example: "Thanks for your order!" + description: "Preview text or preheader of the email campaign" type: type: "string" example: "classic" @@ -9150,6 +10939,22 @@ definitions: - "sender" - "testSent" properties: + utmCampaignValue: + type: "string" + example: "myutm" + description: "utm parameter associated with campaign" + utmSource: + type: "string" + example: "Brevo" + description: "source of utm parameter" + utmMedium: + type: "string" + example: "EMAIL" + description: "medium parameter" + utmID: + type: "integer" + example: 10 + description: "utm id" testSent: type: "boolean" example: true @@ -9676,7 +11481,7 @@ definitions: createWhatsAppTemplate: type: "object" required: - - "body" + - "bodyText" - "category" - "language" - "name" @@ -9688,31 +11493,61 @@ definitions: language: type: "string" example: "en" - description: "Language of the template" + description: "Language of the template. For Example :\n**en** for English\n" category: type: "string" example: "MARKETING" description: "Category of the template" enum: - "MARKETING" - - "TRANSACTIONAL" + - "UTILITY" mediaUrl: type: "string" example: "https://attachment.domain.com" - description: "Absolute url of the media file **(no local file)**" - body: + description: "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.**\nAllowed extensions for media files are:\n#### jpeg | png\ + \ | mp4 | pdf\n" + bodyText: type: "string" example: "making it look like readable English" - description: "Body of the template" - headerHtml: - type: "string" - example: "

gfhgfhv ghgjhLASTNAME

\"" - description: "Html content of the header" - headerType: - type: "boolean" - example: true + description: "Body of the template. **Maximum allowed characters are 1024**" + headerText: + type: "string" + example: "Test WhatsApp Campaign" + description: "Text content of the header in the template. **Maximum allowed\ + \ characters are 45**\n**Use this field to add text content in template\ + \ header and if mediaUrl is empty**\n" + source: + type: "string" + description: "source of the template" + enum: + - "Automation" + - "Conversations" + updateWhatsAppCampaign: + type: "object" + properties: + campaignName: + type: "string" + example: "Test WhatsApp" + description: "Name of the campaign" + campaignStatus: + type: "string" + example: "scheduled" + description: "Status of the campaign" + enum: + - "scheduled" + - "suspended" + default: "scheduled" + rescheduleFor: + type: "string" + example: "2017-06-01T10:30:00.000+0000" + description: "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**\nUse this field to update\ + \ the scheduledAt of any existing draft or scheduled WhatsApp campaign.\n" + recipients: + $ref: "#/definitions/createWhatsAppCampaign_recipients" createModel: type: "object" required: @@ -9725,6 +11560,19 @@ definitions: description: "ID of the object created" example: id: 122 + createPaymentResponse: + type: "object" + required: + - "id" + properties: + id: + type: "string" + example: "6d4ec0b2b48ef803df4103ve" + description: "ID of the object created" + url: + type: "string" + example: "https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve" + description: "URL of the payment request created" uploadImageModel: type: "object" required: @@ -9798,8 +11646,12 @@ definitions: description: "ID of the Domain created" domain_name: type: "string" - example: "true" + example: "example.com" description: "Domain" + domain_provider: + type: "string" + example: "GoDaddy" + description: "Domain Provider" message: type: "string" example: "Domain added successfully. To authenticate it, add following DNS\ @@ -9808,13 +11660,19 @@ definitions: dns_records: $ref: "#/definitions/createDomainModel_dns_records" example: - domain_name: "true" + domain_name: "example.com" + domain_provider: "GoDaddy" dns_records: dkim_record: type: "type" value: "value" host_name: "host_name" status: true + dmarc_record: + type: "type" + value: "value" + host_name: "host_name" + status: true brevo_code: type: "type" value: "value" @@ -9839,7 +11697,7 @@ definitions: example: domain_name: "myexample.com" message: "Domain has been authenticated successfully." - getDomainonfigurationModel: + getDomainConfigurationModel: type: "object" required: - "authenticated" @@ -9870,6 +11728,11 @@ definitions: value: "value" host_name: "host_name" status: true + dmarc_record: + type: "type" + value: "value" + host_name: "host_name" + status: true brevo_code: type: "type" value: "value" @@ -10295,6 +12158,17 @@ definitions: type: "string" example: "2017-05-12T13:15:00Z" description: "Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)" + batched: + type: "boolean" + example: true + description: "To send batched webhooks" + auth: + $ref: "#/definitions/getWebhook_auth" + headers: + type: "array" + description: "Custom headers to be send with webhooks" + items: + $ref: "#/definitions/getWebhook_headers" getWebhooks: type: "object" required: @@ -10311,7 +12185,6 @@ definitions: required: - "attributes" - "createdAt" - - "email" - "emailBlacklisted" - "id" - "listIds" @@ -10949,6 +12822,10 @@ definitions: example: "Discover the New Collection !" description: "Subject of the campaign. Mandatory if abTesting is false. Ignored\ \ if abTesting is true." + previewText: + type: "string" + example: "Thanks for your order!" + description: "Preview text or preheader of the email campaign" replyTo: type: "string" format: "email" @@ -11137,6 +13014,10 @@ definitions: type: "string" example: "Discover the New Collection !" description: "Subject of the campaign" + previewText: + type: "string" + example: "Thanks for your order!" + description: "Preview text or preheader of the email campaign" replyTo: type: "string" format: "email" @@ -11627,6 +13508,17 @@ definitions: type: "string" example: "example.com" description: "Inbound domain of webhook, required in case of event type `inbound`" + batched: + type: "boolean" + example: true + description: "To send batched webhooks" + auth: + $ref: "#/definitions/getWebhook_auth" + headers: + type: "array" + description: "Custom headers to be send with webhooks" + items: + $ref: "#/definitions/getWebhook_headers" updateWebhook: type: "object" properties: @@ -11673,6 +13565,17 @@ definitions: type: "string" example: "example.com" description: "Inbound domain of webhook, used in case of event type `inbound`" + batched: + type: "boolean" + example: true + description: "To send batched webhooks" + auth: + $ref: "#/definitions/getWebhook_auth" + headers: + type: "array" + description: "Custom headers to be send with webhooks" + items: + $ref: "#/definitions/getWebhook_headers" createDoiContact: type: "object" required: @@ -11692,9 +13595,13 @@ definitions: example: FNAME: "Elly" LNAME: "Roger" + COUNTRIES: + - "India" + - "China" description: "Pass the set of attributes and their values. These attributes\ - \ must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}" - properties: {} + \ must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger',\ + \ 'COUNTRIES':['India','China']}" + additionalProperties: {} includeListIds: type: "array" description: "Lists under user account where contact should be added" @@ -11745,8 +13652,9 @@ definitions: LNAME: "Roger" description: "Pass the set of attributes and their values. The attribute's\ \ parameter should be passed in capital letter while creating a contact.\ - \ These attributes must be present in your Brevo account. For eg. {\"FNAME\"\ - :\"Elly\", \"LNAME\":\"Roger\"}" + \ 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\"}" properties: {} emailBlacklisted: type: "boolean" @@ -11789,14 +13697,15 @@ definitions: FNAME: "Ellie" LNAME: "Roger" description: "Pass the set of attributes to be updated. These attributes must\ - \ be present in your account. To update existing email address of a contact\ - \ with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\"\ - :\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The\ - \ attribute's parameter should be passed in capital letter while updating\ - \ a contact. Keep in mind transactional attributes can be updated the same\ - \ way as normal attributes. Mobile Number in \"SMS\" field should be passed\ - \ with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"\ - SMS\":\"0091xxxxxxxxxx\"}" + \ 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\"}" properties: {} ext_id: type: "string" @@ -11863,14 +13772,21 @@ definitions: :1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]" items: $ref: "#/definitions/createAttribute_enumeration" + multiCategoryOptions: + type: "array" + description: "List of options you want to add for multiple-choice attribute.\ + \ **Use only if the attribute's category is \"normal\" and attribute's type\ + \ is \"multiple-choice\".** For example:\n**[\"USA\",\"INDIA\"]**\n" + items: + type: "string" type: type: "string" example: "text" description: "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 )" + \ is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice'\ + \ 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 )" enum: - "text" - "date" @@ -11878,6 +13794,7 @@ definitions: - "boolean" - "id" - "category" + - "multiple-choice" updateAttribute: type: "object" properties: @@ -11893,6 +13810,14 @@ definitions: :1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]" items: $ref: "#/definitions/updateAttribute_enumeration" + multiCategoryOptions: + type: "array" + description: "Use this option to add multiple-choice attributes options only\ + \ if the attribute's category is \"normal\". **This option is specifically\ + \ designed for updating multiple-choice attributes**. For example:\n**[\"\ + USA\",\"INDIA\"]**\n" + items: + type: "string" createList: type: "object" required: @@ -11908,6 +13833,15 @@ definitions: format: "int64" example: 2 description: "Id of the parent folder in which this list is to be created" + ssoTokenRequestCorporate: + type: "object" + required: + - "email" + properties: + email: + type: "string" + example: "vipin+subaccount@brevo.com" + description: "User email of sub-account organization" ssoTokenRequest: type: "object" required: @@ -11941,6 +13875,11 @@ definitions: - "senders" - "sms_campaign" - "sms_transactional" + url: + type: "string" + example: "https://app.brevo.com/senders/domain/list" + description: "Set the full target URL after login success. The user will land\ + \ directly on this target URL after login" createApiKeyRequest: type: "object" required: @@ -12016,19 +13955,7 @@ definitions: \ increase of json body size while parsing. Please use fileUrl instead to\ \ import bigger files.\n" items: - type: "object" - example: - email: "ndicky0@ocn.ne.jp" - attributes: - LNAME: "Noemi" - FNAME: "Dicky" - COUNTRY: "DE" - BIRTHDAY: "11/02/1989" - PREFERED_COLOR: "BLACK" - description: "List of attributes to be imported" - minProperties: 1 - maxProperties: 2 - additionalProperties: {} + $ref: "#/definitions/requestContactImport_jsonBody" listIds: type: "array" description: "Mandatory if newList is not defined. Ids of the lists in which\ @@ -12051,6 +13978,11 @@ definitions: example: false description: "To blacklist all the contacts for email" default: false + disableNotification: + type: "boolean" + example: false + description: "To disable email notification" + default: false smsBlacklist: type: "boolean" example: false @@ -12294,12 +14226,17 @@ definitions: type: "integer" format: "int64" example: 252 - description: "Number of accepted for the timeframe" + description: "Number of accepted SMS for the timeframe" rejected: type: "integer" format: "int64" example: 8 - description: "Number of rejected for the timeframe" + description: "Number of rejected SMS for the timeframe" + skipped: + type: "integer" + format: "int64" + example: 1 + description: "Number of skipped SMS for the timeframe" getTransacSmsReport: type: "object" properties: @@ -12598,11 +14535,19 @@ definitions: timezone: type: "string" description: "Set the timezone of the sub-account" + groupIds: + type: "array" + description: "Set the group(s) for the sub-account" + items: + type: "string" example: companyName: "Test Sub-account" email: "test-sub@example.com" timezone: "Europe/Paris" language: "fr" + groupIds: + - "5f8f8c3b5f56a02d4433b3a7" + - "5f8f8c3b5f56a02d4433b3a8" createSubAccountResponse: type: "object" required: @@ -12613,6 +14558,19 @@ definitions: format: "int64" example: 122 description: "ID of the sub-account created" + corporateGroupDetailsResponse: + type: "object" + properties: + group: + $ref: "#/definitions/corporateGroupDetailsResponse_group" + sub-accounts: + type: "array" + items: + $ref: "#/definitions/corporateGroupDetailsResponse_subaccounts" + users: + type: "array" + items: + $ref: "#/definitions/corporateGroupDetailsResponse_users" masterDetailsResponse: type: "object" properties: @@ -12657,6 +14615,11 @@ definitions: companyName: type: "string" description: "Sub-account company name" + groups: + type: "array" + description: "List of group(s) associated with the sub-account" + items: + $ref: "#/definitions/subAccountDetailsResponse_groups" planInfo: $ref: "#/definitions/subAccountDetailsResponse_planInfo" subAccountUpdatePlanRequest: @@ -12667,6 +14630,68 @@ definitions: features: $ref: "#/definitions/subAccountUpdatePlanRequest_features" description: "Details of the plan to be changed" + example: + credits: + email: 5000 + sms: 2000 + wpSubscribers: -1 + features: + users: 15 + landingPage: 20 + inbox: 10 + subAccountAppsToggleRequest: + type: "object" + properties: + inbox: + type: "boolean" + description: "Set this field to enable or disable Inbox on the sub-account\ + \ / Not applicable on ENTv2" + whatsapp: + type: "boolean" + description: "Set this field to enable or disable Whatsapp campaigns on the\ + \ sub-account" + automation: + type: "boolean" + description: "Set this field to enable or disable Automation on the sub-account" + email-campaigns: + type: "boolean" + description: "Set this field to enable or disable Email Campaigns on the sub-account" + sms-campaigns: + type: "boolean" + description: "Set this field to enable or disable SMS Marketing on the sub-account" + landing-pages: + type: "boolean" + description: "Set this field to enable or disable Landing pages on the sub-account" + transactional-emails: + type: "boolean" + description: "Set this field to enable or disable Transactional Email on the\ + \ sub-account" + transactional-sms: + type: "boolean" + description: "Set this field to enable or disable Transactional SMS on the\ + \ sub-account" + facebook-ads: + type: "boolean" + description: "Set this field to enable or disable Facebook ads on the sub-account" + web-push: + type: "boolean" + description: "Set this field to enable or disable Web Push on the sub-account" + meetings: + type: "boolean" + description: "Set this field to enable or disable Meetings on the sub-account" + conversations: + type: "boolean" + description: "Set this field to enable or disable Conversations on the sub-account" + crm: + type: "boolean" + description: "Set this field to enable or disable Sales CRM on the sub-account" + description: "List of enable/disable applications on the sub-account" + example: + landing-pages: true + sms-campaigns: false + whatsapp: true + meetings: true + web-push: false TaskTypes: type: "object" properties: @@ -13027,6 +15052,14 @@ definitions: Pipeline: type: "object" properties: + pipeline: + type: "string" + example: "5ea675e3da0dd085acaea610" + description: "Pipeline id" + pipeline_name: + type: "string" + example: "Sales Pipeline" + description: "Pipeline Name" stages: type: "array" description: "List of stages" @@ -13034,11 +15067,18 @@ definitions: $ref: "#/definitions/PipelineStage" description: "List of stages" example: + pipeline: "5ea675e3da0dd085acaea610" stages: - name: "New" id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" - name: "New" id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + pipeline_name: "Sales Pipeline" + Pipelines: + type: "array" + description: "List of pipeline" + items: + $ref: "#/definitions/Pipeline" DealAttributes: type: "array" description: "List of deal attributes" @@ -13347,6 +15387,77 @@ definitions: text: "Good morning! How can I help you?" type: "agent" visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg" + ConversionSourceMetrics: + type: "object" + required: + - "averageBasket" + - "conversionSource" + - "id" + - "ordersCount" + - "revenue" + properties: + id: + type: "number" + format: "integer" + conversionSource: + type: "string" + enum: + - "email_campaign" + ordersCount: + type: "number" + format: "integer" + revenue: + type: "number" + format: "float" + averageBasket: + type: "number" + format: "float" + example: + ordersCount: 6.02745618307040320615897144307382404804229736328125 + revenue: 1.4658129 + id: 0.80082819046101150206595775671303272247314453125 + averageBasket: 5.962134 + conversionSource: "email_campaign" + ConversionSourceProduct: + type: "object" + required: + - "id" + properties: + id: + type: "string" + example: "1" + name: + type: "string" + example: "Milky Way Galaxy" + sku: + type: "string" + example: "sku-1" + price: + type: "number" + format: "float" + example: 1000.0 + url: + type: "string" + example: "https://mydomain.com/products/alpina-panoma-classic" + imageUrl: + type: "string" + example: "http://mydomain.com/product-absoulte-url/img.jpeg" + ordersCount: + type: "integer" + example: 200 + revenue: + type: "number" + format: "float" + example: 999.99 + example: + ordersCount: 200 + revenue: 999.99 + price: 1000.0 + imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg" + name: "Milky Way Galaxy" + id: "1" + sku: "sku-1" + url: "https://mydomain.com/products/alpina-panoma-classic" order: type: "object" required: @@ -13380,6 +15491,10 @@ definitions: example: 308.42 description: "Total amount of the order, including all shipping expenses,\ \ tax and the price of items." + storeId: + type: "string" + example: "ST-21" + description: "ID of store where the order is placed" products: type: "array" items: @@ -13412,6 +15527,14 @@ definitions: type: "string" example: "https://en.wikipedia.org/wiki/Webhook" description: "Notify Url provided by client to get the status of batch request" + historical: + type: "boolean" + example: true + description: "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." + default: true createdBatchId: type: "object" required: @@ -13421,6 +15544,27 @@ definitions: type: "number" example: 1.0 description: "Batch ID of the request" + getOrders: + type: "object" + properties: + orders: + type: "array" + items: + type: "object" + allOf: + - type: "object" + properties: + contact_id: + type: "integer" + format: "int64" + example: 187588 + description: "Contact ID for the order" + - $ref: "#/definitions/order" + count: + type: "integer" + format: "int64" + example: 17655 + description: "Number of orders" getCategories: type: "object" required: @@ -13511,6 +15655,10 @@ definitions: example: "2017-05-12T12:30:00.000+0000" description: "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted\ \ from the shop's database" + isDeleted: + type: "boolean" + example: true + description: "category deleted from the shop's database" createUpdateCategories: type: "object" required: @@ -13535,6 +15683,10 @@ definitions: example: "2017-05-12T12:30:00.000+0000" description: "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted\ \ from the shop's database" + isDeleted: + type: "boolean" + example: true + description: "category deleted from the shop's database" createUpdateBatchCategory: type: "object" required: @@ -13759,6 +15911,10 @@ definitions: example: "2017-05-12T12:30:00.000+0000" description: "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted\ \ from the shop's database" + isDeleted: + type: "boolean" + example: true + description: "product deleted from the shop's database" createUpdateBatchProducts: type: "object" required: @@ -13832,6 +15988,10 @@ definitions: example: "2017-05-12T12:30:00.000+0000" description: "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted\ \ from the shop's database" + isDeleted: + type: "boolean" + example: true + description: "product deleted from the shop's database" createProductModel: type: "object" properties: @@ -13840,6 +16000,104 @@ definitions: format: "int64" example: 122 description: "ID of the Product when a new product is created" + event: + type: "object" + required: + - "event_name" + - "identifiers" + properties: + event_name: + type: "string" + example: "video_played" + description: "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." + event_date: + type: "string" + example: "2024-02-06T20:59:23.383Z" + description: "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." + identifiers: + $ref: "#/definitions/event_identifiers" + contact_properties: + type: "object" + example: + AGE: 32 + GENDER: "FEMALE" + description: "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**" + properties: {} + event_properties: + type: "object" + example: + video_title: "Brevo — The most approachable CRM suite" + vide_description: "Create your free account today!" + duration: 142 + autoplayed: false + upload_date: "2023-11-24T12:09:10+01:00" + description: "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." + properties: {} + getCouponCollection: + type: "object" + required: + - "createdAt" + - "defaultCoupon" + - "id" + - "name" + - "remainingCoupons" + - "totalCoupons" + properties: + id: + type: "string" + format: "uuidv4" + example: "23befbae-1505-47a8-bd27-e30ef739f32c" + description: "The id of the collection." + name: + type: "string" + format: "uuidv4" + example: "SummerPromotions" + description: "The name of the collection." + defaultCoupon: + type: "string" + example: "10 OFF" + description: "The default coupon of the collection." + createdAt: + type: "string" + format: "date-time" + example: "2023-01-06T05:03:47.053+0000" + description: "Datetime on which the collection was created." + totalCoupons: + type: "integer" + format: "int64" + example: 10000 + description: "Total number of coupons in the collection." + remainingCoupons: + type: "integer" + format: "int64" + example: 5000 + description: "Number of coupons that have not been sent yet." + expirationDate: + type: "string" + format: "date-time" + example: "2024-01-01T00:00:00Z" + description: "Expiration date for the coupon collection in RFC3339 format." + remainingDaysAlert: + type: "integer" + example: 5 + description: "If present, an email notification is going to be sent the defined\ + \ amount of days before the expiration date." + remainingCouponsAlert: + type: "integer" + example: 5 + description: "If present, an email notification is going to be sent when the\ + \ total number of available coupons falls below the defined threshold." createUpdateBatchProductsModel: type: "object" properties: @@ -13873,6 +16131,14 @@ definitions: format: "mobile" example: "919876543210" description: "WhatsApp Number with country code. Example, 85264318721" + params: + type: "object" + example: + FNAME: "Joe" + LNAME: "Doe" + description: "Pass the set of attributes to customize the template. For example,\ + \ {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}." + properties: {} contactNumbers: type: "array" description: "List of phone numbers of the contacts" @@ -14059,88 +16325,347 @@ definitions: headers: type: "array" example: - - name: "header1" - value: "value1" - - name: "header2" - value: "value2" - description: "Custom headers for the feed" + - name: "header1" + value: "value1" + - name: "header2" + value: "value2" + description: "Custom headers for the feed" + items: + $ref: "#/definitions/getExternalFeedByUUID_headers" + maxRetries: + type: "integer" + example: 5 + description: "Maximum number of retries on the feed url" + minimum: 0 + maximum: 5 + cache: + type: "boolean" + example: true + description: "Toggle caching of feed url response" + default: false + exportWebhooksHistory: + type: "object" + required: + - "event" + - "notifyURL" + - "type" + properties: + days: + type: "integer" + example: 7 + description: "Number of days in the past including today (positive integer).\ + \ _Not compatible with 'startDate' and 'endDate'_" + startDate: + type: "string" + example: "2023-02-13T00:00:00.000+0000" + description: "Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD).\ + \ Must be lower than equal to endDate" + endDate: + type: "string" + example: "2023-02-17T00:00:00.000+0000" + description: "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD).\ + \ Must be greater than equal to startDate" + sort: + type: "string" + example: "desc" + description: "Sorting order of records (asc or desc)" + type: + type: "string" + example: "transactional" + description: "Filter the history based on webhook type" + enum: + - "transactional" + - "marketing" + event: + type: "string" + example: "request" + description: "Filter the history for a specific event type" + enum: + - "invalid_parameter" + - "missing_parameter" + - "hardBounce" + - "softBounce" + - "delivered" + - "spam" + - "request" + - "opened" + - "click" + - "invalid" + - "deferred" + - "blocked" + - "unsubscribed" + - "error" + - "uniqueOpened" + - "loadedByProxy" + - "allEvents" + notifyURL: + type: "string" + example: "https://brevo.com" + description: "Webhook URL to receive CSV file link" + webhookId: + type: "integer" + example: 2345 + description: "Filter the history for a specific webhook id" + email: + type: "string" + example: "example@brevo.com" + description: "Filter the history for a specific email" + messageId: + type: "integer" + example: "<23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib>" + description: "Filter the history for a specific message id. Applicable only\ + \ for transactional webhooks." + createPaymentRequest: + type: "object" + required: + - "cart" + - "contactId" + - "reference" + properties: + reference: + type: "string" + example: "Invoice #INV0001" + description: "Reference of the payment request, it will appear on the payment\ + \ page.\n" + cart: + $ref: "#/definitions/cart" + contactId: + type: "integer" + format: "int64" + example: 43 + description: "Brevo ID of the contact requested to pay.\n" + description: + type: "string" + example: "Shipping Cost for sending bottles to NYC" + description: "description of payment request.\n" + notification: + $ref: "#/definitions/notification" + configuration: + $ref: "#/definitions/configuration" + configuration: + required: + - "customSuccessUrl" + properties: + customSuccessUrl: + type: "string" + format: "url" + example: "https://my-company.com/payment-success" + description: "Absolute URL of the custom success page.\n" + description: "Optional. Redirect contact to a custom success page once payment\ + \ is successful. If empty the default Brevo page will be displayed once a payment\ + \ is validated\n" + example: + customSuccessUrl: "https://my-company.com/payment-success" + cart: + type: "object" + required: + - "currency" + - "specificAmount" + properties: + currency: + type: "string" + example: "EUR" + description: "Currency code for the payment amount.\n" + enum: + - "EUR" + specificAmount: + type: "integer" + format: "int64" + example: 1200 + description: "Payment amount, in cents.\n e.g. if you want to request €12.00,\ + \ then the amount in cents is 1200.\n" + description: "Specify the payment currency and amount.\n" + example: + specificAmount: 1200 + currency: "EUR" + notification: + type: "object" + required: + - "channel" + - "text" + properties: + channel: + type: "string" + example: "email" + description: "Channel used to send the notifications.\n" + enum: + - "email" + text: + type: "string" + example: "Please pay for your yoga class." + description: "Use this field if you want to give more context to your contact\ + \ about the payment request.\n" + description: "Optional. Use this object if you want to let Brevo send an email\ + \ to the contact, with the payment request URL. If empty, no notifications (message\ + \ and reminders) will be sent.\n" + example: + channel: "email" + text: "Please pay for your yoga class." + getPaymentRequest: + type: "object" + required: + - "cart" + - "notification" + - "reference" + - "status" + properties: + reference: + type: "string" + example: "Invoice #INV0001\n" + description: "Reference of the payment request, it will appear on the payment\ + \ page.\n" + status: + type: "string" + example: "paid" + description: "Status of the payment request." + enum: + - "created" + - "sent" + - "reminderSent - paid" + configuration: + $ref: "#/definitions/configuration" + contactId: + type: "integer" + format: "int64" + example: 43 + description: "Brevo ID of the contact requested to pay.\n" + numberOfRemindersSent: + type: "integer" + format: "int64" + example: 5 + description: "number of reminders sent.\n" + cart: + $ref: "#/definitions/cart" + notification: + $ref: "#/definitions/notification" + example: + reference: "Invoice #INV0001\n" + notification: + channel: "email" + text: "Please pay for your yoga class." + configuration: + customSuccessUrl: "https://my-company.com/payment-success" + contactId: 43 + cart: + specificAmount: 1200 + currency: "EUR" + status: "paid" + numberOfRemindersSent: 5 + body: + type: "object" + required: + - "groupName" + properties: + groupName: + type: "string" + example: "My group" + description: "The name of the group of sub-accounts" + subAccountIds: + type: "array" + example: + - 234322 + - 325553 + - 893432 + description: "Pass the list of sub-account Ids to be included in the group" + items: + type: "integer" + format: "int64" + inline_response_201: + type: "object" + properties: + id: + type: "string" + body_1: + type: "object" + required: + - "ids" + - "ip" + properties: + ip: + type: "string" + example: "103.11.32.88" + description: "IP Address" + ids: + type: "array" + example: + - 234322 + - 325553 + - 893432 + description: "Pass the list of sub-account Ids to be associated with the IP\ + \ address" + items: + type: "integer" + format: "int64" + body_2: + type: "object" + required: + - "ids" + - "ip" + properties: + ip: + type: "string" + example: "103.11.32.88" + description: "IP Address" + ids: + type: "array" + example: + - 234322 + - 325553 + - 893432 + description: "Pass the list of sub-account Ids to be dissociated from the\ + \ IP address" + items: + type: "integer" + format: "int64" + body_3: + type: "object" + required: + - "groupName" + properties: + groupName: + type: "string" + example: "My group" + description: "The name of the group of sub-accounts" + subAccountIds: + type: "array" + example: + - 234322 + - 325553 + - 893432 + description: "Pass the list of sub-account Ids to be included in the group" items: - $ref: "#/definitions/getExternalFeedByUUID_headers" - maxRetries: - type: "integer" - example: 5 - description: "Maximum number of retries on the feed url" - minimum: 0 - maximum: 5 - cache: - type: "boolean" - example: true - description: "Toggle caching of feed url response" - default: false - exportWebhooksHistory: + type: "integer" + format: "int64" + body_4: type: "object" required: - - "event" - - "notifyURL" + - "subAccountIds" properties: - days: - type: "integer" - example: 7 - description: "Number of days in the past including today (positive integer).\ - \ _Not compatible with 'startDate' and 'endDate'_" - startDate: - type: "string" - example: "2023-02-13T00:00:00.000+0000" - description: "Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD).\ - \ Must be lower than equal to endDate" - endDate: - type: "string" - example: "2023-02-17T00:00:00.000+0000" - description: "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD).\ - \ Must be greater than equal to startDate" - sort: - type: "string" - example: "desc" - description: "Sorting order of records (asc or desc)" - event: + subAccountIds: + type: "array" + example: + - 423432 + - 234323 + - 87678 + description: "List of sub-account ids" + items: + type: "integer" + format: "int64" + inline_response_200: + type: "object" + properties: + message: type: "string" - example: "request" - description: "Filter the history for a specific event type" - enum: - - "invalid_parameter" - - "missing_parameter" - - "hardBounce" - - "softBounce" - - "delivered\"" - - "spam" - - "request" - - "opened" - - "click" - - "invalid" - - "deferred" - - "blocked" - - "unsubscribed" - - "error" - - "uniqueOpened" - - "loadedByProxy" - - "allEvents" - notifyURL: + inline_response_200_1: + type: "object" + properties: + id: type: "string" - example: "https://brevo.com" - description: "Webhook URL to receive CSV file link" - webhookId: - type: "integer" - example: 2345 - description: "Filter the history for a specific webhook id" - email: + description: "Unique id of the group" + groupName: type: "string" - example: "example@brevo.com" - description: "Filter the history for a specific email" - messageId: - type: "integer" - example: "<23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib>" - description: "Filter the history for a specific message id" - body: + description: "The name of the group of sub-accounts" + body_5: type: "object" required: - "name" @@ -14162,7 +16687,27 @@ definitions: format: "int64" example: 91 description: "Country code if phone_number is passed in attributes." - inline_response_200: + linkedContactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids to be linked with company" + items: + type: "integer" + format: "int64" + linkedDealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deal ids to be linked with company" + items: + type: "string" + format: "objectID" + inline_response_200_2: type: "object" required: - "id" @@ -14174,7 +16719,7 @@ definitions: description: "Created company id" example: id: "61a5cd07ca1347c82306ad06" - body_1: + body_6: type: "object" properties: name: @@ -14200,7 +16745,7 @@ definitions: format: "int64" example: 91 description: "Country code if phone_number is passed in attributes." - body_2: + body_7: type: "object" properties: linkContactIds: @@ -14241,7 +16786,7 @@ definitions: description: "Deals ids for deals to be unlinked from company" items: type: "string" - body_3: + body_8: type: "object" required: - "name" @@ -14255,9 +16800,33 @@ definitions: example: deal_owner: "6093d2425a9b436e9519d034" amount: 12 - description: "Attributes fo\\r deal creation" + description: "Attributes for deal creation\n\nTo assign owner of a Deal you\ + \ can send attributes.deal_owner and utilize the account email or ID.\n\n\ + If you want to create a deal on a specific pipeline and stage you can use\ + \ the following attributes `pipeline` and `deal_stage`.\n\nPipeline and\ + \ deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}`\n" properties: {} - inline_response_201: + linkedContactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids to be linked with deal" + items: + type: "integer" + format: "int64" + linkedCompaniesIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Company ids to be linked with deal" + items: + type: "string" + format: "objectID" + inline_response_201_1: type: "object" required: - "id" @@ -14269,7 +16838,7 @@ definitions: description: "Created deal id" example: id: "61a5cd07ca1347c82306ad06" - body_4: + body_9: type: "object" properties: name: @@ -14281,9 +16850,13 @@ definitions: example: deal_owner: "6093d2425a9b436e9519d034" amount: 12 - description: "Attributes for deal update" + description: "Attributes for deal update\n\nTo assign owner of a Deal you\ + \ can send attributes.deal_owner and utilize the account email or ID.\n\n\ + If you wish to update the pipeline of a deal you need to provide the `pipeline`\ + \ and the `deal_stage`.\n\nPipeline and deal_stage are ids you can fetch\ + \ using this endpoint `/crm/pipeline/details/{pipelineID}`\n" properties: {} - body_5: + body_10: type: "object" properties: linkContactIds: @@ -14324,7 +16897,22 @@ definitions: description: "Company ids to be unlinked from deal" items: type: "string" - body_6: + inline_response_200_3: + type: "object" + properties: + processId: + type: "integer" + example: 50 + description: "The ID of the import process" + example: + processId: 50 + inline_response_400: + type: "object" + properties: + message: + type: "string" + example: "Bad request: With reason" + body_11: type: "object" required: - "date" @@ -14361,7 +16949,8 @@ definitions: assignToId: type: "string" example: "5faab4b7f195bb3c4c31e62a" - description: "User id to whom task is assigned" + description: "To assign a task to a user you can use either the account email\ + \ or ID." contactsIds: type: "array" example: @@ -14391,7 +16980,7 @@ definitions: type: "string" reminder: $ref: "#/definitions/TaskReminder" - inline_response_201_1: + inline_response_201_2: type: "object" required: - "id" @@ -14403,7 +16992,7 @@ definitions: description: "Task Details" example: id: "61a5cd07ca1347c82306ad06" - body_7: + body_12: type: "object" properties: name: @@ -14434,7 +17023,8 @@ definitions: assignToId: type: "string" example: "5faab4b7f195bb3c4c31e62a" - description: "User id to whom task is assigned" + description: "To assign a task to a user you can use either the account email\ + \ or ID." contactsIds: type: "array" example: @@ -14462,7 +17052,7 @@ definitions: description: "Companies ids for companies a task is linked to" items: type: "string" - body_8: + body_13: type: "object" required: - "text" @@ -14501,7 +17091,7 @@ definitions: type: "string" example: "Liz" description: "agent name" - body_9: + body_14: required: - "text" properties: @@ -14512,7 +17102,7 @@ definitions: edition: value: text: "Good morning! How can I help you?" - body_10: + body_15: type: "object" required: - "text" @@ -14540,7 +17130,7 @@ definitions: example: "PjRBMhWGen6aRHjif" description: "group ID. It can be found on group’s page. Optional if `agentId`\ \ is set." - body_11: + body_16: type: "object" required: - "text" @@ -14550,35 +17140,270 @@ definitions: example: "Your order has shipped! Here’s your tracking number: 9114 5847 4668\ \ 7775 9233 54" description: "edited message text" - body_12: + body_17: + type: "object" + properties: + agentId: + type: "string" + example: "d9nKoegKSjmCtyK78" + description: "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)." + receivedFrom: + type: "string" + example: "SuperAwesomeHelpdesk" + description: "mark your messages to distinguish messages created by you from\ + \ the others." + agentEmail: + type: "string" + format: "email" + example: "liz@getwear.com" + description: "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." + agentName: + type: "string" + example: "Liz" + description: "agent name." + inline_response_200_4: + type: "object" + required: + - "code" + properties: + code: + type: "string" + example: "EUR" + description: "ISO 4217 compliant display currency code" + example: + code: "EUR" + setConfigDisplayCurrency: + type: "object" + required: + - "code" + properties: + code: + type: "string" + example: "EUR" + description: "ISO 4217 compliant display currency code" + example: + code: "EUR" + inline_response_200_5_totals: + type: "object" + required: + - "averageBasket" + - "ordersCount" + - "revenue" + properties: + ordersCount: + type: "number" + format: "integer" + revenue: + type: "number" + format: "float" + averageBasket: + type: "number" + format: "float" + description: "Attribution list aggregated totals" + example: "{\"ordersCount\":500,\"revenue\":1700.0,\"averageBasket\":3.4}" + inline_response_200_5: + type: "object" + required: + - "results" + - "totals" + properties: + results: + type: "array" + example: + - id: 2 + conversionSource: "email_campaign" + ordersCount: 300 + revenue: 900 + averageBasket: 3.0 + - id: 1 + conversionSource: "email_campaign" + ordersCount: 200 + revenue: 800 + averageBasket: 4.0 + description: "List of conversion attribution metrics" + items: + $ref: "#/definitions/ConversionSourceMetrics" + totals: + $ref: "#/definitions/inline_response_200_5_totals" + example: + totals: "{\"ordersCount\":500,\"revenue\":1700.0,\"averageBasket\":3.4}" + results: + - id: 2 + conversionSource: "email_campaign" + ordersCount: 300 + revenue: 900 + averageBasket: 3.0 + - id: 1 + conversionSource: "email_campaign" + ordersCount: 200 + revenue: 800 + averageBasket: 4.0 + inline_response_200_6: + type: "object" + required: + - "newCustomersCount" + properties: + ConversionSourceMetrics: + $ref: "#/definitions/ConversionSourceMetrics" + newCustomersCount: + type: "number" + format: "integer" + example: + newCustomersCount: 5.63737665663332876420099637471139430999755859375 + ConversionSourceMetrics: + ordersCount: 6.02745618307040320615897144307382404804229736328125 + revenue: 1.4658129 + id: 0.80082819046101150206595775671303272247314453125 + averageBasket: 5.962134 + conversionSource: "email_campaign" + inline_response_200_7: + type: "object" + required: + - "products" + properties: + products: + type: "array" + description: "List of attributed products" + items: + $ref: "#/definitions/ConversionSourceProduct" + example: + products: + - ordersCount: 200 + revenue: 999.99 + price: 1000.0 + imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg" + name: "Milky Way Galaxy" + id: "1" + sku: "sku-1" + url: "https://mydomain.com/products/alpina-panoma-classic" + - ordersCount: 200 + revenue: 999.99 + price: 1000.0 + imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg" + name: "Milky Way Galaxy" + id: "1" + sku: "sku-1" + url: "https://mydomain.com/products/alpina-panoma-classic" + createCouponCollection: + type: "object" + required: + - "defaultCoupon" + - "name" + properties: + name: + type: "string" + example: "10%OFF" + description: "Name of the coupons collection" + defaultCoupon: + type: "string" + example: "Winter" + description: "Default coupons collection name" + expirationDate: + type: "string" + format: "date-time" + example: "2022-01-02T00:00:00Z" + description: "Specify an expiration date for the coupon collection in RFC3339\ + \ format. Use null to remove the expiration date." + remainingDaysAlert: + type: "integer" + example: 5 + description: "Send a notification alert (email) when the remaining days until\ + \ the expiration date are equal or fall bellow this number. Use null to\ + \ disable alerts." + remainingCouponsAlert: + type: "integer" + example: 5 + description: "Send a notification alert (email) when the remaining coupons\ + \ count is equal or fall bellow this number. Use null to disable alerts." + inline_response_201_3: + type: "object" + required: + - "id" + properties: + id: + type: "string" + format: "uuidv4" + example: "23befbae-1505-47a8-bd27-e30ef739f32c" + description: "The id of the created collection" + example: + id: "23befbae-1505-47a8-bd27-e30ef739f32c" + updateCouponCollection: + type: "object" + properties: + defaultCoupon: + type: "string" + example: "10 OFF" + description: "A default coupon to be used in case there are no coupons left" + expirationDate: + type: "string" + format: "date-time" + example: "2024-01-01T00:00:00Z" + description: "Specify an expiration date for the coupon collection in RFC3339\ + \ format. Use null to remove the expiration date." + remainingDaysAlert: + type: "integer" + example: 5 + description: "Send a notification alert (email) when the remaining days until\ + \ the expiration date are equal or fall bellow this number. Use null to\ + \ disable alerts." + remainingCouponsAlert: + type: "integer" + example: 5 + description: "Send a notification alert (email) when the remaining coupons\ + \ count is equal or fall bellow this number. Use null to disable alerts." + inline_response_200_8: type: "object" + required: + - "id" + - "name" properties: - agentId: + id: type: "string" - example: "d9nKoegKSjmCtyK78" - description: "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)." - receivedFrom: + format: "uuidv4" + example: "23befbae-1505-47a8-bd27-e30ef739f32c" + description: "The id of the collection" + name: type: "string" - example: "SuperAwesomeHelpdesk" - description: "mark your messages to distinguish messages created by you from\ - \ the others." - agentEmail: + format: "uuidv4" + example: "SummerPromotions" + description: "The name of the collection" + defaultCoupon: type: "string" - format: "email" - example: "liz@getwear.com" - description: "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." - agentName: + example: "10 OFF" + description: "The default coupon of the collection" + example: + name: "SummerPromotions" + id: "23befbae-1505-47a8-bd27-e30ef739f32c" + defaultCoupon: "10 OFF" + createCoupons: + type: "object" + required: + - "collectionId" + - "coupons" + properties: + collectionId: type: "string" - example: "Liz" - description: "agent name." - inline_response_201_2: + format: "uuidv4" + example: "23befbae-1505-47a8-bd27-e30ef739f32c" + description: "The id of the coupon collection for which the coupons will be\ + \ created" + coupons: + type: "array" + uniqueItems: true + items: + type: "string" + example: "Uf12AF" + description: "Name of the coupon" + maxItems: 1000 + minItems: 1 + inline_response_201_4: type: "object" required: - "messageId" @@ -14590,7 +17415,7 @@ definitions: description: "messageId of sent message" example: messageId: "23befbae-1505-47a8-bd27-e30ef739f32c" - inline_response_201_3: + inline_response_201_5: type: "object" required: - "id" @@ -14726,6 +17551,256 @@ definitions: type: "string" example: "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)" description: "Browser details of the user who performed the activity." + getInvitedUsersList_feature_access: + type: "object" + properties: + marketing: + format: "string" + example: "custom" + description: "Marketing features accessiblity." + conversations: + format: "string" + example: "none" + description: "Conversations features accessiblity." + crm: + format: "string" + example: "full" + description: "CRM features accessiblity." + description: "Feature accessiblity given to the user." + getInvitedUsersList_users: + type: "object" + required: + - "email" + - "feature_access" + - "is_owner" + - "status" + properties: + email: + type: "string" + example: "pendingInvitedUser@company.com" + description: "Email address of the user." + is_owner: + type: "string" + example: "true" + description: "Flag for indicating is user owner of the organization." + status: + type: "string" + example: "active" + description: "Status of the invited user." + feature_access: + $ref: "#/definitions/getInvitedUsersList_feature_access" + getCorporateInvitedUsersList_groups: + type: "object" + properties: + id: + type: "string" + example: "a5c4f22c08d9ed37ef1ca342" + description: "group id" + name: + type: "string" + example: "My group" + description: "group name" + description: "Admin user groups list" + getCorporateInvitedUsersList_feature_access: + type: "object" + properties: + user_management: + type: "array" + description: "User management accessiblity." + items: + type: "string" + example: "all / none" + api_keys: + type: "array" + description: "Api keys accessiblity." + items: + type: "string" + example: "all / none" + my_plan: + type: "array" + description: "My plan accessiblity." + items: + type: "string" + example: "all / none" + apps_management: + type: "array" + description: "Apps management accessiblity | Not available in ENTv2" + items: + type: "string" + example: "all / none" + description: "Feature accessiblity given to the user. (Required only if status\ + \ is active)" + getCorporateInvitedUsersList_users: + type: "object" + required: + - "email" + - "feature_access" + - "groups" + - "is_owner" + - "status" + properties: + groups: + $ref: "#/definitions/getCorporateInvitedUsersList_groups" + email: + type: "string" + example: "master-user@company.com" + description: "Email address of the user." + is_owner: + type: "string" + example: "false" + description: "Flag for indicating is user owner of the organization." + status: + type: "string" + example: "active" + description: "Status of the invited user." + feature_access: + $ref: "#/definitions/getCorporateInvitedUsersList_feature_access" + getCorporateUserPermission_groups: + type: "object" + properties: + id: + type: "string" + example: "6cbcxxxxxxxxxxxxxxxx457a" + description: "group identifier" + name: + type: "string" + example: "Staff" + description: "Group name" + description: "Groups details" + getCorporateUserPermission_feature_access: + type: "object" + properties: + api_keys: + type: "array" + description: "Permission on api keys" + items: + type: "string" + example: "all" + description: "Permission details" + my_plan: + type: "array" + description: "Permission on my plan" + items: + type: "string" + example: "all" + description: "Permission details" + user_management: + type: "array" + description: "Permission on user management" + items: + type: "string" + example: "none" + description: "Permission details" + apps_management: + type: "array" + description: "Permission on apps management" + items: + type: "string" + example: "all" + description: "Permission details" + description: "Granular feature permissions given to the user." + getUserPermission_privileges: + type: "object" + required: + - "feature" + - "permissions" + properties: + feature: + type: "string" + example: "Email campaign" + permissions: + type: "array" + items: + type: "string" + example: "Create / edit / delete" + inviteAdminUser_privileges: + type: "object" + properties: + feature: + type: "string" + example: "user_management" + description: "Feature name" + enum: + - "my_plan" + - "api" + - "user_management" + - "app_management" + permissions: + type: "array" + description: "Permissions for a given feature" + items: + type: "string" + example: "'all', 'none'" + enum: + - "all" + - "none" + description: "Privileges given to the user" + example: "[{\"feature\":\"my_plan\",\"permissions\":[\"all\"]},{\"feature\":\"\ + api\",\"permissions\":[\"none\"]}]" + inviteuser_privileges: + type: "object" + properties: + feature: + type: "string" + example: "email_campaigns" + description: "Feature name" + enum: + - "email_campaigns" + - "sms_campaigns" + - "contacts" + - "templates" + - "workflows" + - "facebook_ads" + - "landing_pages" + - "transactional_emails" + - "smtp_api" + - "user_management" + - "sales_platform" + - "phone" + - "conversations" + - "senders_domains_dedicated_ips" + - "push_notifications" + permissions: + type: "array" + description: "Permissions for a given feature" + items: + type: "string" + example: "'create_edit_delete', 'send_schedule_suspend'" + enum: + - "create_edit_delete" + - "send_schedule_suspend" + - "view" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - "activate_deactivate" + - "activate_deactivate_pause" + - "settings" + - "schedule_pause" + - "all" + - "logs" + - "access" + - "assign" + - "configure" + - "manage_owned_deals_tasks" + - "manage_others_deals_tasks" + - "manage_owned_companies" + - "manage_others_companies" + - "reports" + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - "send" + - "smtp" + - "api_keys" + - "authorized_ips" + - "none" + description: "Privileges given to the user" + example: "[{\"feature\":\"email_campaigns\",\"permissions\":[\"create_edit_delete\"\ + ,\"send_schedule_suspend\"]},{\"feature\":\"sms_campaigns\",\"permissions\"\ + :[\"create_edit_delete\",\"send_schedule_suspend\"]},{\"feature\":\"facebook_ads\"\ + ,\"permissions\":[\"create_edit_delete\",\"schedule_pause\"]}]" getChildInfo_credits: type: "object" properties: @@ -14976,8 +18051,9 @@ definitions: example: "marketing@mycompany.com" description: "Sender email of the campaign" id: - type: "string" - example: "43" + type: "integer" + format: "int64" + example: 43 description: "Sender id of the campaign" getWATemplates_templates: type: "object" @@ -15093,7 +18169,7 @@ definitions: createWhatsAppCampaign_recipients: type: "object" properties: - excludedIds: + excludedListIds: type: "array" description: "List ids to exclude from the campaign" items: @@ -15140,12 +18216,19 @@ definitions: $ref: "#/definitions/createDomainModel_dns_records_dkim_record" brevo_code: $ref: "#/definitions/createDomainModel_dns_records_dkim_record" + dmarc_record: + $ref: "#/definitions/createDomainModel_dns_records_dkim_record" example: dkim_record: type: "type" value: "value" host_name: "host_name" status: true + dmarc_record: + type: "type" + value: "value" + host_name: "host_name" + status: true brevo_code: type: "type" value: "value" @@ -15422,6 +18505,7 @@ definitions: - "replies" - "blocked" - "rejected" + - "skipped" reason: type: "string" example: "Message is undeliverable due to an incorrect / invalid / blacklisted\ @@ -15450,6 +18534,29 @@ definitions: type: "string" example: "43" description: "Sender id of the template" + getWebhook_auth: + type: "object" + properties: + type: + type: "string" + example: "bearer" + description: "Type of authentication" + token: + type: "string" + example: "test-auth-token1234" + description: "Webhook authentication token" + description: "Add authentication on webhook url" + getWebhook_headers: + type: "object" + properties: + key: + type: "string" + example: "cf-secret" + description: "Header key name" + value: + type: "string" + example: "test-header-value" + description: "Header value" getExtendedContactDetails_statistics_messagesSent: type: "object" required: @@ -16187,6 +19294,17 @@ definitions: type: "string" example: "Login Email confirmation" description: "Custom subject specific to message version\n" + htmlContent: + type: "string" + example: "

Confirm you email

Please\ + \ confirm your email address by clicking on the link below

" + description: "HTML body of the message. **Mandatory if 'templateId' is not\ + \ passed, ignored if 'templateId' is passed**\n" + textContent: + type: "string" + example: "Please confirm your email address by clicking on the link https://text.domain.com" + description: "Plain Text body of the message. **Ignored if 'templateId' is\ + \ passed**\n" updateBatchContacts_contacts: type: "object" properties: @@ -16359,6 +19477,19 @@ definitions: \ otherwise. The id of sms campaign for which the corresponding action shall\ \ be applied in the filter." description: "Set the filter for the contacts to be exported." + requestContactImport_jsonBody: + type: "object" + properties: + email: + type: "string" + attributes: + type: "object" + description: "List of attributes to be imported" + properties: {} + example: "{\"email\":\"ndicky0@ocn.ne.jp\",\"attributes\":{\"LNAME\":\"Noemi\"\ + ,\"FNAME\":\"Dicky\",\"COUNTRY\":\"DE\",\"BIRTHDAY\":\"11/02/1989\",\"PREFERED_COLOR\"\ + :\"BLACK\",\"WHATSAPP\":\"33689965433\",\"LANDLINE_NUMBER\":\"33689965433\"\ + ,\"SMS\":\"33689965433\"}}" requestContactImport_newList: type: "object" properties: @@ -16444,12 +19575,17 @@ definitions: type: "integer" format: "int64" example: 85 - description: "Number of accepted for the date" + description: "Number of accepted SMS for the date" rejected: type: "integer" format: "int64" example: 1 - description: "Number of rejected for the date" + description: "Number of rejected SMS for the date" + skipped: + type: "integer" + format: "int64" + example: 1 + description: "Number of skipped SMS for the date" getTransacEmailContent_events: type: "object" required: @@ -16608,12 +19744,22 @@ definitions: - "queued" - "processed" - "error" + subAccountsResponse_groups: + type: "object" + properties: + id: + type: "string" + description: "Group identifier" + name: + type: "string" + description: "Name of the group" subAccountsResponse_subAccounts: type: "object" required: - "active" - "companyName" - "createdAt" + - "groups" - "id" properties: id: @@ -16630,6 +19776,48 @@ definitions: type: "integer" format: "int64" description: "Timestamp when the sub-account was created" + groups: + type: "array" + description: "Group details" + items: + $ref: "#/definitions/subAccountsResponse_groups" + corporateGroupDetailsResponse_group: + type: "object" + properties: + id: + type: "string" + description: "Group id" + groupName: + type: "string" + description: "Name of the group" + createdAt: + type: "string" + description: "Group creation date" + corporateGroupDetailsResponse_subaccounts: + type: "object" + properties: + id: + type: "integer" + format: "int64" + description: "Id of the sub-account organzation" + companyName: + type: "string" + description: "Name of the sub-account organzation" + createdAt: + type: "string" + description: "Creation date of the sub-account organzation" + corporateGroupDetailsResponse_users: + type: "object" + properties: + email: + type: "string" + description: "Email address of the user" + lastName: + type: "string" + description: "Last name of the user" + firstName: + type: "string" + description: "First name of the user" masterDetailsResponse_billingInfo_name: type: "object" properties: @@ -16686,10 +19874,20 @@ definitions: type: "integer" format: "int64" description: "Quantity provided in the plan" + quantityWithOverages: + type: "integer" + format: "int64" + description: "Quantity with overages provided in the plan (only applicable\ + \ on ENTv2)" used: type: "integer" format: "int64" description: "Quantity consumed by master" + usedOverages: + type: "integer" + format: "int64" + description: "Quantity consumed by sub-organizations over the admin plan limit\ + \ (only applicable on ENTv2)" remaining: type: "integer" format: "int64" @@ -16722,6 +19920,15 @@ definitions: items: $ref: "#/definitions/masterDetailsResponse_planInfo_features" description: "Plan details" + subAccountDetailsResponse_groups: + type: "object" + properties: + id: + type: "string" + description: "Group id" + name: + type: "string" + description: "Name of the group" subAccountDetailsResponse_planInfo_credits_emails: type: "object" properties: @@ -16734,15 +19941,39 @@ definitions: format: "int64" description: "Available email messaging limits for use" description: "Email credits remaining on the sub-account" - subAccountDetailsResponse_planInfo_credits: + subAccountDetailsResponse_planInfo_credits_sms: type: "object" properties: - sms: + quantity: + type: "integer" + format: "int64" + description: "Quantity of SMS messaging limits provided" + remaining: + type: "integer" + format: "int64" + description: "Available SMS messaging limits for use" + description: "SMS credits remaining on the sub-account" + subAccountDetailsResponse_planInfo_credits_wpSubscribers: + type: "object" + properties: + quantity: + type: "integer" + format: "int64" + description: "Quantity of Push sending limits provided" + remaining: type: "integer" format: "int64" - description: "SMS credits remaining on the sub-account" + description: "Available Push sending limits for use" + description: "Push credits remaining on the sub-account" + subAccountDetailsResponse_planInfo_credits: + type: "object" + properties: emails: $ref: "#/definitions/subAccountDetailsResponse_planInfo_credits_emails" + sms: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_credits_sms" + wpSubscribers: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_credits_wpSubscribers" description: "Credits quota and remaining credits on the sub-account" subAccountDetailsResponse_planInfo_features_inbox: type: "object" @@ -16755,7 +19986,7 @@ definitions: type: "integer" format: "int64" description: "Available inboxes for use" - description: "Inbox details" + description: "Inbox details / Not available on ENTv2" subAccountDetailsResponse_planInfo_features_landingPage: type: "object" properties: @@ -16767,7 +19998,7 @@ definitions: type: "integer" format: "int64" description: "Available landing pages for use" - description: "Landing page details" + description: "Landing page details / Not available on ENTv2" subAccountDetailsResponse_planInfo_features_users: type: "object" properties: @@ -16808,6 +20039,15 @@ definitions: type: "integer" format: "int64" description: "Number of email credits" + sms: + type: "number" + format: "float" + description: "Number of SMS credits | available in ENT-v2 only" + wpSubscribers: + type: "integer" + format: "int64" + description: "Number of Push credits, possible value is 0 and -1 | available\ + \ in ENT-v2 only" description: "Credit details to update" subAccountUpdatePlanRequest_features: type: "object" @@ -16819,11 +20059,11 @@ definitions: landingPage: type: "integer" format: "int64" - description: "Number of landing pages" + description: "Number of landing pages / Not required on ENTv2" inbox: type: "integer" format: "int64" - description: "Number of inboxes" + description: "Number of inboxes / Not required on ENTv2" description: "Features details to update" DealAttributes_inner: type: "object" @@ -16971,6 +20211,10 @@ definitions: type: "string" example: "CA" description: "Billing country 2-letter ISO code." + country: + type: "string" + example: "Canada" + description: "Billing country name." phone: type: "string" example: "01559 032133" @@ -16990,6 +20234,31 @@ definitions: example: "Northwestern Switzerland" description: "Exact region (state/province) for delivery and billing." description: "Billing details of an order." + event_identifiers: + type: "object" + properties: + email_id: + type: "string" + example: "jane.doe@example.com" + description: "Email Id associated with the event" + phone_id: + type: "string" + example: "+91xxxxxxxxxx" + description: "SMS associated with the event" + whatsapp_id: + type: "string" + example: "+91xxxxxxxxxx" + description: "whatsapp associated with the event" + landline_number_id: + type: "string" + example: "+91xxxxxxxxxx" + description: "landline_number associated with the event" + ext_id: + type: "string" + example: "abc123" + description: "ext_id associated with the event" + description: "Identifies the contact associated with the event. At least one identifier\ + \ is required." getWhatsappEventReport_events: type: "object" required: diff --git a/docs/AbTestCampaignResult.md b/docs/AbTestCampaignResult.md index 7147589..ced5613 100644 --- a/docs/AbTestCampaignResult.md +++ b/docs/AbTestCampaignResult.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **OpenRate** | **string** | Open rate for current winning version | [optional] [default to null] **ClickRate** | **string** | Click rate for current winning version | [optional] [default to null] **WinningVersionRate** | **string** | Open/Click rate for the winner version | [optional] [default to null] -**Statistics** | [***AbTestCampaignResultStatistics**](AbTestCampaignResultStatistics.md) | | [optional] [default to null] -**ClickedLinks** | [***AbTestCampaignResultClickedLinks**](AbTestCampaignResultClickedLinks.md) | | [optional] [default to null] +**Statistics** | [***AbTestCampaignResultStatistics**](abTestCampaignResult_statistics.md) | | [optional] [default to null] +**ClickedLinks** | [***AbTestCampaignResultClickedLinks**](abTestCampaignResult_clickedLinks.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 01589de..d7feb69 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -17,7 +17,7 @@ This endpoint does not need any parameter. ### Return type -[**GetAccount**](GetAccount.md) +[**GetAccount**](getAccount.md) ### Authorization @@ -53,7 +53,7 @@ Name | Type | Description | Notes ### Return type -[**GetAccountActivity**](GetAccountActivity.md) +[**GetAccountActivity**](getAccountActivity.md) ### Authorization diff --git a/docs/Body.md b/docs/Body.md index e02508b..10bb0f9 100644 --- a/docs/Body.md +++ b/docs/Body.md @@ -3,9 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of company | [default to null] -**Attributes** | **map[string]interface{}** | Attributes for company creation | [optional] [default to null] -**CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] +**GroupName** | **string** | The name of the group of sub-accounts | [default to null] +**SubAccountIds** | **[]int64** | Pass the list of sub-account Ids to be included in the group | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body1.md b/docs/Body1.md index 97137a1..9d3d310 100644 --- a/docs/Body1.md +++ b/docs/Body1.md @@ -3,9 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of company | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Attributes for company update | [optional] [default to null] -**CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] +**Ip** | **string** | IP Address | [default to null] +**Ids** | **[]int64** | Pass the list of sub-account Ids to be associated with the IP address | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body10.md b/docs/Body10.md index 0e75d0b..837c9cb 100644 --- a/docs/Body10.md +++ b/docs/Body10.md @@ -3,10 +3,10 @@ ## 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> | [default to null] -**Text** | **string** | message text | [default to null] -**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] [default to null] -**GroupId** | **string** | group ID. It can be found on group’s page. Optional if `agentId` is set. | [optional] [default to null] +**LinkContactIds** | **[]int64** | Contact ids for contacts to be linked with deal | [optional] [default to null] +**UnlinkContactIds** | **[]int64** | Contact ids for contacts to be unlinked from deal | [optional] [default to null] +**LinkCompanyIds** | **[]string** | Company ids to be linked with deal | [optional] [default to null] +**UnlinkCompanyIds** | **[]string** | Company ids to be unlinked from deal | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body11.md b/docs/Body11.md index d810c79..f600343 100644 --- a/docs/Body11.md +++ b/docs/Body11.md @@ -3,7 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Text** | **string** | edited message text | [default to null] +**Name** | **string** | Name of task | [default to null] +**Duration** | **int64** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] +**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [default to null] +**Date** | [**time.Time**](time.Time.md) | Task due date and time | [default to null] +**Notes** | **string** | Notes added to a task | [optional] [default to null] +**Done** | **bool** | Task marked as done | [optional] [default to null] +**AssignToId** | **string** | To assign a task to a user you can use either the account email or ID. | [optional] [default to null] +**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] +**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] +**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] +**Reminder** | [***TaskReminder**](TaskReminder.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body12.md b/docs/Body12.md index b5e2265..f0c9007 100644 --- a/docs/Body12.md +++ b/docs/Body12.md @@ -3,10 +3,16 @@ ## 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] [default to null] -**ReceivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] [default to null] -**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] [default to null] -**AgentName** | **string** | agent name. | [optional] [default to null] +**Name** | **string** | Name of task | [optional] [default to null] +**Duration** | **int32** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] +**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [optional] [default to null] +**Date** | [**time.Time**](time.Time.md) | Task date/time | [optional] [default to null] +**Notes** | **string** | Notes added to a task | [optional] [default to null] +**Done** | **bool** | Task marked as done | [optional] [default to null] +**AssignToId** | **string** | To assign a task to a user you can use either the account email or ID. | [optional] [default to null] +**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] +**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] +**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body13.md b/docs/Body13.md new file mode 100644 index 0000000..f431c38 --- /dev/null +++ b/docs/Body13.md @@ -0,0 +1,15 @@ +# Body13 + +## 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> | [default to null] +**Text** | **string** | message text | [default to null] +**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] [default to null] +**ReceivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] [default to null] +**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] [default to null] +**AgentName** | **string** | agent name | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body14.md b/docs/Body14.md new file mode 100644 index 0000000..a8befd1 --- /dev/null +++ b/docs/Body14.md @@ -0,0 +1,10 @@ +# Body14 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | edited message text | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body15.md b/docs/Body15.md new file mode 100644 index 0000000..3e29ff2 --- /dev/null +++ b/docs/Body15.md @@ -0,0 +1,13 @@ +# Body15 + +## 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> | [default to null] +**Text** | **string** | message text | [default to null] +**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] [default to null] +**GroupId** | **string** | group ID. It can be found on group’s page. Optional if `agentId` is set. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body16.md b/docs/Body16.md new file mode 100644 index 0000000..9986c17 --- /dev/null +++ b/docs/Body16.md @@ -0,0 +1,10 @@ +# Body16 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | edited message text | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body17.md b/docs/Body17.md new file mode 100644 index 0000000..47ebd9f --- /dev/null +++ b/docs/Body17.md @@ -0,0 +1,13 @@ +# Body17 + +## 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] [default to null] +**ReceivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] [default to null] +**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] [default to null] +**AgentName** | **string** | agent name. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body2.md b/docs/Body2.md index 17d6bdc..ddde15d 100644 --- a/docs/Body2.md +++ b/docs/Body2.md @@ -3,10 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**LinkContactIds** | **[]int64** | Contact ids for contacts to be linked with company | [optional] [default to null] -**UnlinkContactIds** | **[]int64** | Contact ids for contacts to be unlinked from company | [optional] [default to null] -**LinkDealsIds** | **[]string** | Deals ids for deals to be linked with company | [optional] [default to null] -**UnlinkDealsIds** | **[]string** | Deals ids for deals to be unlinked from company | [optional] [default to null] +**Ip** | **string** | IP Address | [default to null] +**Ids** | **[]int64** | Pass the list of sub-account Ids to be dissociated from the IP address | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body3.md b/docs/Body3.md index 566b6e7..47775c4 100644 --- a/docs/Body3.md +++ b/docs/Body3.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of deal | [default to null] -**Attributes** | **map[string]interface{}** | Attributes fo\\r deal creation | [optional] [default to null] +**GroupName** | **string** | The name of the group of sub-accounts | [default to null] +**SubAccountIds** | **[]int64** | Pass the list of sub-account Ids to be included in the group | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body4.md b/docs/Body4.md index ed4bb5e..dae3789 100644 --- a/docs/Body4.md +++ b/docs/Body4.md @@ -3,8 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of deal | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Attributes for deal update | [optional] [default to null] +**SubAccountIds** | **[]int64** | List of sub-account ids | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body5.md b/docs/Body5.md index 3899e1a..da73b96 100644 --- a/docs/Body5.md +++ b/docs/Body5.md @@ -3,10 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**LinkContactIds** | **[]int64** | Contact ids for contacts to be linked with deal | [optional] [default to null] -**UnlinkContactIds** | **[]int64** | Contact ids for contacts to be unlinked from deal | [optional] [default to null] -**LinkCompanyIds** | **[]string** | Company ids to be linked with deal | [optional] [default to null] -**UnlinkCompanyIds** | **[]string** | Company ids to be unlinked from deal | [optional] [default to null] +**Name** | **string** | Name of company | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company creation | [optional] [default to null] +**CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] +**LinkedContactsIds** | **[]int64** | Contact ids to be linked with company | [optional] [default to null] +**LinkedDealsIds** | **[]string** | Deal ids to be linked with company | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body6.md b/docs/Body6.md index 87091ca..f1d5097 100644 --- a/docs/Body6.md +++ b/docs/Body6.md @@ -3,17 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of task | [default to null] -**Duration** | **int64** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] -**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [default to null] -**Date** | [**time.Time**](time.Time.md) | Task due date and time | [default to null] -**Notes** | **string** | Notes added to a task | [optional] [default to null] -**Done** | **bool** | Task marked as done | [optional] [default to null] -**AssignToId** | **string** | User id to whom task is assigned | [optional] [default to null] -**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] -**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] -**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] -**Reminder** | [***TaskReminder**](TaskReminder.md) | | [optional] [default to null] +**Name** | **string** | Name of company | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company update | [optional] [default to null] +**CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body7.md b/docs/Body7.md index a01db2f..716e92c 100644 --- a/docs/Body7.md +++ b/docs/Body7.md @@ -3,16 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of task | [optional] [default to null] -**Duration** | **int32** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] -**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [optional] [default to null] -**Date** | [**time.Time**](time.Time.md) | Task date/time | [optional] [default to null] -**Notes** | **string** | Notes added to a task | [optional] [default to null] -**Done** | **bool** | Task marked as done | [optional] [default to null] -**AssignToId** | **string** | User id to whom task is assigned | [optional] [default to null] -**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] -**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] -**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] +**LinkContactIds** | **[]int64** | Contact ids for contacts to be linked with company | [optional] [default to null] +**UnlinkContactIds** | **[]int64** | Contact ids for contacts to be unlinked from company | [optional] [default to null] +**LinkDealsIds** | **[]string** | Deals ids for deals to be linked with company | [optional] [default to null] +**UnlinkDealsIds** | **[]string** | Deals ids for deals to be unlinked from company | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body8.md b/docs/Body8.md index f57d2a0..7d1bc24 100644 --- a/docs/Body8.md +++ b/docs/Body8.md @@ -3,12 +3,10 @@ ## 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> | [default to null] -**Text** | **string** | message text | [default to null] -**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] [default to null] -**ReceivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] [default to null] -**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] [default to null] -**AgentName** | **string** | agent name | [optional] [default to null] +**Name** | **string** | Name of deal | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] +**LinkedContactsIds** | **[]int64** | Contact ids to be linked with deal | [optional] [default to null] +**LinkedCompaniesIds** | **[]string** | Company ids to be linked with deal | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body9.md b/docs/Body9.md index 6367fed..00eb1e9 100644 --- a/docs/Body9.md +++ b/docs/Body9.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Text** | **string** | edited message text | [default to null] +**Name** | **string** | Name of deal | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Cart.md b/docs/Cart.md new file mode 100644 index 0000000..5fb0f70 --- /dev/null +++ b/docs/Cart.md @@ -0,0 +1,11 @@ +# Cart + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Currency** | **string** | Currency code for the payment amount. | [default to null] +**SpecificAmount** | **int64** | Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md index d294efb..8d9c1c3 100644 --- a/docs/CompaniesApi.md +++ b/docs/CompaniesApi.md @@ -136,7 +136,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| | - **body** | [**Body1**](Body1.md)| Updated company details. | + **body** | [**Body6**](Body6.md)| Updated company details. | ### Return type @@ -163,7 +163,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| | - **body** | [**Body2**](Body2.md)| Linked / Unlinked contacts and deals ids. | + **body** | [**Body7**](Body7.md)| Linked / Unlinked contacts and deals ids. | ### Return type @@ -181,7 +181,7 @@ Name | Type | Description | Notes [[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** -> InlineResponse200 CompaniesPost(ctx, body) +> InlineResponse2002 CompaniesPost(ctx, body) Create a company ### Required Parameters @@ -189,11 +189,11 @@ Create a company Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body**](Body.md)| Company create data. | + **body** | [**Body5**](Body5.md)| Company create data. | ### Return type -[**InlineResponse200**](inlineResponse200.md) +[**InlineResponse2002**](inline_response_200_2.md) ### Authorization diff --git a/docs/Company.md b/docs/Company.md index ca83e4b..f7c4248 100644 --- a/docs/Company.md +++ b/docs/Company.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | Unique company id | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Company attributes with values | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Company attributes with values | [optional] [default to null] **LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this company | [optional] [default to null] **LinkedDealsIds** | **[]string** | Deals ids for companies linked to this company | [optional] [default to null] diff --git a/docs/CompanyAttributesInner.md b/docs/CompanyAttributesInner.md index 74012f8..8c3282a 100644 --- a/docs/CompanyAttributesInner.md +++ b/docs/CompanyAttributesInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **InternalName** | **string** | | [optional] [default to null] **Label** | **string** | | [optional] [default to null] **AttributeTypeName** | **string** | | [optional] [default to null] -**AttributeOptions** | **map[string]interface{}** | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **IsRequired** | **bool** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Configuration.md b/docs/Configuration.md new file mode 100644 index 0000000..336698c --- /dev/null +++ b/docs/Configuration.md @@ -0,0 +1,10 @@ +# Configuration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomSuccessUrl** | **string** | Absolute URL of the custom success page. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index ac5c587..7744ec2 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -49,7 +49,7 @@ Name | Type | Description | Notes ### Return type -[**PostContactInfo**](PostContactInfo.md) +[**PostContactInfo**](postContactInfo.md) ### Authorization @@ -103,7 +103,7 @@ Name | Type | Description | Notes ### Return type -[**CreateUpdateContactModel**](CreateUpdateContactModel.md) +[**CreateUpdateContactModel**](createUpdateContactModel.md) ### Authorization @@ -155,7 +155,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -181,7 +181,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -308,7 +308,7 @@ This endpoint does not need any parameter. ### Return type -[**GetAttributes**](GetAttributes.md) +[**GetAttributes**](getAttributes.md) ### Authorization @@ -346,7 +346,7 @@ Name | Type | Description | Notes ### Return type -[**GetExtendedContactDetails**](GetExtendedContactDetails.md) +[**GetExtendedContactDetails**](getExtendedContactDetails.md) ### Authorization @@ -382,7 +382,7 @@ Name | Type | Description | Notes ### Return type -[**GetContactCampaignStats**](GetContactCampaignStats.md) +[**GetContactCampaignStats**](getContactCampaignStats.md) ### Authorization @@ -416,10 +416,13 @@ Name | Type | Description | Notes **modifiedSince** | **optional.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** | **optional.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** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] + **segmentId** | **optional.Int64**| Id of the segment. **Either listIds or segmentId can be passed.** | + **listIds** | [**optional.Interface of []int64**](int64.md)| Ids of the list. **Either listIds or segmentId can be passed.** | + **filter** | **optional.String**| Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** | ### Return type -[**GetContacts**](GetContacts.md) +[**GetContacts**](getContacts.md) ### Authorization @@ -457,7 +460,7 @@ Name | Type | Description | Notes ### Return type -[**GetContacts**](GetContacts.md) +[**GetContacts**](getContacts.md) ### Authorization @@ -483,7 +486,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolder**](GetFolder.md) +[**GetFolder**](getFolder.md) ### Authorization @@ -520,7 +523,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolderLists**](GetFolderLists.md) +[**GetFolderLists**](getFolderLists.md) ### Authorization @@ -557,7 +560,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolders**](GetFolders.md) +[**GetFolders**](getFolders.md) ### Authorization @@ -571,7 +574,7 @@ Name | Type | Description | Notes [[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** -> GetExtendedList GetList(ctx, listId) +> GetExtendedList GetList(ctx, listId, optional) Get a list's details ### Required Parameters @@ -580,6 +583,16 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **listId** | **int64**| Id of the list | + **optional** | ***GetListOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetListOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startDate** | **optional.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** | **optional.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 | ### Return type @@ -618,7 +631,7 @@ Name | Type | Description | Notes ### Return type -[**GetLists**](GetLists.md) +[**GetLists**](getLists.md) ### Authorization @@ -655,7 +668,7 @@ Name | Type | Description | Notes ### Return type -[**GetSegments**](GetSegments.md) +[**GetSegments**](getSegments.md) ### Authorization @@ -672,7 +685,7 @@ Name | Type | Description | Notes > CreatedProcessId ImportContacts(ctx, requestContactImport) Import contacts -It returns the background process ID which on completion calls the notify URL that you have set in the input. +It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end. ### Required Parameters @@ -683,7 +696,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](CreatedProcessId.md) +[**CreatedProcessId**](createdProcessId.md) ### Authorization @@ -710,7 +723,7 @@ Name | Type | Description | Notes ### Return type -[**PostContactInfo**](PostContactInfo.md) +[**PostContactInfo**](postContactInfo.md) ### Authorization @@ -738,7 +751,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](CreatedProcessId.md) +[**CreatedProcessId**](createdProcessId.md) ### Authorization diff --git a/docs/ConversationsApi.md b/docs/ConversationsApi.md index cd100c7..b3db707 100644 --- a/docs/ConversationsApi.md +++ b/docs/ConversationsApi.md @@ -26,7 +26,7 @@ We recommend pinging this endpoint every minute for as long as the agent has to Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body12**](Body12.md)| Agent fields. | + **body** | [**Body17**](Body17.md)| Agent fields. | ### Return type @@ -117,7 +117,7 @@ Optional parameters are passed through a pointer to a ConversationsMessagesIdPut Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of Body9**](Body9.md)| | + **body** | [**optional.Interface of Body14**](Body14.md)| | ### Return type @@ -143,7 +143,7 @@ Send a message as an agent Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body8**](Body8.md)| Message fields. | + **body** | [**Body13**](Body13.md)| Message fields. | ### Return type @@ -222,7 +222,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| ID of the message | - **body** | [**Body11**](Body11.md)| | + **body** | [**Body16**](Body16.md)| | ### Return type @@ -250,7 +250,7 @@ Example of automated messages: order status, announce new features in your web a Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body10**](Body10.md)| | + **body** | [**Body15**](Body15.md)| | ### Return type diff --git a/docs/ConversationsMessage.md b/docs/ConversationsMessage.md index 312c52c..72ed4cd 100644 --- a/docs/ConversationsMessage.md +++ b/docs/ConversationsMessage.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **CreatedAt** | **int64** | Timestamp in milliseconds. | [optional] [default to null] **IsPushed** | **bool** | `true` for pushed messages | [optional] [default to null] **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] [default to null] -**File** | [***ConversationsMessageFile**](ConversationsMessageFile.md) | | [optional] [default to null] +**File** | [***ConversationsMessageFile**](ConversationsMessage_file.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversationsMessageFile.md b/docs/ConversationsMessageFile.md index 6ac18bb..b45731b 100644 --- a/docs/ConversationsMessageFile.md +++ b/docs/ConversationsMessageFile.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Size** | **int64** | Size in bytes | [optional] [default to null] **IsImage** | **bool** | Whether the file is an image | [optional] [default to null] **Url** | **string** | URL of the file | [optional] [default to null] -**ImageInfo** | [***ConversationsMessageFileImageInfo**](ConversationsMessageFileImageInfo.md) | | [optional] [default to null] +**ImageInfo** | [***ConversationsMessageFileImageInfo**](ConversationsMessage_file_imageInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversionSourceMetrics.md b/docs/ConversionSourceMetrics.md new file mode 100644 index 0000000..5a2facd --- /dev/null +++ b/docs/ConversionSourceMetrics.md @@ -0,0 +1,14 @@ +# ConversionSourceMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | | [default to null] +**ConversionSource** | **string** | | [default to null] +**OrdersCount** | **float32** | | [default to null] +**Revenue** | **float32** | | [default to null] +**AverageBasket** | **float32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConversionSourceProduct.md b/docs/ConversionSourceProduct.md new file mode 100644 index 0000000..246c449 --- /dev/null +++ b/docs/ConversionSourceProduct.md @@ -0,0 +1,17 @@ +# ConversionSourceProduct + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [default to null] +**Name** | **string** | | [optional] [default to null] +**Sku** | **string** | | [optional] [default to null] +**Price** | **float32** | | [optional] [default to null] +**Url** | **string** | | [optional] [default to null] +**ImageUrl** | **string** | | [optional] [default to null] +**OrdersCount** | **int32** | | [optional] [default to null] +**Revenue** | **float32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CorporateGroupDetailsResponse.md b/docs/CorporateGroupDetailsResponse.md new file mode 100644 index 0000000..8449016 --- /dev/null +++ b/docs/CorporateGroupDetailsResponse.md @@ -0,0 +1,12 @@ +# CorporateGroupDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Group** | [***CorporateGroupDetailsResponseGroup**](corporateGroupDetailsResponse_group.md) | | [optional] [default to null] +**SubAccounts** | [**[]CorporateGroupDetailsResponseSubaccounts**](corporateGroupDetailsResponse_subaccounts.md) | | [optional] [default to null] +**Users** | [**[]CorporateGroupDetailsResponseUsers**](corporateGroupDetailsResponse_users.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CorporateGroupDetailsResponseGroup.md b/docs/CorporateGroupDetailsResponseGroup.md new file mode 100644 index 0000000..f11c455 --- /dev/null +++ b/docs/CorporateGroupDetailsResponseGroup.md @@ -0,0 +1,12 @@ +# CorporateGroupDetailsResponseGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Group id | [optional] [default to null] +**GroupName** | **string** | Name of the group | [optional] [default to null] +**CreatedAt** | **string** | Group creation date | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CorporateGroupDetailsResponseSubaccounts.md b/docs/CorporateGroupDetailsResponseSubaccounts.md new file mode 100644 index 0000000..77e3c2b --- /dev/null +++ b/docs/CorporateGroupDetailsResponseSubaccounts.md @@ -0,0 +1,12 @@ +# CorporateGroupDetailsResponseSubaccounts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | Id of the sub-account organzation | [optional] [default to null] +**CompanyName** | **string** | Name of the sub-account organzation | [optional] [default to null] +**CreatedAt** | **string** | Creation date of the sub-account organzation | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CorporateGroupDetailsResponseUsers.md b/docs/CorporateGroupDetailsResponseUsers.md new file mode 100644 index 0000000..4ca7d16 --- /dev/null +++ b/docs/CorporateGroupDetailsResponseUsers.md @@ -0,0 +1,12 @@ +# CorporateGroupDetailsResponseUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user | [optional] [default to null] +**LastName** | **string** | Last name of the user | [optional] [default to null] +**FirstName** | **string** | First name of the user | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CouponsApi.md b/docs/CouponsApi.md new file mode 100644 index 0000000..353101e --- /dev/null +++ b/docs/CouponsApi.md @@ -0,0 +1,162 @@ +# \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** +> InlineResponse2013 CreateCouponCollection(ctx, createCouponCollection) +Create а coupon collection + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createCouponCollection** | [**CreateCouponCollection**](CreateCouponCollection.md)| Values to create a coupon collection | + +### Return type + +[**InlineResponse2013**](inline_response_201_3.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(ctx, createCoupons) +Create coupons for a coupon collection + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createCoupons** | [**CreateCoupons**](CreateCoupons.md)| Values to create coupons | + +### Return type + + (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** +> GetCouponCollection GetCouponCollection(ctx, id) +Get a coupon collection by id + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the collection to return | + +### Return type + +[**GetCouponCollection**](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** +> GetCouponCollection GetCouponCollections(ctx, optional) +Get all your coupon collections + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***GetCouponCollectionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetCouponCollectionsOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **optional.Int64**| Number of documents returned per page | [default to 50] + **offset** | **optional.Int64**| Index of the first document on the page | [default to 0] + **sort** | **optional.String**| Sort the results by creation time in ascending/descending order | [default to desc] + **sortBy** | **optional.String**| The field used to sort coupon collections | [default to createdAt] + +### Return type + +[**GetCouponCollection**](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** +> InlineResponse2008 UpdateCouponCollection(ctx, id, optional) +Update a coupon collection by id + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the collection to update | + **optional** | ***UpdateCouponCollectionOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a UpdateCouponCollectionOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateCouponCollection** | [**optional.Interface of UpdateCouponCollection**](UpdateCouponCollection.md)| Values to update the coupon collection | + +### Return type + +[**InlineResponse2008**](inline_response_200_8.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/docs/CreateAttribute.md b/docs/CreateAttribute.md index 0e09be0..0a9db15 100644 --- a/docs/CreateAttribute.md +++ b/docs/CreateAttribute.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] **IsRecurring** | **bool** | Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]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] [default to null] -**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] [default to null] +**Enumeration** | [**[]CreateAttributeEnumeration**](createAttribute_enumeration.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] [default to null] +**MultiCategoryOptions** | **[]string** | List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** | [optional] [default to null] +**Type_** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateContact.md b/docs/CreateContact.md index 79229f9..47b127d 100644 --- a/docs/CreateContact.md +++ b/docs/CreateContact.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] **ExtId** | **string** | Pass your own Id to create a contact. | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **EmailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] [default to null] **ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] diff --git a/docs/CreateCouponCollection.md b/docs/CreateCouponCollection.md new file mode 100644 index 0000000..66f0163 --- /dev/null +++ b/docs/CreateCouponCollection.md @@ -0,0 +1,14 @@ +# CreateCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the coupons collection | [default to null] +**DefaultCoupon** | **string** | Default coupons collection name | [default to null] +**ExpirationDate** | [**time.Time**](time.Time.md) | Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. | [optional] [default to null] +**RemainingDaysAlert** | **int32** | Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. | [optional] [default to null] +**RemainingCouponsAlert** | **int32** | Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCoupons.md b/docs/CreateCoupons.md new file mode 100644 index 0000000..394422c --- /dev/null +++ b/docs/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 | [default to null] +**Coupons** | **[]string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDoiContact.md b/docs/CreateDoiContact.md index 6a5c1ed..82c7602 100644 --- a/docs/CreateDoiContact.md +++ b/docs/CreateDoiContact.md @@ -4,7 +4,7 @@ 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. | [default to null] -**Attributes** | **map[string]interface{}** | Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES':['India','China']} | [optional] [default to null] **IncludeListIds** | **[]int64** | Lists under user account where contact should be added | [default to null] **ExcludeListIds** | **[]int64** | Lists under user account where contact should not be added | [optional] [default to null] **TemplateId** | **int64** | Id of the Double opt-in (DOI) template | [default to null] diff --git a/docs/CreateDomainModel.md b/docs/CreateDomainModel.md index dc36dca..f3889dc 100644 --- a/docs/CreateDomainModel.md +++ b/docs/CreateDomainModel.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int64** | ID of the Domain created | [default to null] **DomainName** | **string** | Domain | [optional] [default to null] +**DomainProvider** | **string** | Domain Provider | [optional] [default to null] **Message** | **string** | Success message | [optional] [default to null] -**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModelDnsRecords.md) | | [optional] [default to null] +**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModel_dns_records.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateDomainModelDnsRecords.md b/docs/CreateDomainModelDnsRecords.md index 849a8f0..6169b6b 100644 --- a/docs/CreateDomainModelDnsRecords.md +++ b/docs/CreateDomainModelDnsRecords.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DkimRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModelDnsRecordsDkimRecord.md) | | [optional] [default to null] -**BrevoCode** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModelDnsRecordsdkimRecord.md) | | [optional] [default to null] +**DkimRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] +**BrevoCode** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] +**DmarcRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md index 409dcdb..9ef9082 100644 --- a/docs/CreateEmailCampaign.md +++ b/docs/CreateEmailCampaign.md @@ -4,23 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the campaign | [optional] [default to null] -**Sender** | [***CreateEmailCampaignSender**](createEmailCampaignSender.md) | | [default to null] +**Sender** | [***CreateEmailCampaignSender**](createEmailCampaign_sender.md) | | [default to null] **Name** | **string** | Name of the campaign | [default to null] **HtmlContent** | **string** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional] [default to null] **HtmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] [default to null] **TemplateId** | **int64** | 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] [default to null] **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] [default to null] **Subject** | **string** | Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. | [optional] [default to null] +**PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **ReplyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] [default to null] **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] [default to null] -**Recipients** | [***CreateEmailCampaignRecipients**](createEmailCampaignRecipients.md) | | [optional] [default to null] +**Recipients** | [***CreateEmailCampaignRecipients**](createEmailCampaign_recipients.md) | | [optional] [default to null] **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] [default to null] **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 null] **MirrorActive** | **bool** | Use true to enable the mirror link | [optional] [default to null] **Footer** | **string** | Footer of the email campaign | [optional] [default to null] **Header** | **string** | Header of the email campaign | [optional] [default to null] **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] [default to null] -**Params** | **map[string]interface{}** | 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] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **SendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to null] **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 null] **SubjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] diff --git a/docs/CreateExternalFeed.md b/docs/CreateExternalFeed.md index 118d694..9e84785 100644 --- a/docs/CreateExternalFeed.md +++ b/docs/CreateExternalFeed.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [optional] [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [optional] [default to null] **Cache** | **bool** | Toggle caching of feed url response | [optional] [default to null] diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md new file mode 100644 index 0000000..c4c6a09 --- /dev/null +++ b/docs/CreatePaymentRequest.md @@ -0,0 +1,15 @@ +# CreatePaymentRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reference** | **string** | Reference of the payment request, it will appear on the payment page. | [default to null] +**Cart** | [***Cart**](cart.md) | | [default to null] +**ContactId** | **int64** | Brevo ID of the contact requested to pay. | [default to null] +**Description** | **string** | description of payment request. | [optional] [default to null] +**Notification** | [***Notification**](notification.md) | | [optional] [default to null] +**Configuration** | [***Configuration**](configuration.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePaymentResponse.md b/docs/CreatePaymentResponse.md new file mode 100644 index 0000000..93fe1b5 --- /dev/null +++ b/docs/CreatePaymentResponse.md @@ -0,0 +1,11 @@ +# CreatePaymentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the object created | [default to null] +**Url** | **string** | URL of the payment request created | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateSender.md b/docs/CreateSender.md index 3df7e03..e0b13e0 100644 --- a/docs/CreateSender.md +++ b/docs/CreateSender.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | From Name to use for the sender | [default to null] **Email** | **string** | From email to use for the sender. A verification email will be sent to this address. | [default to null] -**Ips** | [**[]CreateSenderIps**](createSenderIps.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] [default to null] +**Ips** | [**[]CreateSenderIps**](createSender_ips.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateSmsCampaign.md b/docs/CreateSmsCampaign.md index 1ce0528..59fe42d 100644 --- a/docs/CreateSmsCampaign.md +++ b/docs/CreateSmsCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the campaign | [default to null] **Sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [default to null] **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 | [default to null] -**Recipients** | [***CreateSmsCampaignRecipients**](createSmsCampaignRecipients.md) | | [optional] [default to null] +**Recipients** | [***CreateSmsCampaignRecipients**](createSmsCampaign_recipients.md) | | [optional] [default to null] **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] [default to null] **UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] **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] [default to null] diff --git a/docs/CreateSmtpTemplate.md b/docs/CreateSmtpTemplate.md index c2c58eb..635387a 100644 --- a/docs/CreateSmtpTemplate.md +++ b/docs/CreateSmtpTemplate.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the template | [optional] [default to null] -**Sender** | [***CreateSmtpTemplateSender**](createSmtpTemplateSender.md) | | [default to null] +**Sender** | [***CreateSmtpTemplateSender**](createSmtpTemplate_sender.md) | | [default to null] **TemplateName** | **string** | Name of the template | [default to null] **HtmlContent** | **string** | Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty | [optional] [default to null] **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] diff --git a/docs/CreateSubAccount.md b/docs/CreateSubAccount.md index f72fae9..d2ad1cd 100644 --- a/docs/CreateSubAccount.md +++ b/docs/CreateSubAccount.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Email** | **string** | Email address for the organization | [default to null] **Language** | **string** | Set the language of the sub-account | [optional] [default to null] **Timezone** | **string** | Set the timezone of the sub-account | [optional] [default to null] +**GroupIds** | **[]string** | Set the group(s) for the sub-account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUpdateCategories.md b/docs/CreateUpdateCategories.md index 0d5e86e..de3b04d 100644 --- a/docs/CreateUpdateCategories.md +++ b/docs/CreateUpdateCategories.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Name** | **string** | **Mandatory in case of creation**. Name of the Category, as displayed in the shop | [optional] [default to null] **Url** | **string** | URL to the category | [optional] [default to null] **DeletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] [default to null] +**IsDeleted** | **bool** | category deleted from the shop's database | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUpdateCategory.md b/docs/CreateUpdateCategory.md index 3694834..90d1aeb 100644 --- a/docs/CreateUpdateCategory.md +++ b/docs/CreateUpdateCategory.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **Url** | **string** | URL to the category | [optional] [default to null] **UpdateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to null] **DeletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] [default to null] +**IsDeleted** | **bool** | category deleted from the shop's database | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUpdateProduct.md b/docs/CreateUpdateProduct.md index 6b63b47..6721a5a 100644 --- a/docs/CreateUpdateProduct.md +++ b/docs/CreateUpdateProduct.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **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] [default to null] **UpdateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to null] **DeletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] [default to null] +**IsDeleted** | **bool** | product deleted from the shop's database | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUpdateProducts.md b/docs/CreateUpdateProducts.md index ab7f727..44695db 100644 --- a/docs/CreateUpdateProducts.md +++ b/docs/CreateUpdateProducts.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **ParentId** | **string** | Parent product id of the product | [optional] [default to null] **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] [default to null] **DeletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] [default to null] +**IsDeleted** | **bool** | product deleted from the shop's database | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateWebhook.md b/docs/CreateWebhook.md index b6d5b41..b73e32e 100644 --- a/docs/CreateWebhook.md +++ b/docs/CreateWebhook.md @@ -8,6 +8,9 @@ Name | Type | Description | Notes **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` | [default to null] **Type_** | **string** | Type of the webhook | [optional] [default to null] **Domain** | **string** | Inbound domain of webhook, required in case of event type `inbound` | [optional] [default to null] +**Batched** | **bool** | To send batched webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateWhatsAppCampaign.md b/docs/CreateWhatsAppCampaign.md index 8098c24..002c635 100644 --- a/docs/CreateWhatsAppCampaign.md +++ b/docs/CreateWhatsAppCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the WhatsApp campaign creation | [default to null] **TemplateId** | **int32** | Id of the WhatsApp template in **approved** state | [default to null] **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** | [default to null] -**Recipients** | [***CreateWhatsAppCampaignRecipients**](createWhatsAppCampaignRecipients.md) | | [default to null] +**Recipients** | [***CreateWhatsAppCampaignRecipients**](createWhatsAppCampaign_recipients.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateWhatsAppCampaignRecipients.md b/docs/CreateWhatsAppCampaignRecipients.md index 62b3671..90ab785 100644 --- a/docs/CreateWhatsAppCampaignRecipients.md +++ b/docs/CreateWhatsAppCampaignRecipients.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExcludedIds** | **[]int64** | List ids to exclude from the campaign | [optional] [default to null] +**ExcludedListIds** | **[]int64** | List ids to exclude from the campaign | [optional] [default to null] **ListIds** | **[]int64** | **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to | [optional] [default to null] **Segments** | **[]int64** | **Mandatory if listIds are not used**. Segment ids to send the campaign to. | [optional] [default to null] diff --git a/docs/CreateWhatsAppTemplate.md b/docs/CreateWhatsAppTemplate.md index 9b33b54..8b3923f 100644 --- a/docs/CreateWhatsAppTemplate.md +++ b/docs/CreateWhatsAppTemplate.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Name of the template | [default to null] -**Language** | **string** | Language of the template | [default to null] +**Language** | **string** | Language of the template. For Example : **en** for English | [default to null] **Category** | **string** | Category of the template | [default to null] -**MediaUrl** | **string** | Absolute url of the media file **(no local file)** | [optional] [default to null] -**Body** | **string** | Body of the template | [default to null] -**HeaderHtml** | **string** | Html content of the header | [optional] [default to null] -**HeaderType** | **bool** | | [optional] [default to null] +**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] [default to null] +**BodyText** | **string** | Body of the template. **Maximum allowed characters are 1024** | [default to null] +**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] [default to null] +**Source** | **string** | source of the template | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Deal.md b/docs/Deal.md index 8fb4e59..c763752 100644 --- a/docs/Deal.md +++ b/docs/Deal.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | Unique deal id | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Deal attributes with values | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Deal attributes with values | [optional] [default to null] **LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this deal | [optional] [default to null] **LinkedCompaniesIds** | **[]string** | Companies ids for companies linked to this deal | [optional] [default to null] diff --git a/docs/DealAttributesInner.md b/docs/DealAttributesInner.md index 7fb5d93..3638ed4 100644 --- a/docs/DealAttributesInner.md +++ b/docs/DealAttributesInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **InternalName** | **string** | | [optional] [default to null] **Label** | **string** | | [optional] [default to null] **AttributeTypeName** | **string** | | [optional] [default to null] -**AttributeOptions** | **map[string]interface{}** | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **IsRequired** | **bool** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DealsApi.md b/docs/DealsApi.md index 77f58c1..eb34957 100644 --- a/docs/DealsApi.md +++ b/docs/DealsApi.md @@ -9,9 +9,12 @@ Method | HTTP request | Description [**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 +[**CrmDealsImportPost**](DealsApi.md#CrmDealsImportPost) | **Post** /crm/deals/import | Import deals(creation and updation) [**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** @@ -52,7 +55,7 @@ Optional parameters are passed through a pointer to a CrmDealsGetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filtersAttributes** | **optional.String**| Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" | + **filtersAttributesDealName** | **optional.String**| Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. | **filtersLinkedCompaniesIds** | **optional.String**| Filter by linked companies ids | **filtersLinkedContactsIds** | **optional.String**| Filter by linked companies ids | **offset** | **optional.Int64**| Index of the first document of the page | @@ -137,7 +140,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| | - **body** | [**Body4**](Body4.md)| Updated deal details. | + **body** | [**Body9**](Body9.md)| Updated deal details. | ### Return type @@ -154,6 +157,35 @@ Name | Type | Description | Notes [[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) +# **CrmDealsImportPost** +> InlineResponse2003 CrmDealsImportPost(ctx, file, mapping) +Import deals(creation and updation) + +Import deals from a CSV file with mapping options. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **file** | ***os.File**| The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name | + **mapping** | **string**| The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank } | + +### Return type + +[**InlineResponse2003**](inline_response_200_3.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) + # **CrmDealsLinkUnlinkIdPatch** > CrmDealsLinkUnlinkIdPatch(ctx, id, body) Link and Unlink a deal with contacts and companies @@ -164,7 +196,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| | - **body** | [**Body5**](Body5.md)| Linked / Unlinked contacts and companies ids. | + **body** | [**Body10**](Body10.md)| Linked / Unlinked contacts and companies ids. | ### Return type @@ -182,7 +214,7 @@ Name | Type | Description | Notes [[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** -> InlineResponse201 CrmDealsPost(ctx, body) +> InlineResponse2011 CrmDealsPost(ctx, body) Create a deal ### Required Parameters @@ -190,11 +222,33 @@ Create a deal Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body3**](Body3.md)| Deal create data. | + **body** | [**Body8**](Body8.md)| Deal create data. | ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**InlineResponse2011**](inline_response_201_1.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** +> Pipelines CrmPipelineDetailsAllGet(ctx, ) +Get all pipelines + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**Pipelines**](Pipelines.md) ### Authorization @@ -211,6 +265,8 @@ Name | Type | Description | Notes > Pipeline CrmPipelineDetailsGet(ctx, ) Get pipeline stages +This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. + ### Required Parameters This endpoint does not need any parameter. @@ -229,3 +285,29 @@ This endpoint does not need any parameter. [[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** +> Pipelines CrmPipelineDetailsPipelineIDGet(ctx, pipelineID) +Get a pipeline + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **pipelineID** | **string**| | + +### Return type + +[**Pipelines**](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/docs/DomainsApi.md b/docs/DomainsApi.md index 9e602db..341063a 100644 --- a/docs/DomainsApi.md +++ b/docs/DomainsApi.md @@ -7,7 +7,7 @@ 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 -[**GetDomainonfiguration**](DomainsApi.md#GetDomainonfiguration) | **Get** /senders/domains/{domainName} | Validate domain configuration +[**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 @@ -24,7 +24,7 @@ Name | Type | Description | Notes ### Return type -[**AuthenticateDomainModel**](AuthenticateDomainModel.md) +[**AuthenticateDomainModel**](authenticateDomainModel.md) ### Authorization @@ -57,7 +57,7 @@ Name | Type | Description | Notes ### Return type -[**CreateDomainModel**](CreateDomainModel.md) +[**CreateDomainModel**](createDomainModel.md) ### Authorization @@ -96,8 +96,8 @@ Name | Type | Description | Notes [[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) -# **GetDomainonfiguration** -> GetDomainonfigurationModel GetDomainonfiguration(ctx, domainName) +# **GetDomainConfiguration** +> GetDomainConfigurationModel GetDomainConfiguration(ctx, domainName) Validate domain configuration ### Required Parameters @@ -109,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**GetDomainonfigurationModel**](GetDomainonfigurationModel.md) +[**GetDomainConfigurationModel**](getDomainConfigurationModel.md) ### Authorization @@ -131,7 +131,7 @@ This endpoint does not need any parameter. ### Return type -[**GetDomainsList**](GetDomainsList.md) +[**GetDomainsList**](getDomainsList.md) ### Authorization diff --git a/docs/EcommerceApi.md b/docs/EcommerceApi.md index 381aa99..b03b6df 100644 --- a/docs/EcommerceApi.md +++ b/docs/EcommerceApi.md @@ -11,10 +11,16 @@ Method | HTTP request | Description [**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 +[**EcommerceAttributionMetricsConversionSourceConversionSourceIdGet**](EcommerceApi.md#EcommerceAttributionMetricsConversionSourceConversionSourceIdGet) | **Get** /ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId} | Get detailed attribution metrics for a single Brevo campaign +[**EcommerceAttributionMetricsGet**](EcommerceApi.md#EcommerceAttributionMetricsGet) | **Get** /ecommerce/attribution/metrics | Get attribution metrics for one or more Brevo campaigns +[**EcommerceAttributionProductsConversionSourceConversionSourceIdGet**](EcommerceApi.md#EcommerceAttributionProductsConversionSourceConversionSourceIdGet) | **Get** /ecommerce/attribution/products/{conversionSource}/{conversionSourceId} | Get attributed product sales for a single Brevo campaign +[**EcommerceConfigDisplayCurrencyGet**](EcommerceApi.md#EcommerceConfigDisplayCurrencyGet) | **Get** /ecommerce/config/displayCurrency | Get the ISO 4217 compliant display currency code for your Brevo account [**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 +[**SetConfigDisplayCurrency**](EcommerceApi.md#SetConfigDisplayCurrency) | **Post** /ecommerce/config/displayCurrency | Set the ISO 4217 compliant display currency code for your Brevo account # **CreateBatchOrder** @@ -86,7 +92,7 @@ Name | Type | Description | Notes ### Return type -[**CreateUpdateBatchCategoryModel**](CreateUpdateBatchCategoryModel.md) +[**CreateUpdateBatchCategoryModel**](createUpdateBatchCategoryModel.md) ### Authorization @@ -112,7 +118,7 @@ Name | Type | Description | Notes ### Return type -[**CreateUpdateBatchProductsModel**](CreateUpdateBatchProductsModel.md) +[**CreateUpdateBatchProductsModel**](createUpdateBatchProductsModel.md) ### Authorization @@ -138,7 +144,7 @@ Name | Type | Description | Notes ### Return type -[**CreateCategoryModel**](CreateCategoryModel.md) +[**CreateCategoryModel**](createCategoryModel.md) ### Authorization @@ -164,7 +170,7 @@ Name | Type | Description | Notes ### Return type -[**CreateProductModel**](CreateProductModel.md) +[**CreateProductModel**](createProductModel.md) ### Authorization @@ -201,6 +207,117 @@ This endpoint does not need any parameter. [[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) +# **EcommerceAttributionMetricsConversionSourceConversionSourceIdGet** +> InlineResponse2006 EcommerceAttributionMetricsConversionSourceConversionSourceIdGet(ctx, conversionSource, conversionSourceId) +Get detailed attribution metrics for a single Brevo campaign + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **conversionSource** | **string**| The Brevo campaign type for which data will be retrieved | + **conversionSourceId** | **float32**| The Brevo campaign id for which data will be retrieved | + +### Return type + +[**InlineResponse2006**](inline_response_200_6.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) + +# **EcommerceAttributionMetricsGet** +> InlineResponse2005 EcommerceAttributionMetricsGet(ctx, optional) +Get attribution metrics for one or more Brevo campaigns + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***EcommerceAttributionMetricsGetOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a EcommerceAttributionMetricsGetOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **periodFrom** | **optional.Time**| When getting metrics for a specific period, define the starting datetime in RFC3339 format | + **periodTo** | **optional.Time**| When getting metrics for a specific period, define the end datetime in RFC3339 format | + **emailCampaignId** | [**optional.Interface of []float32**](float32.md)| The email campaign id(s) to get metrics for | + +### Return type + +[**InlineResponse2005**](inline_response_200_5.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) + +# **EcommerceAttributionProductsConversionSourceConversionSourceIdGet** +> InlineResponse2007 EcommerceAttributionProductsConversionSourceConversionSourceIdGet(ctx, conversionSource, conversionSourceId) +Get attributed product sales for a single Brevo campaign + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **conversionSource** | **string**| The Brevo campaign type for which data will be retrieved | + **conversionSourceId** | **float32**| The Brevo campaign id for which data will be retrieved | + +### Return type + +[**InlineResponse2007**](inline_response_200_7.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) + +# **EcommerceConfigDisplayCurrencyGet** +> InlineResponse2004 EcommerceConfigDisplayCurrencyGet(ctx, ) +Get the ISO 4217 compliant display currency code for your Brevo account + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse2004**](inline_response_200_4.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) + # **GetCategories** > GetCategories GetCategories(ctx, optional) Return all your categories @@ -222,10 +339,12 @@ Name | Type | Description | Notes **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] **ids** | [**optional.Interface of []string**](string.md)| Filter by category ids | **name** | **optional.String**| Filter by category name | + **modifiedSince** | **optional.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** | **optional.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.** | ### Return type -[**GetCategories**](GetCategories.md) +[**GetCategories**](getCategories.md) ### Authorization @@ -251,7 +370,46 @@ Name | Type | Description | Notes ### Return type -[**GetCategoryDetails**](GetCategoryDetails.md) +[**GetCategoryDetails**](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** +> GetOrders GetOrders(ctx, optional) +Get order details + +Get all the orders + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***GetOrdersOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetOrdersOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **optional.Int64**| Number of documents per page | [default to 50] + **offset** | **optional.Int64**| Index of the first document in the page | [default to 0] + **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] + **modifiedSince** | **optional.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** | **optional.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.** | + +### Return type + +[**GetOrders**](getOrders.md) ### Authorization @@ -277,7 +435,7 @@ Name | Type | Description | Notes ### Return type -[**GetProductDetails**](GetProductDetails.md) +[**GetProductDetails**](getProductDetails.md) ### Authorization @@ -318,10 +476,38 @@ Name | Type | Description | Notes **priceEq** | **optional.Float32**| Price filter for products equals to particular amount | **priceNe** | **optional.Float32**| Price filter for products not equals to particular amount | **categories** | [**optional.Interface of []string**](string.md)| Filter by category ids | + **modifiedSince** | **optional.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** | **optional.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.** | + +### Return type + +[**GetProducts**](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) + +# **SetConfigDisplayCurrency** +> SetConfigDisplayCurrency SetConfigDisplayCurrency(ctx, setConfigDisplayCurrency) +Set the ISO 4217 compliant display currency code for your Brevo account + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **setConfigDisplayCurrency** | [**SetConfigDisplayCurrency**](SetConfigDisplayCurrency.md)| set ISO 4217 compliant display currency code payload | ### Return type -[**GetProducts**](GetProducts.md) +[**SetConfigDisplayCurrency**](setConfigDisplayCurrency.md) ### Authorization diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md index 1670f42..3e13217 100644 --- a/docs/EmailCampaignsApi.md +++ b/docs/EmailCampaignsApi.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](CreatedProcessId.md) +[**CreatedProcessId**](createdProcessId.md) ### Authorization @@ -121,7 +121,7 @@ Name | Type | Description | Notes ### Return type -[**AbTestCampaignResult**](AbTestCampaignResult.md) +[**AbTestCampaignResult**](abTestCampaignResult.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailCampaign**](GetEmailCampaign.md) +[**GetEmailCampaign**](getEmailCampaign.md) ### Authorization @@ -187,7 +187,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type_** | **optional.String**| Filter on the type of the campaigns | **status** | **optional.String**| Filter on the status of the campaign | - **statistics** | **optional.String**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. | + **statistics** | **optional.String**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. | **startDate** | **optional.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** | **optional.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** | **optional.Int64**| Number of documents per page | [default to 50] @@ -197,7 +197,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailCampaigns**](GetEmailCampaigns.md) +[**GetEmailCampaigns**](getEmailCampaigns.md) ### Authorization @@ -225,7 +225,7 @@ Name | Type | Description | Notes ### Return type -[**GetSharedTemplateUrl**](GetSharedTemplateUrl.md) +[**GetSharedTemplateUrl**](getSharedTemplateUrl.md) ### Authorization @@ -387,7 +387,7 @@ Name | Type | Description | Notes ### Return type -[**UploadImageModel**](UploadImageModel.md) +[**UploadImageModel**](uploadImageModel.md) ### Authorization diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..77e2c99 --- /dev/null +++ b/docs/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. | [default to null] +**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] [default to null] +**Identifiers** | [***EventIdentifiers**](event_identifiers.md) | | [default to null] +**ContactProperties** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**EventProperties** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventIdentifiers.md b/docs/EventIdentifiers.md new file mode 100644 index 0000000..80a2c00 --- /dev/null +++ b/docs/EventIdentifiers.md @@ -0,0 +1,14 @@ +# EventIdentifiers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailId** | **string** | Email Id associated with the event | [optional] [default to null] +**PhoneId** | **string** | SMS associated with the event | [optional] [default to null] +**WhatsappId** | **string** | whatsapp associated with the event | [optional] [default to null] +**LandlineNumberId** | **string** | landline_number associated with the event | [optional] [default to null] +**ExtId** | **string** | ext_id associated with the event | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventsApi.md b/docs/EventsApi.md new file mode 100644 index 0000000..cf8b859 --- /dev/null +++ b/docs/EventsApi.md @@ -0,0 +1,37 @@ +# \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(ctx, event) +Create an event + +Create an event to track a contact's interaction. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **event** | [**Event**](Event.md)| | + +### Return type + + (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/docs/ExportWebhooksHistory.md b/docs/ExportWebhooksHistory.md index 54590ae..7bc129d 100644 --- a/docs/ExportWebhooksHistory.md +++ b/docs/ExportWebhooksHistory.md @@ -7,11 +7,12 @@ Name | Type | Description | Notes **StartDate** | **string** | Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate | [optional] [default to null] **EndDate** | **string** | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] [default to null] **Sort** | **string** | Sorting order of records (asc or desc) | [optional] [default to null] +**Type_** | **string** | Filter the history based on webhook type | [default to null] **Event** | **string** | Filter the history for a specific event type | [default to null] **NotifyURL** | **string** | Webhook URL to receive CSV file link | [default to null] **WebhookId** | **int32** | Filter the history for a specific webhook id | [optional] [default to null] **Email** | **string** | Filter the history for a specific email | [optional] [default to null] -**MessageId** | **int32** | Filter the history for a specific message id | [optional] [default to null] +**MessageId** | **int32** | Filter the history for a specific message id. Applicable only for transactional webhooks. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExternalFeedsApi.md b/docs/ExternalFeedsApi.md index d8d9ca2..f436cce 100644 --- a/docs/ExternalFeedsApi.md +++ b/docs/ExternalFeedsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **CreateExternalFeed** -> InlineResponse2013 CreateExternalFeed(ctx, createExternalFeed) +> InlineResponse2015 CreateExternalFeed(ctx, createExternalFeed) Create an external feed This endpoint will create an external feed. @@ -26,7 +26,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2013**](InlineResponse2013.md) +[**InlineResponse2015**](inline_response_201_5.md) ### Authorization @@ -95,7 +95,7 @@ Name | Type | Description | Notes ### Return type -[**GetAllExternalFeeds**](GetAllExternalFeeds.md) +[**GetAllExternalFeeds**](getAllExternalFeeds.md) ### Authorization @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**GetExternalFeedByUuid**](GetExternalFeedByUUID.md) +[**GetExternalFeedByUuid**](getExternalFeedByUUID.md) ### Authorization diff --git a/docs/GetAccount.md b/docs/GetAccount.md index 0014a89..5c91253 100644 --- a/docs/GetAccount.md +++ b/docs/GetAccount.md @@ -7,10 +7,10 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Address** | [***GetExtendedClientAddress**](GetExtendedClientAddress.md) | | [default to null] -**Plan** | [**[]GetAccountPlan**](GetAccountPlan.md) | Information about your plans and credits | [default to null] -**Relay** | [***GetAccountRelay**](GetAccountRelay.md) | | [default to null] -**MarketingAutomation** | [***GetAccountMarketingAutomation**](GetAccountMarketingAutomation.md) | | [optional] [default to null] +**Address** | [***GetExtendedClientAddress**](getExtendedClient_address.md) | | [default to null] +**Plan** | [**[]GetAccountPlan**](getAccount_plan.md) | Information about your plans and credits | [default to null] +**Relay** | [***GetAccountRelay**](getAccount_relay.md) | | [default to null] +**MarketingAutomation** | [***GetAccountMarketingAutomation**](getAccount_marketingAutomation.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAccountActivity.md b/docs/GetAccountActivity.md index d697380..b3c32fb 100644 --- a/docs/GetAccountActivity.md +++ b/docs/GetAccountActivity.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Logs** | [**[]GetAccountActivityLogs**](getAccountActivityLogs.md) | Get user activity logs | [optional] [default to null] +**Logs** | [**[]GetAccountActivityLogs**](getAccountActivity_logs.md) | Get user activity logs | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAccountRelay.md b/docs/GetAccountRelay.md index 2c4bd3a..1a0a23e 100644 --- a/docs/GetAccountRelay.md +++ b/docs/GetAccountRelay.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Enabled** | **bool** | Status of your transactional email Account (true=Enabled, false=Disabled) | [default to null] -**Data** | [***GetAccountRelayData**](getAccountRelayData.md) | | [default to null] +**Data** | [***GetAccountRelayData**](getAccount_relay_data.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAllExternalFeeds.md b/docs/GetAllExternalFeeds.md index 691c9a9..81f2fa5 100644 --- a/docs/GetAllExternalFeeds.md +++ b/docs/GetAllExternalFeeds.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of batches | [optional] [default to null] -**Feeds** | [**[]GetAllExternalFeedsFeeds**](getAllExternalFeedsFeeds.md) | | [optional] [default to null] +**Feeds** | [**[]GetAllExternalFeedsFeeds**](getAllExternalFeeds_feeds.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAttributes.md b/docs/GetAttributes.md index 830c9a7..2b3ecbb 100644 --- a/docs/GetAttributes.md +++ b/docs/GetAttributes.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Attributes** | [**[]GetAttributesAttributes**](getAttributesAttributes.md) | Listing of available contact attributes in your account | [default to null] +**Attributes** | [**[]GetAttributesAttributes**](getAttributes_attributes.md) | Listing of available contact attributes in your account | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAttributesAttributes.md b/docs/GetAttributesAttributes.md index 00b66c0..169d3c5 100644 --- a/docs/GetAttributesAttributes.md +++ b/docs/GetAttributesAttributes.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the attribute | [default to null] **Category** | **string** | Category of the attribute | [default to null] **Type_** | **string** | Type of the attribute | [optional] [default to null] -**Enumeration** | [**[]GetAttributesEnumeration**](getAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] +**Enumeration** | [**[]GetAttributesEnumeration**](getAttributes_enumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] **CalculatedValue** | **string** | Calculated value formula | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCampaignOverview.md b/docs/GetCampaignOverview.md index 768b333..b89f316 100644 --- a/docs/GetCampaignOverview.md +++ b/docs/GetCampaignOverview.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Id** | **int64** | ID of the campaign | [default to null] **Name** | **string** | Name of the campaign | [default to null] **Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] [default to null] +**PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **Type_** | **string** | Type of campaign | [default to null] **Status** | **string** | Status of the campaign | [default to null] **ScheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] [default to null] diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md index 5e5fd7f..f4ae620 100644 --- a/docs/GetChildInfo.md +++ b/docs/GetChildInfo.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Credits** | [***GetChildInfoCredits**](getChildInfoCredits.md) | | [optional] [default to null] -**Statistics** | [***GetChildInfoStatistics**](getChildInfoStatistics.md) | | [optional] [default to null] +**Credits** | [***GetChildInfoCredits**](getChildInfo_credits.md) | | [optional] [default to null] +**Statistics** | [***GetChildInfoStatistics**](getChildInfo_statistics.md) | | [optional] [default to null] **Password** | **string** | The encrypted password of child account | [default to null] **Ips** | **[]string** | IP(s) associated to a child account user | [optional] [default to null] -**ApiKeys** | [***GetChildInfoApiKeys**](getChildInfoApiKeys.md) | | [optional] [default to null] +**ApiKeys** | [***GetChildInfoApiKeys**](getChildInfo_apiKeys.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md index 67803db..0844639 100644 --- a/docs/GetChildInfoApiKeys.md +++ b/docs/GetChildInfoApiKeys.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**V2** | [**[]GetChildInfoApiKeysV2**](getChildInfoApiKeysV2.md) | | [default to null] -**V3** | [**[]GetChildInfoApiKeysV3**](getChildInfoApiKeysV3.md) | | [optional] [default to null] +**V2** | [**[]GetChildInfoApiKeysV2**](getChildInfo_apiKeys_v2.md) | | [default to null] +**V3** | [**[]GetChildInfoApiKeysV3**](getChildInfo_apiKeys_v3.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStats.md b/docs/GetContactCampaignStats.md index 64bd240..818fa9a 100644 --- a/docs/GetContactCampaignStats.md +++ b/docs/GetContactCampaignStats.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] -**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] -**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] -**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] -**Unsubscriptions** | [***GetContactCampaignStatsUnsubscriptions**](getContactCampaignStatsUnsubscriptions.md) | | [optional] [default to null] -**Opened** | [**[]GetContactCampaignStatsOpened**](getContactCampaignStatsOpened.md) | | [optional] [default to null] -**Clicked** | [**[]GetContactCampaignStatsClicked**](getContactCampaignStatsClicked.md) | | [optional] [default to null] -**TransacAttributes** | [**[]GetContactCampaignStatsTransacAttributes**](getContactCampaignStatsTransacAttributes.md) | | [optional] [default to null] -**Delivered** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] +**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] +**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] +**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] +**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] +**Unsubscriptions** | [***GetContactCampaignStatsUnsubscriptions**](getContactCampaignStats_unsubscriptions.md) | | [optional] [default to null] +**Opened** | [**[]GetContactCampaignStatsOpened**](getContactCampaignStats_opened.md) | | [optional] [default to null] +**Clicked** | [**[]GetContactCampaignStatsClicked**](getContactCampaignStats_clicked.md) | | [optional] [default to null] +**TransacAttributes** | [**[]GetContactCampaignStatsTransacAttributes**](getContactCampaignStats_transacAttributes.md) | | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStatsClicked.md b/docs/GetContactCampaignStatsClicked.md index 484742b..de2395e 100644 --- a/docs/GetContactCampaignStatsClicked.md +++ b/docs/GetContactCampaignStatsClicked.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **int64** | ID of the campaign which generated the event | [default to null] -**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetailsStatisticsLinks.md) | | [default to null] +**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetails_statistics_links.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStatsUnsubscriptions.md b/docs/GetContactCampaignStatsUnsubscriptions.md index 323a590..1bf2c12 100644 --- a/docs/GetContactCampaignStatsUnsubscriptions.md +++ b/docs/GetContactCampaignStatsUnsubscriptions.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | [default to null] -**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] +**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | [default to null] +**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactDetails.md b/docs/GetContactDetails.md index 6f5733a..67dd153 100644 --- a/docs/GetContactDetails.md +++ b/docs/GetContactDetails.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | **string** | Email address of the contact for which you requested the details | [default to null] +**Email** | **string** | Email address of the contact for which you requested the details | [optional] [default to null] **Id** | **int64** | ID of the contact for which you requested the details | [default to null] **EmailBlacklisted** | **bool** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | [default to null] **SmsBlacklisted** | **bool** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | [default to null] @@ -11,7 +11,7 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Set of attributes of the contact | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCorporateInvitedUsersList.md b/docs/GetCorporateInvitedUsersList.md new file mode 100644 index 0000000..da7534f --- /dev/null +++ b/docs/GetCorporateInvitedUsersList.md @@ -0,0 +1,10 @@ +# GetCorporateInvitedUsersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Users** | [**[]GetCorporateInvitedUsersListUsers**](getCorporateInvitedUsersList_users.md) | Get invited users list | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateInvitedUsersListFeatureAccess.md b/docs/GetCorporateInvitedUsersListFeatureAccess.md new file mode 100644 index 0000000..81520c0 --- /dev/null +++ b/docs/GetCorporateInvitedUsersListFeatureAccess.md @@ -0,0 +1,13 @@ +# GetCorporateInvitedUsersListFeatureAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserManagement** | **[]string** | User management accessiblity. | [optional] [default to null] +**ApiKeys** | **[]string** | Api keys accessiblity. | [optional] [default to null] +**MyPlan** | **[]string** | My plan accessiblity. | [optional] [default to null] +**AppsManagement** | **[]string** | Apps management accessiblity | Not available in ENTv2 | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateInvitedUsersListGroups.md b/docs/GetCorporateInvitedUsersListGroups.md new file mode 100644 index 0000000..537479a --- /dev/null +++ b/docs/GetCorporateInvitedUsersListGroups.md @@ -0,0 +1,11 @@ +# GetCorporateInvitedUsersListGroups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | group id | [optional] [default to null] +**Name** | **string** | group name | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateInvitedUsersListUsers.md b/docs/GetCorporateInvitedUsersListUsers.md new file mode 100644 index 0000000..9af2d4d --- /dev/null +++ b/docs/GetCorporateInvitedUsersListUsers.md @@ -0,0 +1,14 @@ +# GetCorporateInvitedUsersListUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Groups** | [***GetCorporateInvitedUsersListGroups**](getCorporateInvitedUsersList_groups.md) | | [default to null] +**Email** | **string** | Email address of the user. | [default to null] +**IsOwner** | **string** | Flag for indicating is user owner of the organization. | [default to null] +**Status** | **string** | Status of the invited user. | [default to null] +**FeatureAccess** | [***GetCorporateInvitedUsersListFeatureAccess**](getCorporateInvitedUsersList_feature_access.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateUserPermission.md b/docs/GetCorporateUserPermission.md new file mode 100644 index 0000000..b2f1f50 --- /dev/null +++ b/docs/GetCorporateUserPermission.md @@ -0,0 +1,13 @@ +# GetCorporateUserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. | [default to null] +**Status** | **string** | Status of the invited user. | [default to null] +**Groups** | [**[]GetCorporateUserPermissionGroups**](getCorporateUserPermission_groups.md) | | [default to null] +**FeatureAccess** | [***GetCorporateUserPermissionFeatureAccess**](getCorporateUserPermission_feature_access.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateUserPermissionFeatureAccess.md b/docs/GetCorporateUserPermissionFeatureAccess.md new file mode 100644 index 0000000..48f1b09 --- /dev/null +++ b/docs/GetCorporateUserPermissionFeatureAccess.md @@ -0,0 +1,13 @@ +# GetCorporateUserPermissionFeatureAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKeys** | **[]string** | Permission on api keys | [optional] [default to null] +**MyPlan** | **[]string** | Permission on my plan | [optional] [default to null] +**UserManagement** | **[]string** | Permission on user management | [optional] [default to null] +**AppsManagement** | **[]string** | Permission on apps management | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCorporateUserPermissionGroups.md b/docs/GetCorporateUserPermissionGroups.md new file mode 100644 index 0000000..ec8f904 --- /dev/null +++ b/docs/GetCorporateUserPermissionGroups.md @@ -0,0 +1,11 @@ +# GetCorporateUserPermissionGroups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | group identifier | [optional] [default to null] +**Name** | **string** | Group name | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCouponCollection.md b/docs/GetCouponCollection.md new file mode 100644 index 0000000..3d0173e --- /dev/null +++ b/docs/GetCouponCollection.md @@ -0,0 +1,18 @@ +# GetCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The id of the collection. | [default to null] +**Name** | **string** | The name of the collection. | [default to null] +**DefaultCoupon** | **string** | The default coupon of the collection. | [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the collection was created. | [default to null] +**TotalCoupons** | **int64** | Total number of coupons in the collection. | [default to null] +**RemainingCoupons** | **int64** | Number of coupons that have not been sent yet. | [default to null] +**ExpirationDate** | [**time.Time**](time.Time.md) | Expiration date for the coupon collection in RFC3339 format. | [optional] [default to null] +**RemainingDaysAlert** | **int32** | If present, an email notification is going to be sent the defined amount of days before the expiration date. | [optional] [default to null] +**RemainingCouponsAlert** | **int32** | If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetDomainonfigurationModel.md b/docs/GetDomainConfigurationModel.md similarity index 89% rename from docs/GetDomainonfigurationModel.md rename to docs/GetDomainConfigurationModel.md index 256d08e..758372b 100644 --- a/docs/GetDomainonfigurationModel.md +++ b/docs/GetDomainConfigurationModel.md @@ -1,4 +1,4 @@ -# GetDomainonfigurationModel +# GetDomainConfigurationModel ## Properties Name | Type | Description | Notes @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Domain** | **string** | Domain | [default to null] **Verified** | **bool** | Status of domain verification (true=verified, false=non verified) | [default to null] **Authenticated** | **bool** | Status of domain authentication (true=authenticated, false=non authenticated) | [default to null] -**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModelDnsRecords.md) | | [default to null] +**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModel_dns_records.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetDomainsList.md b/docs/GetDomainsList.md index 3c78054..11dae1f 100644 --- a/docs/GetDomainsList.md +++ b/docs/GetDomainsList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Domains** | [**[]GetDomainsListDomains**](getDomainsListDomains.md) | List of the domains available in your account | [optional] [default to null] +**Domains** | [**[]GetDomainsListDomains**](getDomainsList_domains.md) | List of the domains available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md index 047aa6d..91d8073 100644 --- a/docs/GetEmailCampaign.md +++ b/docs/GetEmailCampaign.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Id** | **int64** | ID of the campaign | [default to null] **Name** | **string** | Name of the campaign | [default to null] **Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] [default to null] +**PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **Type_** | **string** | Type of campaign | [default to null] **Status** | **string** | Status of the campaign | [default to null] **ScheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] [default to null] @@ -16,10 +17,14 @@ Name | Type | Description | Notes **WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] **WinnerDelay** | **int32** | 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] [default to null] **SendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] [default to null] +**UtmCampaignValue** | **string** | utm parameter associated with campaign | [optional] [default to null] +**UtmSource** | **string** | source of utm parameter | [optional] [default to null] +**UtmMedium** | **string** | medium parameter | [optional] [default to null] +**UtmID** | **int32** | utm id | [optional] [default to null] **TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] **Header** | **string** | Header of the campaign | [default to null] **Footer** | **string** | Footer of the campaign | [default to null] -**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverviewSender.md) | | [default to null] +**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverview_sender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" of the campaign | [default to null] **ToField** | **string** | Customisation of the \"to\" field of the campaign | [optional] [default to null] **HtmlContent** | **string** | HTML content of the campaign | [default to null] @@ -32,8 +37,8 @@ Name | Type | Description | Notes **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 null] **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] [default to null] **ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] -**Recipients** | **map[string]interface{}** | | [default to null] -**Statistics** | **map[string]interface{}** | | [default to null] +**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEmailEventReport.md b/docs/GetEmailEventReport.md index 65d03ba..6a07bff 100644 --- a/docs/GetEmailEventReport.md +++ b/docs/GetEmailEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetEmailEventReportEvents**](getEmailEventReportEvents.md) | | [optional] [default to null] +**Events** | [**[]GetEmailEventReportEvents**](getEmailEventReport_events.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedCampaignOverview.md b/docs/GetExtendedCampaignOverview.md index 4f83b06..c2bc0ea 100644 --- a/docs/GetExtendedCampaignOverview.md +++ b/docs/GetExtendedCampaignOverview.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Id** | **int64** | ID of the campaign | [default to null] **Name** | **string** | Name of the campaign | [default to null] **Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] [default to null] +**PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **Type_** | **string** | Type of campaign | [default to null] **Status** | **string** | Status of the campaign | [default to null] **ScheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] [default to null] @@ -16,10 +17,14 @@ Name | Type | Description | Notes **WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] **WinnerDelay** | **int32** | 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] [default to null] **SendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] [default to null] +**UtmCampaignValue** | **string** | utm parameter associated with campaign | [optional] [default to null] +**UtmSource** | **string** | source of utm parameter | [optional] [default to null] +**UtmMedium** | **string** | medium parameter | [optional] [default to null] +**UtmID** | **int32** | utm id | [optional] [default to null] **TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] **Header** | **string** | Header of the campaign | [default to null] **Footer** | **string** | Footer of the campaign | [default to null] -**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverviewSender.md) | | [default to null] +**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverview_sender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" of the campaign | [default to null] **ToField** | **string** | Customisation of the \"to\" field of the campaign | [optional] [default to null] **HtmlContent** | **string** | HTML content of the campaign | [default to null] diff --git a/docs/GetExtendedCampaignOverviewSender.md b/docs/GetExtendedCampaignOverviewSender.md index 6aa7370..866b939 100644 --- a/docs/GetExtendedCampaignOverviewSender.md +++ b/docs/GetExtendedCampaignOverviewSender.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Sender name of the campaign | [optional] [default to null] **Email** | **string** | Sender email of the campaign | [optional] [default to null] -**Id** | **string** | Sender id of the campaign | [optional] [default to null] +**Id** | **int64** | Sender id of the campaign | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedCampaignStats.md b/docs/GetExtendedCampaignStats.md index d31fea2..39b73b4 100644 --- a/docs/GetExtendedCampaignStats.md +++ b/docs/GetExtendedCampaignStats.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GlobalStats** | **map[string]interface{}** | Overall statistics of the campaign | [default to null] +**GlobalStats** | [**map[string]interface{}**](interface{}.md) | Overall statistics of the campaign | [default to null] **CampaignStats** | [**[]interface{}**](interface{}.md) | List-wise statistics of the campaign. | [default to null] **MirrorClick** | **int64** | Number of clicks on mirror link | [default to null] **Remaining** | **int64** | Number of remaning emails to send | [default to null] -**LinksStats** | **map[string]interface{}** | Statistics about the number of clicks for the links | [default to null] +**LinksStats** | [**map[string]interface{}**](interface{}.md) | Statistics about the number of clicks for the links | [default to null] **StatsByDomain** | [***GetStatsByDomain**](getStatsByDomain.md) | | [default to null] **StatsByDevice** | [***GetStatsByDevice**](getStatsByDevice.md) | Statistics about the campaign on the basis of various devices | [default to null] **StatsByBrowser** | [***GetStatsByBrowser**](getStatsByBrowser.md) | Statistics about the campaign on the basis of various browsers | [default to null] diff --git a/docs/GetExtendedClient.md b/docs/GetExtendedClient.md index f912c7b..74561dc 100644 --- a/docs/GetExtendedClient.md +++ b/docs/GetExtendedClient.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Address** | [***GetExtendedClientAddress**](getExtendedClientAddress.md) | | [default to null] +**Address** | [***GetExtendedClientAddress**](getExtendedClient_address.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetails.md b/docs/GetExtendedContactDetails.md index e529bc2..283ee52 100644 --- a/docs/GetExtendedContactDetails.md +++ b/docs/GetExtendedContactDetails.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | **string** | Email address of the contact for which you requested the details | [default to null] +**Email** | **string** | Email address of the contact for which you requested the details | [optional] [default to null] **Id** | **int64** | ID of the contact for which you requested the details | [default to null] **EmailBlacklisted** | **bool** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | [default to null] **SmsBlacklisted** | **bool** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | [default to null] @@ -11,8 +11,8 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | **map[string]interface{}** | Set of attributes of the contact | [default to null] -**Statistics** | [***GetExtendedContactDetailsStatistics**](getExtendedContactDetailsStatistics.md) | | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] +**Statistics** | [***GetExtendedContactDetailsStatistics**](getExtendedContactDetails_statistics.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatistics.md b/docs/GetExtendedContactDetailsStatistics.md index bda2005..96f2795 100644 --- a/docs/GetExtendedContactDetailsStatistics.md +++ b/docs/GetExtendedContactDetailsStatistics.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the sent campaign for the contact | [optional] [default to null] -**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the hardbounes generated by the contact | [optional] [default to null] -**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the softbounes generated by the contact | [optional] [default to null] -**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the complaints generated by the contact | [optional] [default to null] -**Unsubscriptions** | [***GetExtendedContactDetailsStatisticsUnsubscriptions**](getExtendedContactDetailsStatisticsUnsubscriptions.md) | | [optional] [default to null] -**Opened** | [**[]GetExtendedContactDetailsStatisticsOpened**](getExtendedContactDetailsStatisticsOpened.md) | Listing of the openings generated by the contact | [optional] [default to null] -**Clicked** | [**[]GetExtendedContactDetailsStatisticsClicked**](getExtendedContactDetailsStatisticsClicked.md) | Listing of the clicks generated by the contact | [optional] [default to null] +**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the sent campaign for the contact | [optional] [default to null] +**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the hardbounes generated by the contact | [optional] [default to null] +**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the softbounes generated by the contact | [optional] [default to null] +**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the complaints generated by the contact | [optional] [default to null] +**Unsubscriptions** | [***GetExtendedContactDetailsStatisticsUnsubscriptions**](getExtendedContactDetails_statistics_unsubscriptions.md) | | [optional] [default to null] +**Opened** | [**[]GetExtendedContactDetailsStatisticsOpened**](getExtendedContactDetails_statistics_opened.md) | Listing of the openings generated by the contact | [optional] [default to null] +**Clicked** | [**[]GetExtendedContactDetailsStatisticsClicked**](getExtendedContactDetails_statistics_clicked.md) | Listing of the clicks generated by the contact | [optional] [default to null] **TransacAttributes** | [**[]interface{}**](interface{}.md) | Listing of the transactional attributes for the contact | [optional] [default to null] -**Delivered** | [**[]GetExtendedContactDetailsStatisticsDelivered**](getExtendedContactDetailsStatisticsDelivered.md) | Listing of the delivered campaign for the contact | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsDelivered**](getExtendedContactDetails_statistics_delivered.md) | Listing of the delivered campaign for the contact | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatisticsClicked.md b/docs/GetExtendedContactDetailsStatisticsClicked.md index 3bbc683..ba69c8c 100644 --- a/docs/GetExtendedContactDetailsStatisticsClicked.md +++ b/docs/GetExtendedContactDetailsStatisticsClicked.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **int64** | ID of the campaign which generated the event | [default to null] -**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetailsStatisticsLinks.md) | Listing of the clicked links for the campaign | [default to null] +**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetails_statistics_links.md) | Listing of the clicked links for the campaign | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md index 36d8795..d510644 100644 --- a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | [default to null] -**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] +**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | [default to null] +**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedList.md b/docs/GetExtendedList.md index d90f630..b43f1d0 100644 --- a/docs/GetExtendedList.md +++ b/docs/GetExtendedList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **UniqueSubscribers** | **int64** | Number of unique contacts in the list | [default to null] **FolderId** | **int64** | ID of the folder | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**CampaignStats** | [**[]GetExtendedListCampaignStats**](getExtendedListCampaignStats.md) | | [optional] [default to null] +**CampaignStats** | [**[]GetExtendedListCampaignStats**](getExtendedList_campaignStats.md) | | [optional] [default to null] **DynamicList** | **bool** | Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExternalFeedByUuid.md b/docs/GetExternalFeedByUuid.md index b5fd0c3..79018ce 100644 --- a/docs/GetExternalFeedByUuid.md +++ b/docs/GetExternalFeedByUuid.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [default to null] **Cache** | **bool** | Toggle caching of feed url response | [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the feed was created | [default to null] diff --git a/docs/GetInboundEmailEvents.md b/docs/GetInboundEmailEvents.md index 4cb13c9..299c907 100644 --- a/docs/GetInboundEmailEvents.md +++ b/docs/GetInboundEmailEvents.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetInboundEmailEventsEvents**](getInboundEmailEventsEvents.md) | | [optional] [default to null] +**Events** | [**[]GetInboundEmailEventsEvents**](getInboundEmailEvents_events.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInboundEmailEventsByUuid.md b/docs/GetInboundEmailEventsByUuid.md index fcc6f24..94268e7 100644 --- a/docs/GetInboundEmailEventsByUuid.md +++ b/docs/GetInboundEmailEventsByUuid.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **Sender** | **string** | Sender’s email address | [optional] [default to null] **MessageId** | **string** | Value of the Message-ID header. This will be present only after the processing is done. | [optional] [default to null] **Subject** | **string** | Value of the Subject header. This will be present only after the processing is done. | [optional] [default to null] -**Attachments** | [**[]GetInboundEmailEventsByUuidAttachments**](getInboundEmailEventsByUuidAttachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] [default to null] -**Logs** | [**[]GetInboundEmailEventsByUuidLogs**](getInboundEmailEventsByUuidLogs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] [default to null] +**Attachments** | [**[]GetInboundEmailEventsByUuidAttachments**](getInboundEmailEventsByUuid_attachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] [default to null] +**Logs** | [**[]GetInboundEmailEventsByUuidLogs**](getInboundEmailEventsByUuid_logs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInvitedUsersList.md b/docs/GetInvitedUsersList.md new file mode 100644 index 0000000..f851897 --- /dev/null +++ b/docs/GetInvitedUsersList.md @@ -0,0 +1,10 @@ +# GetInvitedUsersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Users** | [**[]GetInvitedUsersListUsers**](getInvitedUsersList_users.md) | Get invited users list | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInvitedUsersListFeatureAccess.md b/docs/GetInvitedUsersListFeatureAccess.md new file mode 100644 index 0000000..d5c01bb --- /dev/null +++ b/docs/GetInvitedUsersListFeatureAccess.md @@ -0,0 +1,12 @@ +# GetInvitedUsersListFeatureAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Marketing** | [**map[string]interface{}**](interface{}.md) | Marketing features accessiblity. | [optional] [default to null] +**Conversations** | [**map[string]interface{}**](interface{}.md) | Conversations features accessiblity. | [optional] [default to null] +**Crm** | [**map[string]interface{}**](interface{}.md) | CRM features accessiblity. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInvitedUsersListUsers.md b/docs/GetInvitedUsersListUsers.md new file mode 100644 index 0000000..e98a5f7 --- /dev/null +++ b/docs/GetInvitedUsersListUsers.md @@ -0,0 +1,13 @@ +# GetInvitedUsersListUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. | [default to null] +**IsOwner** | **string** | Flag for indicating is user owner of the organization. | [default to null] +**Status** | **string** | Status of the invited user. | [default to null] +**FeatureAccess** | [***GetInvitedUsersListFeatureAccess**](getInvitedUsersList_feature_access.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetOrders.md b/docs/GetOrders.md new file mode 100644 index 0000000..2a33c73 --- /dev/null +++ b/docs/GetOrders.md @@ -0,0 +1,11 @@ +# GetOrders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Orders** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Count** | **int64** | Number of orders | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPaymentRequest.md b/docs/GetPaymentRequest.md new file mode 100644 index 0000000..2febacc --- /dev/null +++ b/docs/GetPaymentRequest.md @@ -0,0 +1,16 @@ +# GetPaymentRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reference** | **string** | Reference of the payment request, it will appear on the payment page. | [default to null] +**Status** | **string** | Status of the payment request. | [default to null] +**Configuration** | [***Configuration**](configuration.md) | | [optional] [default to null] +**ContactId** | **int64** | Brevo ID of the contact requested to pay. | [optional] [default to null] +**NumberOfRemindersSent** | **int64** | number of reminders sent. | [optional] [default to null] +**Cart** | [***Cart**](cart.md) | | [default to null] +**Notification** | [***Notification**](notification.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetProductDetails.md b/docs/GetProductDetails.md index 7479a86..df98024 100644 --- a/docs/GetProductDetails.md +++ b/docs/GetProductDetails.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **ParentId** | **string** | Parent product id of the product | [optional] [default to null] **S3Original** | **string** | S3 url of original image | [optional] [default to null] **S3ThumbAnalytics** | **string** | S3 thumbnail url of original image in 120x120 dimension for analytics section | [default to null] -**MetaInfo** | **map[string]interface{}** | Meta data of product such as description, vendor, producer, stock level, etc. | [optional] [default to null] +**MetaInfo** | [**map[string]interface{}**](interface{}.md) | Meta data of product such as description, vendor, producer, stock level, etc. | [optional] [default to null] **S3ThumbEditor** | **string** | S3 thumbnail url of original image in 600x400 dimension for editor section | [default to null] **IsDeleted** | **bool** | product deleted from the shop's database | [optional] [default to null] diff --git a/docs/GetReports.md b/docs/GetReports.md index 3b10239..d95167e 100644 --- a/docs/GetReports.md +++ b/docs/GetReports.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Reports** | [**[]GetReportsReports**](getReportsReports.md) | | [optional] [default to null] +**Reports** | [**[]GetReportsReports**](getReports_reports.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetScheduledEmailByBatchId.md b/docs/GetScheduledEmailByBatchId.md index b2e92f7..434e472 100644 --- a/docs/GetScheduledEmailByBatchId.md +++ b/docs/GetScheduledEmailByBatchId.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of batches | [optional] [default to null] -**Batches** | [**[]GetScheduledEmailByBatchIdBatches**](getScheduledEmailByBatchIdBatches.md) | | [optional] [default to null] +**Batches** | [**[]GetScheduledEmailByBatchIdBatches**](getScheduledEmailByBatchId_batches.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSegments.md b/docs/GetSegments.md index 435f0a3..0b7f576 100644 --- a/docs/GetSegments.md +++ b/docs/GetSegments.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Segments** | [***GetSegmentsSegments**](getSegmentsSegments.md) | | [optional] [default to null] +**Segments** | [***GetSegmentsSegments**](getSegments_segments.md) | | [optional] [default to null] **Count** | **int64** | Number of Segments available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSendersList.md b/docs/GetSendersList.md index ac9dad7..4f8e848 100644 --- a/docs/GetSendersList.md +++ b/docs/GetSendersList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Senders** | [**[]GetSendersListSenders**](getSendersListSenders.md) | List of the senders available in your account | [optional] [default to null] +**Senders** | [**[]GetSendersListSenders**](getSendersList_senders.md) | List of the senders available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSendersListSenders.md b/docs/GetSendersListSenders.md index 54f5584..eed3e04 100644 --- a/docs/GetSendersListSenders.md +++ b/docs/GetSendersListSenders.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | **string** | From Name associated to the sender | [default to null] **Email** | **string** | From Email associated to the sender | [default to null] **Active** | **bool** | Status of sender (true=activated, false=deactivated) | [default to null] -**Ips** | [**[]GetSendersListIps**](getSendersListIps.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] [default to null] +**Ips** | [**[]GetSendersListIps**](getSendersList_ips.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md index 27f2cf6..3a75f38 100644 --- a/docs/GetSmsCampaign.md +++ b/docs/GetSmsCampaign.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **Sender** | **string** | Sender of the SMS Campaign | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ModifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**Recipients** | **map[string]interface{}** | | [default to null] -**Statistics** | **map[string]interface{}** | | [default to null] +**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmsEventReport.md b/docs/GetSmsEventReport.md index d1fddf1..af3cb69 100644 --- a/docs/GetSmsEventReport.md +++ b/docs/GetSmsEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetSmsEventReportEvents**](getSmsEventReportEvents.md) | | [optional] [default to null] +**Events** | [**[]GetSmsEventReportEvents**](getSmsEventReport_events.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmtpTemplateOverview.md b/docs/GetSmtpTemplateOverview.md index c7a9c91..b01318c 100644 --- a/docs/GetSmtpTemplateOverview.md +++ b/docs/GetSmtpTemplateOverview.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Subject** | **string** | Subject of the template | [default to null] **IsActive** | **bool** | Status of template (true=active, false=inactive) | [default to null] **TestSent** | **bool** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | [default to null] -**Sender** | [***GetSmtpTemplateOverviewSender**](getSmtpTemplateOverviewSender.md) | | [default to null] +**Sender** | [***GetSmtpTemplateOverviewSender**](getSmtpTemplateOverview_sender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" for the template | [default to null] **ToField** | **string** | Customisation of the \"to\" field for the template | [default to null] **Tag** | **string** | Tag of the template | [default to null] diff --git a/docs/GetTransacAggregatedSmsReport.md b/docs/GetTransacAggregatedSmsReport.md index 59cbf59..b9ad2b8 100644 --- a/docs/GetTransacAggregatedSmsReport.md +++ b/docs/GetTransacAggregatedSmsReport.md @@ -11,8 +11,9 @@ Name | Type | Description | Notes **Blocked** | **int64** | Number of blocked contact for the timeframe | [optional] [default to null] **Unsubscribed** | **int64** | Number of unsubscription for the timeframe | [optional] [default to null] **Replied** | **int64** | Number of answered SMS for the timeframe | [optional] [default to null] -**Accepted** | **int64** | Number of accepted for the timeframe | [optional] [default to null] -**Rejected** | **int64** | Number of rejected for the timeframe | [optional] [default to null] +**Accepted** | **int64** | Number of accepted SMS for the timeframe | [optional] [default to null] +**Rejected** | **int64** | Number of rejected SMS for the timeframe | [optional] [default to null] +**Skipped** | **int64** | Number of skipped SMS for the timeframe | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacBlockedContacts.md b/docs/GetTransacBlockedContacts.md index 6a01d8c..c9d64a6 100644 --- a/docs/GetTransacBlockedContacts.md +++ b/docs/GetTransacBlockedContacts.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int64** | Count of blocked or unsubscribed contact | [optional] [default to null] -**Contacts** | [**[]GetTransacBlockedContactsContacts**](getTransacBlockedContactsContacts.md) | | [optional] [default to null] +**Contacts** | [**[]GetTransacBlockedContactsContacts**](getTransacBlockedContacts_contacts.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacBlockedContactsContacts.md b/docs/GetTransacBlockedContactsContacts.md index 2a153a4..e9124ba 100644 --- a/docs/GetTransacBlockedContactsContacts.md +++ b/docs/GetTransacBlockedContactsContacts.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the blocked or unsubscribed contact | [default to null] **SenderEmail** | **string** | Sender email address of the blocked or unsubscribed contact | [default to null] -**Reason** | [***GetTransacBlockedContactsReason**](getTransacBlockedContactsReason.md) | | [default to null] +**Reason** | [***GetTransacBlockedContactsReason**](getTransacBlockedContacts_reason.md) | | [default to null] **BlockedAt** | **string** | Date when the contact was blocked or unsubscribed on | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacEmailContent.md b/docs/GetTransacEmailContent.md index c4ea576..2a9feb4 100644 --- a/docs/GetTransacEmailContent.md +++ b/docs/GetTransacEmailContent.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Subject** | **string** | Subject of the sent email | [default to null] **TemplateId** | **int64** | Id of the template | [optional] [default to null] **Date** | **string** | Date on which transactional email was sent | [default to null] -**Events** | [**[]GetTransacEmailContentEvents**](getTransacEmailContentEvents.md) | Series of events which occurred on the transactional email | [default to null] +**Events** | [**[]GetTransacEmailContentEvents**](getTransacEmailContent_events.md) | Series of events which occurred on the transactional email | [default to null] **Body** | **string** | Actual content of the transactional email that has been sent | [default to null] **AttachmentCount** | **int64** | Count of the attachments that were sent in the email | [default to null] diff --git a/docs/GetTransacEmailsList.md b/docs/GetTransacEmailsList.md index 70fcbdf..4bab765 100644 --- a/docs/GetTransacEmailsList.md +++ b/docs/GetTransacEmailsList.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int64** | Total number of transactional emails available on your account according to the passed filter | [optional] [default to null] -**TransactionalEmails** | [**[]GetTransacEmailsListTransactionalEmails**](getTransacEmailsListTransactionalEmails.md) | | [optional] [default to null] +**TransactionalEmails** | [**[]GetTransacEmailsListTransactionalEmails**](getTransacEmailsList_transactionalEmails.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacSmsReport.md b/docs/GetTransacSmsReport.md index 617aa3d..149846f 100644 --- a/docs/GetTransacSmsReport.md +++ b/docs/GetTransacSmsReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Reports** | [**[]GetTransacSmsReportReports**](getTransacSmsReportReports.md) | | [optional] [default to null] +**Reports** | [**[]GetTransacSmsReportReports**](getTransacSmsReport_reports.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacSmsReportReports.md b/docs/GetTransacSmsReportReports.md index d9b8266..c4a9f06 100644 --- a/docs/GetTransacSmsReportReports.md +++ b/docs/GetTransacSmsReportReports.md @@ -11,8 +11,9 @@ Name | Type | Description | Notes **Blocked** | **int64** | Number of blocked contact for the date | [optional] [default to null] **Unsubscribed** | **int64** | Number of unsubscription for the date | [optional] [default to null] **Replied** | **int64** | Number of answered SMS for the date | [optional] [default to null] -**Accepted** | **int64** | Number of accepted for the date | [optional] [default to null] -**Rejected** | **int64** | Number of rejected for the date | [optional] [default to null] +**Accepted** | **int64** | Number of accepted SMS for the date | [optional] [default to null] +**Rejected** | **int64** | Number of rejected SMS for the date | [optional] [default to null] +**Skipped** | **int64** | Number of skipped SMS for the date | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetUserPermission.md b/docs/GetUserPermission.md new file mode 100644 index 0000000..caad51b --- /dev/null +++ b/docs/GetUserPermission.md @@ -0,0 +1,12 @@ +# GetUserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. | [default to null] +**Status** | **string** | Status of the invited user. | [default to null] +**Privileges** | [**[]GetUserPermissionPrivileges**](getUserPermission_privileges.md) | Granular feature permissions given to the user. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetUserPermissionPrivileges.md b/docs/GetUserPermissionPrivileges.md new file mode 100644 index 0000000..9b63c1a --- /dev/null +++ b/docs/GetUserPermissionPrivileges.md @@ -0,0 +1,11 @@ +# GetUserPermissionPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Feature** | **string** | | [default to null] +**Permissions** | **[]string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetWaTemplates.md b/docs/GetWaTemplates.md index 8dfc598..0531658 100644 --- a/docs/GetWaTemplates.md +++ b/docs/GetWaTemplates.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Templates** | [**[]GetWaTemplatesTemplates**](getWATemplatesTemplates.md) | | [default to null] +**Templates** | [**[]GetWaTemplatesTemplates**](getWATemplates_templates.md) | | [default to null] **Count** | **int64** | Number of whatsApp templates retrived | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhook.md b/docs/GetWebhook.md index fab9f39..3f67a95 100644 --- a/docs/GetWebhook.md +++ b/docs/GetWebhook.md @@ -10,6 +10,9 @@ Name | Type | Description | Notes **Type_** | **string** | Type of webhook (marketing or transactional) | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ModifiedAt** | **string** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] +**Batched** | **bool** | To send batched webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhookAuth.md b/docs/GetWebhookAuth.md new file mode 100644 index 0000000..d670f5c --- /dev/null +++ b/docs/GetWebhookAuth.md @@ -0,0 +1,11 @@ +# GetWebhookAuth + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | Type of authentication | [optional] [default to null] +**Token** | **string** | Webhook authentication token | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetWebhookHeaders.md b/docs/GetWebhookHeaders.md new file mode 100644 index 0000000..9007866 --- /dev/null +++ b/docs/GetWebhookHeaders.md @@ -0,0 +1,11 @@ +# GetWebhookHeaders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | Header key name | [optional] [default to null] +**Value** | **string** | Header value | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetWhatsappCampaigns.md b/docs/GetWhatsappCampaigns.md index 280b741..1b62c19 100644 --- a/docs/GetWhatsappCampaigns.md +++ b/docs/GetWhatsappCampaigns.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]GetWhatsappCampaignsCampaigns**](getWhatsappCampaignsCampaigns.md) | | [optional] [default to null] +**Campaigns** | [**[]GetWhatsappCampaignsCampaigns**](getWhatsappCampaigns_campaigns.md) | | [optional] [default to null] **Count** | **int64** | Number of WhatsApp campaigns retrived | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWhatsappEventReport.md b/docs/GetWhatsappEventReport.md index 24e47fb..5beea65 100644 --- a/docs/GetWhatsappEventReport.md +++ b/docs/GetWhatsappEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetWhatsappEventReportEvents**](getWhatsappEventReportEvents.md) | | [optional] [default to null] +**Events** | [**[]GetWhatsappEventReportEvents**](getWhatsappEventReport_events.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InboundParsingApi.md b/docs/InboundParsingApi.md index aed8095..4945913 100644 --- a/docs/InboundParsingApi.md +++ b/docs/InboundParsingApi.md @@ -64,7 +64,7 @@ Name | Type | Description | Notes ### Return type -[**GetInboundEmailEvents**](GetInboundEmailEvents.md) +[**GetInboundEmailEvents**](getInboundEmailEvents.md) ### Authorization @@ -92,7 +92,7 @@ Name | Type | Description | Notes ### Return type -[**GetInboundEmailEventsByUuid**](GetInboundEmailEventsByUuid.md) +[**GetInboundEmailEventsByUuid**](getInboundEmailEventsByUuid.md) ### Authorization diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index b1050c2..53965f8 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Unique company id | [default to null] +**Message** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 0000000..4290b20 --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,11 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique id of the group | [optional] [default to null] +**GroupName** | **string** | The name of the group of sub-accounts | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2002.md b/docs/InlineResponse2002.md new file mode 100644 index 0000000..17a8030 --- /dev/null +++ b/docs/InlineResponse2002.md @@ -0,0 +1,10 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique company id | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md new file mode 100644 index 0000000..adaa259 --- /dev/null +++ b/docs/InlineResponse2003.md @@ -0,0 +1,10 @@ +# InlineResponse2003 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProcessId** | **int32** | The ID of the import process | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2004.md b/docs/InlineResponse2004.md new file mode 100644 index 0000000..71b5c65 --- /dev/null +++ b/docs/InlineResponse2004.md @@ -0,0 +1,10 @@ +# InlineResponse2004 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | ISO 4217 compliant display currency code | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2005.md b/docs/InlineResponse2005.md new file mode 100644 index 0000000..9a9c0da --- /dev/null +++ b/docs/InlineResponse2005.md @@ -0,0 +1,11 @@ +# InlineResponse2005 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]ConversionSourceMetrics**](ConversionSourceMetrics.md) | List of conversion attribution metrics | [default to null] +**Totals** | [***InlineResponse2005Totals**](inline_response_200_5_totals.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2005Totals.md b/docs/InlineResponse2005Totals.md new file mode 100644 index 0000000..e63d4f8 --- /dev/null +++ b/docs/InlineResponse2005Totals.md @@ -0,0 +1,12 @@ +# InlineResponse2005Totals + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrdersCount** | **float32** | | [default to null] +**Revenue** | **float32** | | [default to null] +**AverageBasket** | **float32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2006.md b/docs/InlineResponse2006.md new file mode 100644 index 0000000..f9a70e6 --- /dev/null +++ b/docs/InlineResponse2006.md @@ -0,0 +1,11 @@ +# InlineResponse2006 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConversionSourceMetrics** | [***ConversionSourceMetrics**](ConversionSourceMetrics.md) | | [optional] [default to null] +**NewCustomersCount** | **float32** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2007.md b/docs/InlineResponse2007.md new file mode 100644 index 0000000..9fcfb36 --- /dev/null +++ b/docs/InlineResponse2007.md @@ -0,0 +1,10 @@ +# InlineResponse2007 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Products** | [**[]ConversionSourceProduct**](ConversionSourceProduct.md) | List of attributed products | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2008.md b/docs/InlineResponse2008.md new file mode 100644 index 0000000..c5b8356 --- /dev/null +++ b/docs/InlineResponse2008.md @@ -0,0 +1,12 @@ +# InlineResponse2008 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The id of the collection | [default to null] +**Name** | **string** | The name of the collection | [default to null] +**DefaultCoupon** | **string** | The default coupon of the collection | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md index d72fe45..2339f52 100644 --- a/docs/InlineResponse201.md +++ b/docs/InlineResponse201.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Unique deal id | [default to null] +**Id** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md index ae072fb..b0e86b1 100644 --- a/docs/InlineResponse2011.md +++ b/docs/InlineResponse2011.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Unique task id | [default to null] +**Id** | **string** | Unique deal id | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2012.md b/docs/InlineResponse2012.md index f7b1190..558f342 100644 --- a/docs/InlineResponse2012.md +++ b/docs/InlineResponse2012.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessageId** | **string** | messageId of sent message | [default to null] +**Id** | **string** | Unique task id | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2013.md b/docs/InlineResponse2013.md index d2edb5d..7f3308a 100644 --- a/docs/InlineResponse2013.md +++ b/docs/InlineResponse2013.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | ID of the object created | [default to null] +**Id** | **string** | The id of the created collection | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2014.md b/docs/InlineResponse2014.md new file mode 100644 index 0000000..18ee1d0 --- /dev/null +++ b/docs/InlineResponse2014.md @@ -0,0 +1,10 @@ +# InlineResponse2014 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | messageId of sent message | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2015.md b/docs/InlineResponse2015.md new file mode 100644 index 0000000..8518a28 --- /dev/null +++ b/docs/InlineResponse2015.md @@ -0,0 +1,10 @@ +# InlineResponse2015 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the object created | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse400.md b/docs/InlineResponse400.md new file mode 100644 index 0000000..a0dcf45 --- /dev/null +++ b/docs/InlineResponse400.md @@ -0,0 +1,10 @@ +# InlineResponse400 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteAdminUser.md b/docs/InviteAdminUser.md new file mode 100644 index 0000000..e2629de --- /dev/null +++ b/docs/InviteAdminUser.md @@ -0,0 +1,13 @@ +# InviteAdminUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address for the organization | [default to null] +**AllFeaturesAccess** | **bool** | All access to the features | [default to null] +**GroupIds** | **[]string** | Ids of Group | [optional] [default to null] +**Privileges** | [**[]InviteAdminUserPrivileges**](inviteAdminUser_privileges.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteAdminUserPrivileges.md b/docs/InviteAdminUserPrivileges.md new file mode 100644 index 0000000..6f4ba16 --- /dev/null +++ b/docs/InviteAdminUserPrivileges.md @@ -0,0 +1,11 @@ +# InviteAdminUserPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Feature** | **string** | Feature name | [optional] [default to null] +**Permissions** | **[]string** | Permissions for a given feature | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Inviteuser.md b/docs/Inviteuser.md new file mode 100644 index 0000000..ff0495c --- /dev/null +++ b/docs/Inviteuser.md @@ -0,0 +1,12 @@ +# Inviteuser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address for the organization | [default to null] +**AllFeaturesAccess** | **bool** | All access to the features | [default to null] +**Privileges** | [**[]InviteuserPrivileges**](inviteuser_privileges.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteuserPrivileges.md b/docs/InviteuserPrivileges.md new file mode 100644 index 0000000..f18c896 --- /dev/null +++ b/docs/InviteuserPrivileges.md @@ -0,0 +1,11 @@ +# InviteuserPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Feature** | **string** | Feature name | [optional] [default to null] +**Permissions** | **[]string** | Permissions for a given feature | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterAccountApi.md b/docs/MasterAccountApi.md index e9ec07d..b479016 100644 --- a/docs/MasterAccountApi.md +++ b/docs/MasterAccountApi.md @@ -4,16 +4,174 @@ All URIs are relative to *https://api.brevo.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- +[**CorporateGroupIdDelete**](MasterAccountApi.md#CorporateGroupIdDelete) | **Delete** /corporate/group/{id} | Delete a group +[**CorporateGroupIdGet**](MasterAccountApi.md#CorporateGroupIdGet) | **Get** /corporate/group/{id} | GET a group details +[**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 +[**CorporateGroupUnlinkGroupIdSubAccountsPut**](MasterAccountApi.md#CorporateGroupUnlinkGroupIdSubAccountsPut) | **Put** /corporate/group/unlink/{groupId}/subAccounts | Delete sub-account from group [**CorporateMasterAccountGet**](MasterAccountApi.md#CorporateMasterAccountGet) | **Get** /corporate/masterAccount | Get the details of requested master account +[**CorporateSsoTokenPost**](MasterAccountApi.md#CorporateSsoTokenPost) | **Post** /corporate/ssoToken | Generate SSO token to access admin 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 +[**CorporateSubAccountIpAssociatePost**](MasterAccountApi.md#CorporateSubAccountIpAssociatePost) | **Post** /corporate/subAccount/ip/associate | Associate an IP to sub-accounts +[**CorporateSubAccountIpDissociatePut**](MasterAccountApi.md#CorporateSubAccountIpDissociatePut) | **Put** /corporate/subAccount/ip/dissociate | Dissociate an IP from sub-accounts [**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 +[**CorporateSubAccountSsoTokenPost**](MasterAccountApi.md#CorporateSubAccountSsoTokenPost) | **Post** /corporate/subAccount/ssoToken | Generate SSO token to access sub-account +[**CorporateUserInvitationActionEmailPut**](MasterAccountApi.md#CorporateUserInvitationActionEmailPut) | **Put** /corporate/user/invitation/{action}/{email} | Resend / cancel admin user invitation +[**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 +[**GetCorporateUserPermission**](MasterAccountApi.md#GetCorporateUserPermission) | **Get** /corporate/user/{email}/permissions | Check admin user permissions +[**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 +# **CorporateGroupIdDelete** +> CorporateGroupIdDelete(ctx, id) +Delete a group + +This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the group | + +### Return type + + (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) + +# **CorporateGroupIdGet** +> CorporateGroupDetailsResponse CorporateGroupIdGet(ctx, id) +GET a group details + +This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the group of sub-organization | + +### Return type + +[**CorporateGroupDetailsResponse**](corporateGroupDetailsResponse.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) + +# **CorporateGroupIdPut** +> CorporateGroupIdPut(ctx, id, body) +Update a group of sub-accounts + +This endpoint allows you to update a group of sub-accounts + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the group | + **body** | [**Body3**](Body3.md)| Group details to be updated. | + +### Return type + + (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** +> InlineResponse201 CorporateGroupPost(ctx, body) +Create a new group of sub-accounts + +This endpoint allows to create a group of sub-accounts + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body**](Body.md)| Group details to be created. | + +### Return type + +[**InlineResponse201**](inline_response_201.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) + +# **CorporateGroupUnlinkGroupIdSubAccountsPut** +> CorporateGroupUnlinkGroupIdSubAccountsPut(ctx, groupId, body) +Delete sub-account from group + +This endpoint allows you to remove a sub-organization from a group. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **groupId** | **string**| Id of the group | + **body** | [**Body4**](Body4.md)| List of sub-account ids | + +### Return type + + (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) + # **CorporateMasterAccountGet** > MasterDetailsResponse CorporateMasterAccountGet(ctx, ) Get the details of requested master account @@ -25,7 +183,35 @@ This endpoint does not need any parameter. ### Return type -[**MasterDetailsResponse**](MasterDetailsResponse.md) +[**MasterDetailsResponse**](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) + +# **CorporateSsoTokenPost** +> GetSsoToken CorporateSsoTokenPost(ctx, ssoTokenRequestCorporate) +Generate SSO token to access admin account + +This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **ssoTokenRequestCorporate** | [**SsoTokenRequestCorporate**](SsoTokenRequestCorporate.md)| User email of admin account | + +### Return type + +[**GetSsoToken**](getSsoToken.md) ### Authorization @@ -54,7 +240,36 @@ Name | Type | Description | Notes ### Return type -[**SubAccountsResponse**](SubAccountsResponse.md) +[**SubAccountsResponse**](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(ctx, id, toggleApplications) +Enable/disable sub-account application(s) + +API endpoint for the Corporate owner to enable/disable applications on the sub-account + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **int64**| Id of the sub-account organization (mandatory) | + **toggleApplications** | [**SubAccountAppsToggleRequest**](SubAccountAppsToggleRequest.md)| List of applications to activate or deactivate on a sub-account | + +### Return type + + (empty response body) ### Authorization @@ -108,7 +323,7 @@ Name | Type | Description | Notes ### Return type -[**SubAccountDetailsResponse**](SubAccountDetailsResponse.md) +[**SubAccountDetailsResponse**](subAccountDetailsResponse.md) ### Authorization @@ -125,7 +340,7 @@ Name | Type | Description | Notes > CorporateSubAccountIdPlanPut(ctx, id, updatePlanDetails) Update sub-account plan -This endpoint will update the sub-account plan +This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. ### Required Parameters @@ -150,6 +365,62 @@ Name | Type | Description | Notes [[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) +# **CorporateSubAccountIpAssociatePost** +> interface{} CorporateSubAccountIpAssociatePost(ctx, body) +Associate an IP to sub-accounts + +This endpoint allows to associate an IP to sub-accounts + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body1**](Body1.md)| Ip address association details | + +### Return type + +[*map[string]interface{}**](interface{}.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) + +# **CorporateSubAccountIpDissociatePut** +> CorporateSubAccountIpDissociatePut(ctx, body) +Dissociate an IP from sub-accounts + +This endpoint allows to dissociate an IP from sub-accounts + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body2**](Body2.md)| Ip address dissociation details | + +### Return type + + (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** > CreateApiKeyResponse CorporateSubAccountKeyPost(ctx, createApiKeyRequest) Create an API key for a sub-account @@ -165,7 +436,7 @@ Name | Type | Description | Notes ### Return type -[**CreateApiKeyResponse**](CreateApiKeyResponse.md) +[**CreateApiKeyResponse**](createApiKeyResponse.md) ### Authorization @@ -193,7 +464,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSubAccountResponse**](CreateSubAccountResponse.md) +[**CreateSubAccountResponse**](createSubAccountResponse.md) ### Authorization @@ -208,7 +479,7 @@ Name | Type | Description | Notes # **CorporateSubAccountSsoTokenPost** > GetSsoToken CorporateSubAccountSsoTokenPost(ctx, ssoTokenRequest) -Generate SSO token to access Brevo +Generate SSO token to access sub-account 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. @@ -221,7 +492,202 @@ Name | Type | Description | Notes ### Return type -[**GetSsoToken**](GetSsoToken.md) +[**GetSsoToken**](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) + +# **CorporateUserInvitationActionEmailPut** +> InlineResponse200 CorporateUserInvitationActionEmailPut(ctx, action, email) +Resend / cancel admin user invitation + +This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **action** | **string**| Action to be performed (cancel / resend) | + **email** | **string**| Email address of the recipient | + +### Return type + +[**InlineResponse200**](inline_response_200.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(ctx, email) +Revoke an admin user + +This endpoint allows to revoke/remove an invited member of your Admin account + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **email** | **string**| Email of the invited user | + +### Return type + + (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** +> GetAccountActivity GetAccountActivity(ctx, optional) +Get user activity logs + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***GetAccountActivityOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetAccountActivityOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **optional.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** | **optional.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** | **optional.Int64**| Number of documents per page | [default to 10] + **offset** | **optional.Int64**| Index of the first document in the page. | [default to 0] + +### Return type + +[**GetAccountActivity**](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** +> GetCorporateInvitedUsersList GetCorporateInvitedUsersList(ctx, ) +Get the list of all admin users + +This endpoint allows you to list all Admin users of your Admin account + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetCorporateInvitedUsersList**](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) + +# **GetCorporateUserPermission** +> GetCorporateUserPermission GetCorporateUserPermission(ctx, email) +Check admin user permissions + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **email** | **string**| Email of the invited user | + +### Return type + +[**GetCorporateUserPermission**](getCorporateUserPermission.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** +> []InlineResponse2001 GetSubAccountGroups(ctx, ) +Get the list of groups + +This endpoint allows you to list all groups created on your Admin account. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**[]InlineResponse2001**](inline_response_200_1.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** +> InviteAdminUser InviteAdminUser(ctx, 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. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sendInvitation** | [**InviteAdminUser**](InviteAdminUser.md)| Payload to send an invitation | + +### Return type + +[**InviteAdminUser**](inviteAdminUser.md) ### Authorization diff --git a/docs/MasterDetailsResponse.md b/docs/MasterDetailsResponse.md index 8bfe88a..bb876ca 100644 --- a/docs/MasterDetailsResponse.md +++ b/docs/MasterDetailsResponse.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **Id** | **int64** | Unique identifier of the master account organization | [optional] [default to null] **CurrencyCode** | **string** | Currency code of the master account organization | [optional] [default to null] **Timezone** | **string** | Timezone of the master account organization | [optional] [default to null] -**BillingInfo** | [***MasterDetailsResponseBillingInfo**](masterDetailsResponseBillingInfo.md) | | [optional] [default to null] -**PlanInfo** | [***MasterDetailsResponsePlanInfo**](masterDetailsResponsePlanInfo.md) | | [optional] [default to null] +**BillingInfo** | [***MasterDetailsResponseBillingInfo**](masterDetailsResponse_billingInfo.md) | | [optional] [default to null] +**PlanInfo** | [***MasterDetailsResponsePlanInfo**](masterDetailsResponse_planInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterDetailsResponseBillingInfo.md b/docs/MasterDetailsResponseBillingInfo.md index 2217eb5..b93e094 100644 --- a/docs/MasterDetailsResponseBillingInfo.md +++ b/docs/MasterDetailsResponseBillingInfo.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Billing email id of master account | [optional] [default to null] **CompanyName** | **string** | Company name of master account | [optional] [default to null] -**Name** | [***MasterDetailsResponseBillingInfoName**](masterDetailsResponseBillingInfoName.md) | | [optional] [default to null] -**Address** | [***MasterDetailsResponseBillingInfoAddress**](masterDetailsResponseBillingInfoAddress.md) | | [optional] [default to null] +**Name** | [***MasterDetailsResponseBillingInfoName**](masterDetailsResponse_billingInfo_name.md) | | [optional] [default to null] +**Address** | [***MasterDetailsResponseBillingInfoAddress**](masterDetailsResponse_billingInfo_address.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterDetailsResponsePlanInfo.md b/docs/MasterDetailsResponsePlanInfo.md index 29b120f..2f70914 100644 --- a/docs/MasterDetailsResponsePlanInfo.md +++ b/docs/MasterDetailsResponsePlanInfo.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Price** | **float32** | Plan amount | [optional] [default to null] **PlanPeriod** | **string** | Plan period type | [optional] [default to null] **SubAccounts** | **int32** | Number of sub-accounts | [optional] [default to null] -**Features** | [**[]MasterDetailsResponsePlanInfoFeatures**](masterDetailsResponsePlanInfoFeatures.md) | List of provided features in the plan | [optional] [default to null] +**Features** | [**[]MasterDetailsResponsePlanInfoFeatures**](masterDetailsResponse_planInfo_features.md) | List of provided features in the plan | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterDetailsResponsePlanInfoFeatures.md b/docs/MasterDetailsResponsePlanInfoFeatures.md index 573c01c..3236c63 100644 --- a/docs/MasterDetailsResponsePlanInfoFeatures.md +++ b/docs/MasterDetailsResponsePlanInfoFeatures.md @@ -6,7 +6,9 @@ Name | Type | Description | Notes **Name** | **string** | Name of the feature | [optional] [default to null] **UnitValue** | **string** | Unit value of the feature | [optional] [default to null] **Quantity** | **int64** | Quantity provided in the plan | [optional] [default to null] +**QuantityWithOverages** | **int64** | Quantity with overages provided in the plan (only applicable on ENTv2) | [optional] [default to null] **Used** | **int64** | Quantity consumed by master | [optional] [default to null] +**UsedOverages** | **int64** | Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) | [optional] [default to null] **Remaining** | **int64** | Quantity remaining in the plan | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Note.md b/docs/Note.md index f3fe7bb..7719b19 100644 --- a/docs/Note.md +++ b/docs/Note.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Text** | **string** | Text content of a note | [default to null] **ContactIds** | **[]int32** | Contact ids linked to a note | [optional] [default to null] **DealIds** | **[]string** | Deal ids linked to a note | [optional] [default to null] -**AuthorId** | **map[string]interface{}** | Account details of user which created the note | [optional] [default to null] +**AuthorId** | [**map[string]interface{}**](interface{}.md) | Account details of user which created the note | [optional] [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | Note created date/time | [optional] [default to null] **UpdatedAt** | [**time.Time**](time.Time.md) | Note updated date/time | [optional] [default to null] diff --git a/docs/Notification.md b/docs/Notification.md new file mode 100644 index 0000000..5fc17f8 --- /dev/null +++ b/docs/Notification.md @@ -0,0 +1,11 @@ +# Notification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channel** | **string** | Channel used to send the notifications. | [default to null] +**Text** | **string** | Use this field if you want to give more context to your contact about the payment request. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Order.md b/docs/Order.md index c12efce..5772b48 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -8,9 +8,10 @@ Name | Type | Description | Notes **UpdatedAt** | **string** | Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. | [default to null] **Status** | **string** | State of the order. | [default to null] **Amount** | **float32** | Total amount of the order, including all shipping expenses, tax and the price of items. | [default to null] -**Products** | [**[]OrderProducts**](orderProducts.md) | | [default to null] +**StoreId** | **string** | ID of store where the order is placed | [optional] [default to null] +**Products** | [**[]OrderProducts**](order_products.md) | | [default to null] **Email** | **string** | Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. | [optional] [default to null] -**Billing** | [***OrderBilling**](orderBilling.md) | | [optional] [default to null] +**Billing** | [***OrderBilling**](order_billing.md) | | [optional] [default to null] **Coupons** | **[]string** | Coupons applied to the order. Stored case insensitive. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderBatch.md b/docs/OrderBatch.md index 1e2bd94..67c1d4a 100644 --- a/docs/OrderBatch.md +++ b/docs/OrderBatch.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Orders** | [**[]Order**](order.md) | array of order objects | [default to null] **NotifyUrl** | **string** | Notify Url provided by client to get the status of batch request | [optional] [default to null] +**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 null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderBilling.md b/docs/OrderBilling.md index f1bd579..e8d38ba 100644 --- a/docs/OrderBilling.md +++ b/docs/OrderBilling.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Address** | **string** | Full billing address. | [optional] [default to null] **City** | **string** | Exact city of the address. | [optional] [default to null] **CountryCode** | **string** | Billing country 2-letter ISO code. | [optional] [default to null] +**Country** | **string** | Billing country name. | [optional] [default to null] **Phone** | **string** | Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. | [optional] [default to null] **PostCode** | **string** | Postcode for delivery and billing. | [optional] [default to null] **PaymentMethod** | **string** | How the visitor will pay for the item(s), e.g. paypal, check, etc. | [optional] [default to null] diff --git a/docs/PaymentsApi.md b/docs/PaymentsApi.md new file mode 100644 index 0000000..3ab8b7d --- /dev/null +++ b/docs/PaymentsApi.md @@ -0,0 +1,89 @@ +# \PaymentsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePaymentRequest**](PaymentsApi.md#CreatePaymentRequest) | **Post** /payments/requests | Create a payment request +[**DeletePaymentRequest**](PaymentsApi.md#DeletePaymentRequest) | **Delete** /payments/requests/{id} | Delete a payment request. +[**GetPaymentRequest**](PaymentsApi.md#GetPaymentRequest) | **Get** /payments/requests/{id} | Get payment request details + + +# **CreatePaymentRequest** +> CreatePaymentResponse CreatePaymentRequest(ctx, createPaymentRquest) +Create a payment request + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createPaymentRquest** | [**CreatePaymentRequest**](CreatePaymentRequest.md)| Create a payment request | + +### Return type + +[**CreatePaymentResponse**](createPaymentResponse.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) + +# **DeletePaymentRequest** +> DeletePaymentRequest(ctx, id) +Delete a payment request. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| ID of the payment request. | + +### Return type + + (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) + +# **GetPaymentRequest** +> GetPaymentRequest GetPaymentRequest(ctx, id) +Get payment request details + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Id of the payment Request | + +### Return type + +[**GetPaymentRequest**](getPaymentRequest.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/docs/Pipeline.md b/docs/Pipeline.md index bd36f8d..22f85d8 100644 --- a/docs/Pipeline.md +++ b/docs/Pipeline.md @@ -3,6 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Pipeline** | **string** | Pipeline id | [optional] [default to null] +**PipelineName** | **string** | Pipeline Name | [optional] [default to null] **Stages** | [**[]PipelineStage**](PipelineStage.md) | List of stages | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Pipelines.md b/docs/Pipelines.md new file mode 100644 index 0000000..3ac0c50 --- /dev/null +++ b/docs/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/docs/PostContactInfo.md b/docs/PostContactInfo.md index 77df0a5..5988616 100644 --- a/docs/PostContactInfo.md +++ b/docs/PostContactInfo.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [***PostContactInfoContacts**](postContactInfoContacts.md) | | [default to null] +**Contacts** | [***PostContactInfoContacts**](postContactInfo_contacts.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProcessApi.md b/docs/ProcessApi.md index fea3f4a..4a40452 100644 --- a/docs/ProcessApi.md +++ b/docs/ProcessApi.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes ### Return type -[**GetProcess**](GetProcess.md) +[**GetProcess**](getProcess.md) ### Authorization @@ -56,7 +56,7 @@ Name | Type | Description | Notes ### Return type -[**GetProcesses**](GetProcesses.md) +[**GetProcesses**](getProcesses.md) ### Authorization diff --git a/docs/PutRevokeUserPermission.md b/docs/PutRevokeUserPermission.md new file mode 100644 index 0000000..a3f4013 --- /dev/null +++ b/docs/PutRevokeUserPermission.md @@ -0,0 +1,10 @@ +# PutRevokeUserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Putresendcancelinvitation.md b/docs/Putresendcancelinvitation.md new file mode 100644 index 0000000..f7389b9 --- /dev/null +++ b/docs/Putresendcancelinvitation.md @@ -0,0 +1,10 @@ +# Putresendcancelinvitation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemainingCreditModel.md b/docs/RemainingCreditModel.md index 7e96320..7a684bb 100644 --- a/docs/RemainingCreditModel.md +++ b/docs/RemainingCreditModel.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Child** | [***RemainingCreditModelChild**](remainingCreditModelChild.md) | | [default to null] -**Reseller** | [***RemainingCreditModelReseller**](remainingCreditModelReseller.md) | | [default to null] +**Child** | [***RemainingCreditModelChild**](remainingCreditModel_child.md) | | [default to null] +**Reseller** | [***RemainingCreditModelReseller**](remainingCreditModel_reseller.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md index 3c10e26..eaebcb5 100644 --- a/docs/RequestContactExport.md +++ b/docs/RequestContactExport.md @@ -4,7 +4,7 @@ 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] [default to null] -**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](requestContactExportCustomContactFilter.md) | | [default to null] +**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](requestContactExport_customContactFilter.md) | | [default to null] **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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md index a9650d1..6ce5fb0 100644 --- a/docs/RequestContactImport.md +++ b/docs/RequestContactImport.md @@ -5,11 +5,12 @@ 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] [default to null] **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] [default to null] -**JsonBody** | [**[]map[string]interface{}**](map.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] [default to null] +**JsonBody** | [**[]RequestContactImportJsonBody**](requestContactImport_jsonBody.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] [default to null] **ListIds** | **[]int64** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] [default to null] **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] [default to null] -**NewList** | [***RequestContactImportNewList**](requestContactImportNewList.md) | | [optional] [default to null] +**NewList** | [***RequestContactImportNewList**](requestContactImport_newList.md) | | [optional] [default to null] **EmailBlacklist** | **bool** | To blacklist all the contacts for email | [optional] [default to null] +**DisableNotification** | **bool** | To disable email notification | [optional] [default to null] **SmsBlacklist** | **bool** | To blacklist all the contacts for sms | [optional] [default to null] **UpdateExistingContacts** | **bool** | To facilitate the choice to update the existing contacts | [optional] [default to null] **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 null] diff --git a/docs/RequestContactImportJsonBody.md b/docs/RequestContactImportJsonBody.md new file mode 100644 index 0000000..67de6d2 --- /dev/null +++ b/docs/RequestContactImportJsonBody.md @@ -0,0 +1,11 @@ +# RequestContactImportJsonBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | List of attributes to be imported | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md index e7d4cd9..ea3d7d8 100644 --- a/docs/ResellerApi.md +++ b/docs/ResellerApi.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes ### Return type -[**RemainingCreditModel**](RemainingCreditModel.md) +[**RemainingCreditModel**](remainingCreditModel.md) ### Authorization @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**CreateReseller**](CreateReseller.md) +[**CreateReseller**](createReseller.md) ### Authorization @@ -229,7 +229,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildAccountCreationStatus**](GetChildAccountCreationStatus.md) +[**GetChildAccountCreationStatus**](getChildAccountCreationStatus.md) ### Authorization @@ -255,7 +255,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildDomains**](GetChildDomains.md) +[**GetChildDomains**](getChildDomains.md) ### Authorization @@ -281,7 +281,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildInfo**](GetChildInfo.md) +[**GetChildInfo**](getChildInfo.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildrenList**](GetChildrenList.md) +[**GetChildrenList**](getChildrenList.md) ### Authorization @@ -343,7 +343,7 @@ Name | Type | Description | Notes ### Return type -[**GetSsoToken**](GetSsoToken.md) +[**GetSsoToken**](getSsoToken.md) ### Authorization @@ -370,7 +370,7 @@ Name | Type | Description | Notes ### Return type -[**RemainingCreditModel**](RemainingCreditModel.md) +[**RemainingCreditModel**](remainingCreditModel.md) ### Authorization diff --git a/docs/SMSCampaignsApi.md b/docs/SMSCampaignsApi.md index d87d748..91d7c3f 100644 --- a/docs/SMSCampaignsApi.md +++ b/docs/SMSCampaignsApi.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -119,7 +119,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmsCampaigns**](GetSmsCampaigns.md) +[**GetSmsCampaigns**](getSmsCampaigns.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](CreatedProcessId.md) +[**CreatedProcessId**](createdProcessId.md) ### Authorization diff --git a/docs/SendReport.md b/docs/SendReport.md index afd5e8a..3d5474f 100644 --- a/docs/SendReport.md +++ b/docs/SendReport.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Language** | **string** | Language of email content for campaign report sending. | [optional] [default to null] -**Email** | [***SendReportEmail**](sendReportEmail.md) | | [default to null] +**Email** | [***SendReportEmail**](sendReport_email.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index d274350..1fb247c 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Sender** | [***SendSmtpEmailSender**](sendSmtpEmailSender.md) | | [optional] [default to null] -**To** | [**[]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] [default to null] -**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] -**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] +**Sender** | [***SendSmtpEmailSender**](sendSmtpEmail_sender.md) | | [optional] [default to null] +**To** | [**[]SendSmtpEmailTo**](sendSmtpEmail_to.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] [default to null] +**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmail_bcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] +**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmail_cc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] **HtmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] [default to null] **TextContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] [default to null] **Subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] [default to null] -**ReplyTo** | [***SendSmtpEmailReplyTo**](sendSmtpEmailReplyTo.md) | | [optional] [default to null] -**Attachment** | [**[]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] [default to null] -**Headers** | **map[string]interface{}** | 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] [default to null] +**ReplyTo** | [***SendSmtpEmailReplyTo**](sendSmtpEmail_replyTo.md) | | [optional] [default to null] +**Attachment** | [**[]SendSmtpEmailAttachment**](sendSmtpEmail_attachment.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] [default to null] +**Headers** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **TemplateId** | **int64** | Id of the template. | [optional] [default to null] -**Params** | **map[string]interface{}** | 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] [default to null] -**MessageVersions** | [**[]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] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**MessageVersions** | [**[]SendSmtpEmailMessageVersions**](sendSmtpEmail_messageVersions.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] [default to null] **Tags** | **[]string** | Tag your emails to find them more easily | [optional] [default to null] **ScheduledAt** | [**time.Time**](time.Time.md) | 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] [default to null] **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] [default to null] diff --git a/docs/SendSmtpEmailMessageVersions.md b/docs/SendSmtpEmailMessageVersions.md index 109ecb8..e164a78 100644 --- a/docs/SendSmtpEmailMessageVersions.md +++ b/docs/SendSmtpEmailMessageVersions.md @@ -3,12 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**To** | [**[]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\"}] | [default to null] -**Params** | [**map[string]interface{}** | ](interface{}.md) | 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] [default to null] -**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] -**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] -**ReplyTo** | [***SendSmtpEmailReplyTo1**](sendSmtpEmailReplyTo1.md) | | [optional] [default to null] +**To** | [**[]SendSmtpEmailTo1**](sendSmtpEmail_to_1.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\"}] | [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmail_bcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] +**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmail_cc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] +**ReplyTo** | [***SendSmtpEmailReplyTo1**](sendSmtpEmail_replyTo_1.md) | | [optional] [default to null] **Subject** | **string** | Custom subject specific to message version | [optional] [default to null] +**HtmlContent** | **string** | HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** | [optional] [default to null] +**TextContent** | **string** | Plain Text body of the message. **Ignored if 'templateId' is passed** | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendWhatsappMessage.md b/docs/SendWhatsappMessage.md index 77c41d5..9a76bda 100644 --- a/docs/SendWhatsappMessage.md +++ b/docs/SendWhatsappMessage.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **TemplateId** | **int32** | ID of the template to send | [optional] [default to null] **Text** | **string** | Text to be sent as message body (will be overridden if templateId is passed in the same request) | [optional] [default to null] **SenderNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. | [optional] [default to null] **ContactNumbers** | **[]string** | List of phone numbers of the contacts | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendersApi.md b/docs/SendersApi.md index 8908587..5ccfb98 100644 --- a/docs/SendersApi.md +++ b/docs/SendersApi.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSenderModel**](CreateSenderModel.md) +[**CreateSenderModel**](createSenderModel.md) ### Authorization @@ -81,7 +81,7 @@ This endpoint does not need any parameter. ### Return type -[**GetIps**](GetIps.md) +[**GetIps**](getIps.md) ### Authorization @@ -107,7 +107,7 @@ Name | Type | Description | Notes ### Return type -[**GetIpsFromSender**](GetIpsFromSender.md) +[**GetIpsFromSender**](getIpsFromSender.md) ### Authorization @@ -141,7 +141,7 @@ Name | Type | Description | Notes ### Return type -[**GetSendersList**](GetSendersList.md) +[**GetSendersList**](getSendersList.md) ### Authorization diff --git a/docs/SetConfigDisplayCurrency.md b/docs/SetConfigDisplayCurrency.md new file mode 100644 index 0000000..084f25b --- /dev/null +++ b/docs/SetConfigDisplayCurrency.md @@ -0,0 +1,10 @@ +# SetConfigDisplayCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | ISO 4217 compliant display currency code | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SsoTokenRequest.md b/docs/SsoTokenRequest.md index 9ff106b..ba3f470 100644 --- a/docs/SsoTokenRequest.md +++ b/docs/SsoTokenRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **Id** | **int64** | Id of the sub-account organization | [default to null] **Email** | **string** | User email of sub-account organization | [optional] [default to null] **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] [default to null] +**Url** | **string** | Set the full target URL after login success. The user will land directly on this target URL after login | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SsoTokenRequestCorporate.md b/docs/SsoTokenRequestCorporate.md new file mode 100644 index 0000000..51778bf --- /dev/null +++ b/docs/SsoTokenRequestCorporate.md @@ -0,0 +1,10 @@ +# SsoTokenRequestCorporate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | User email of sub-account organization | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountAppsToggleRequest.md b/docs/SubAccountAppsToggleRequest.md new file mode 100644 index 0000000..77f447e --- /dev/null +++ b/docs/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] [default to null] +**Whatsapp** | **bool** | Set this field to enable or disable Whatsapp campaigns on the sub-account | [optional] [default to null] +**Automation** | **bool** | Set this field to enable or disable Automation on the sub-account | [optional] [default to null] +**EmailCampaigns** | **bool** | Set this field to enable or disable Email Campaigns on the sub-account | [optional] [default to null] +**SmsCampaigns** | **bool** | Set this field to enable or disable SMS Marketing on the sub-account | [optional] [default to null] +**LandingPages** | **bool** | Set this field to enable or disable Landing pages on the sub-account | [optional] [default to null] +**TransactionalEmails** | **bool** | Set this field to enable or disable Transactional Email on the sub-account | [optional] [default to null] +**TransactionalSms** | **bool** | Set this field to enable or disable Transactional SMS on the sub-account | [optional] [default to null] +**FacebookAds** | **bool** | Set this field to enable or disable Facebook ads on the sub-account | [optional] [default to null] +**WebPush** | **bool** | Set this field to enable or disable Web Push on the sub-account | [optional] [default to null] +**Meetings** | **bool** | Set this field to enable or disable Meetings on the sub-account | [optional] [default to null] +**Conversations** | **bool** | Set this field to enable or disable Conversations on the sub-account | [optional] [default to null] +**Crm** | **bool** | Set this field to enable or disable Sales CRM on the sub-account | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponse.md b/docs/SubAccountDetailsResponse.md index 9c47171..a43cae6 100644 --- a/docs/SubAccountDetailsResponse.md +++ b/docs/SubAccountDetailsResponse.md @@ -6,7 +6,8 @@ Name | Type | Description | Notes **Name** | **string** | Name of the sub-account user | [optional] [default to null] **Email** | **string** | Email id of the sub-account organization | [optional] [default to null] **CompanyName** | **string** | Sub-account company name | [optional] [default to null] -**PlanInfo** | [***SubAccountDetailsResponsePlanInfo**](subAccountDetailsResponsePlanInfo.md) | | [optional] [default to null] +**Groups** | [**[]SubAccountDetailsResponseGroups**](subAccountDetailsResponse_groups.md) | List of group(s) associated with the sub-account | [optional] [default to null] +**PlanInfo** | [***SubAccountDetailsResponsePlanInfo**](subAccountDetailsResponse_planInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponseGroups.md b/docs/SubAccountDetailsResponseGroups.md new file mode 100644 index 0000000..f97a00a --- /dev/null +++ b/docs/SubAccountDetailsResponseGroups.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponseGroups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Group id | [optional] [default to null] +**Name** | **string** | Name of the group | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfo.md b/docs/SubAccountDetailsResponsePlanInfo.md index 81a4e09..bb5eabd 100644 --- a/docs/SubAccountDetailsResponsePlanInfo.md +++ b/docs/SubAccountDetailsResponsePlanInfo.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Credits** | [***SubAccountDetailsResponsePlanInfoCredits**](subAccountDetailsResponsePlanInfoCredits.md) | | [optional] [default to null] -**Features** | [***SubAccountDetailsResponsePlanInfoFeatures**](subAccountDetailsResponsePlanInfoFeatures.md) | | [optional] [default to null] +**Credits** | [***SubAccountDetailsResponsePlanInfoCredits**](subAccountDetailsResponse_planInfo_credits.md) | | [optional] [default to null] +**Features** | [***SubAccountDetailsResponsePlanInfoFeatures**](subAccountDetailsResponse_planInfo_features.md) | | [optional] [default to null] **PlanType** | **string** | type of the plan | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponsePlanInfoCredits.md b/docs/SubAccountDetailsResponsePlanInfoCredits.md index 1cb594a..527bfd3 100644 --- a/docs/SubAccountDetailsResponsePlanInfoCredits.md +++ b/docs/SubAccountDetailsResponsePlanInfoCredits.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Sms** | **int64** | SMS credits remaining on the sub-account | [optional] [default to null] -**Emails** | [***SubAccountDetailsResponsePlanInfoCreditsEmails**](subAccountDetailsResponsePlanInfoCreditsExmails.md) | | [optional] [default to null] +**Emails** | [***SubAccountDetailsResponsePlanInfoCreditsEmails**](subAccountDetailsResponse_planInfo_credits_emails.md) | | [optional] [default to null] +**Sms** | [***SubAccountDetailsResponsePlanInfoCreditsSms**](subAccountDetailsResponse_planInfo_credits_sms.md) | | [optional] [default to null] +**WpSubscribers** | [***SubAccountDetailsResponsePlanInfoCreditsWpSubscribers**](subAccountDetailsResponse_planInfo_credits_wpSubscribers.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponsePlanInfoCreditsSms.md b/docs/SubAccountDetailsResponsePlanInfoCreditsSms.md new file mode 100644 index 0000000..be3d200 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoCreditsSms.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCreditsSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of SMS messaging limits provided | [optional] [default to null] +**Remaining** | **int64** | Available SMS messaging limits for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md b/docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md new file mode 100644 index 0000000..c2f252d --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCreditsWpSubscribers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of Push sending limits provided | [optional] [default to null] +**Remaining** | **int64** | Available Push sending limits for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoFeatures.md b/docs/SubAccountDetailsResponsePlanInfoFeatures.md index 059d426..3e3babf 100644 --- a/docs/SubAccountDetailsResponsePlanInfoFeatures.md +++ b/docs/SubAccountDetailsResponsePlanInfoFeatures.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Inbox** | [***SubAccountDetailsResponsePlanInfoFeaturesInbox**](subAccountDetailsResponsePlanInfoFeaturesInbox.md) | | [optional] [default to null] -**LandingPage** | [***SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](subAccountDetailsResponsePlanInfoFeaturesLandingPage.md) | | [optional] [default to null] -**Users** | [***SubAccountDetailsResponsePlanInfoFeaturesUsers**](subAccountDetailsResponsePlanInfoFeaturesUsers.md) | | [optional] [default to null] +**Inbox** | [***SubAccountDetailsResponsePlanInfoFeaturesInbox**](subAccountDetailsResponse_planInfo_features_inbox.md) | | [optional] [default to null] +**LandingPage** | [***SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](subAccountDetailsResponse_planInfo_features_landingPage.md) | | [optional] [default to null] +**Users** | [***SubAccountDetailsResponsePlanInfoFeaturesUsers**](subAccountDetailsResponse_planInfo_features_users.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountUpdatePlanRequest.md b/docs/SubAccountUpdatePlanRequest.md index beffb6a..e0fd934 100644 --- a/docs/SubAccountUpdatePlanRequest.md +++ b/docs/SubAccountUpdatePlanRequest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Credits** | [***SubAccountUpdatePlanRequestCredits**](subAccountUpdatePlanRequestCredits.md) | | [optional] [default to null] -**Features** | [***SubAccountUpdatePlanRequestFeatures**](subAccountUpdatePlanRequestFeatures.md) | | [optional] [default to null] +**Credits** | [***SubAccountUpdatePlanRequestCredits**](subAccountUpdatePlanRequest_credits.md) | | [optional] [default to null] +**Features** | [***SubAccountUpdatePlanRequestFeatures**](subAccountUpdatePlanRequest_features.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountUpdatePlanRequestCredits.md b/docs/SubAccountUpdatePlanRequestCredits.md index 790ca85..b7c56d4 100644 --- a/docs/SubAccountUpdatePlanRequestCredits.md +++ b/docs/SubAccountUpdatePlanRequestCredits.md @@ -4,6 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **int64** | Number of email credits | [optional] [default to null] +**Sms** | **float32** | Number of SMS credits | available in ENT-v2 only | [optional] [default to null] +**WpSubscribers** | **int64** | Number of Push credits, possible value is 0 and -1 | available in ENT-v2 only | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountUpdatePlanRequestFeatures.md b/docs/SubAccountUpdatePlanRequestFeatures.md index d6d4f19..bb9803b 100644 --- a/docs/SubAccountUpdatePlanRequestFeatures.md +++ b/docs/SubAccountUpdatePlanRequestFeatures.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Users** | **int64** | Number of multi-users | [optional] [default to null] -**LandingPage** | **int64** | Number of landing pages | [optional] [default to null] -**Inbox** | **int64** | Number of inboxes | [optional] [default to null] +**LandingPage** | **int64** | Number of landing pages / Not required on ENTv2 | [optional] [default to null] +**Inbox** | **int64** | Number of inboxes / Not required on ENTv2 | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountsResponse.md b/docs/SubAccountsResponse.md index 451d609..cad068d 100644 --- a/docs/SubAccountsResponse.md +++ b/docs/SubAccountsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of subaccounts | [optional] [default to null] -**SubAccounts** | [**[]SubAccountsResponseSubAccounts**](subAccountsResponseSubAccounts.md) | | [optional] [default to null] +**SubAccounts** | [**[]SubAccountsResponseSubAccounts**](subAccountsResponse_subAccounts.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountsResponseGroups.md b/docs/SubAccountsResponseGroups.md new file mode 100644 index 0000000..477c005 --- /dev/null +++ b/docs/SubAccountsResponseGroups.md @@ -0,0 +1,11 @@ +# SubAccountsResponseGroups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Group identifier | [optional] [default to null] +**Name** | **string** | Name of the group | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountsResponseSubAccounts.md b/docs/SubAccountsResponseSubAccounts.md index b7a9a5f..d617e81 100644 --- a/docs/SubAccountsResponseSubAccounts.md +++ b/docs/SubAccountsResponseSubAccounts.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **CompanyName** | **string** | Name of the sub-account company | [default to null] **Active** | **bool** | Whether the sub-account is active or not | [default to null] **CreatedAt** | **int64** | Timestamp when the sub-account was created | [default to null] +**Groups** | [**[]SubAccountsResponseGroups**](subAccountsResponse_groups.md) | Group details | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TasksApi.md b/docs/TasksApi.md index 8114c04..ffc767e 100644 --- a/docs/TasksApi.md +++ b/docs/TasksApi.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes **filterType** | **optional.String**| Filter by task type (ID) | **filterStatus** | **optional.String**| Filter by task status | **filterDate** | **optional.String**| Filter by date | - **filterAssignTo** | **optional.String**| Filter by assignTo id | + **filterAssignTo** | **optional.String**| Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute. | **filterContacts** | **optional.String**| Filter by contact ids | **filterDeals** | **optional.String**| Filter by deals ids | **filterCompanies** | **optional.String**| Filter by companies ids | @@ -119,7 +119,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **id** | **string**| | - **body** | [**Body7**](Body7.md)| Updated task details. | + **body** | [**Body12**](Body12.md)| Updated task details. | ### Return type @@ -137,7 +137,7 @@ Name | Type | Description | Notes [[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** -> InlineResponse2011 CrmTasksPost(ctx, body) +> InlineResponse2012 CrmTasksPost(ctx, body) Create a task ### Required Parameters @@ -145,11 +145,11 @@ Create a task Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**Body6**](Body6.md)| Task name. | + **body** | [**Body11**](Body11.md)| Task name. | ### Return type -[**InlineResponse2011**](inlineResponse2011.md) +[**InlineResponse2012**](inline_response_201_2.md) ### Authorization diff --git a/docs/TransactionalEmailsApi.md b/docs/TransactionalEmailsApi.md index d1b51ce..72e8a8c 100644 --- a/docs/TransactionalEmailsApi.md +++ b/docs/TransactionalEmailsApi.md @@ -24,7 +24,7 @@ Method | HTTP request | Description [**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 -[**SmtpLogMessageIdDelete**](TransactionalEmailsApi.md#SmtpLogMessageIdDelete) | **Delete** /smtp/log/{messageId} | Delete an SMTP transactional log +[**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 @@ -69,7 +69,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -224,7 +224,7 @@ Name | Type | Description | Notes ### Return type -[**GetAggregatedReport**](GetAggregatedReport.md) +[**GetAggregatedReport**](getAggregatedReport.md) ### Authorization @@ -248,7 +248,7 @@ This endpoint does not need any parameter. ### Return type -[**GetBlockedDomains**](GetBlockedDomains.md) +[**GetBlockedDomains**](getBlockedDomains.md) ### Authorization @@ -293,7 +293,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailEventReport**](GetEmailEventReport.md) +[**GetEmailEventReport**](getEmailEventReport.md) ### Authorization @@ -373,7 +373,7 @@ Name | Type | Description | Notes ### Return type -[**GetScheduledEmailByMessageId**](GetScheduledEmailByMessageId.md) +[**GetScheduledEmailByMessageId**](getScheduledEmailByMessageId.md) ### Authorization @@ -412,7 +412,7 @@ Name | Type | Description | Notes ### Return type -[**GetReports**](GetReports.md) +[**GetReports**](getReports.md) ### Authorization @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmtpTemplateOverview**](GetSmtpTemplateOverview.md) +[**GetSmtpTemplateOverview**](getSmtpTemplateOverview.md) ### Authorization @@ -474,7 +474,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmtpTemplates**](GetSmtpTemplates.md) +[**GetSmtpTemplates**](getSmtpTemplates.md) ### Authorization @@ -512,7 +512,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacBlockedContacts**](GetTransacBlockedContacts.md) +[**GetTransacBlockedContacts**](getTransacBlockedContacts.md) ### Authorization @@ -538,7 +538,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacEmailContent**](GetTransacEmailContent.md) +[**GetTransacEmailContent**](getTransacEmailContent.md) ### Authorization @@ -580,7 +580,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacEmailsList**](GetTransacEmailsList.md) +[**GetTransacEmailsList**](getTransacEmailsList.md) ### Authorization @@ -633,7 +633,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSmtpEmail**](CreateSmtpEmail.md) +[**CreateSmtpEmail**](createSmtpEmail.md) ### Authorization @@ -672,8 +672,8 @@ Name | Type | Description | Notes [[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) -# **SmtpLogMessageIdDelete** -> SmtpLogMessageIdDelete(ctx, messageId) +# **SmtpLogIdentifierDelete** +> SmtpLogIdentifierDelete(ctx, identifier) Delete an SMTP transactional log ### Required Parameters @@ -681,7 +681,7 @@ Delete an SMTP transactional log Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **messageId** | **string**| MessageId of the transactional log to delete | + **identifier** | **string**| MessageId or Email of the transactional log(s) to delete | ### Return type diff --git a/docs/TransactionalSMSApi.md b/docs/TransactionalSMSApi.md index 675ac29..567f6aa 100644 --- a/docs/TransactionalSMSApi.md +++ b/docs/TransactionalSMSApi.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmsEventReport**](GetSmsEventReport.md) +[**GetSmsEventReport**](getSmsEventReport.md) ### Authorization @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacAggregatedSmsReport**](GetTransacAggregatedSmsReport.md) +[**GetTransacAggregatedSmsReport**](getTransacAggregatedSmsReport.md) ### Authorization @@ -111,7 +111,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacSmsReport**](GetTransacSmsReport.md) +[**GetTransacSmsReport**](getTransacSmsReport.md) ### Authorization @@ -137,7 +137,7 @@ Name | Type | Description | Notes ### Return type -[**SendSms**](SendSms.md) +[**SendSms**](sendSms.md) ### Authorization diff --git a/docs/TransactionalWhatsAppApi.md b/docs/TransactionalWhatsAppApi.md index 8ca2ffc..355a75b 100644 --- a/docs/TransactionalWhatsAppApi.md +++ b/docs/TransactionalWhatsAppApi.md @@ -37,7 +37,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappEventReport**](GetWhatsappEventReport.md) +[**GetWhatsappEventReport**](getWhatsappEventReport.md) ### Authorization @@ -51,7 +51,7 @@ Name | Type | Description | Notes [[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** -> InlineResponse2012 SendWhatsappMessage(ctx, sendWhatsappMessage) +> InlineResponse2014 SendWhatsappMessage(ctx, 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.**) @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2012**](InlineResponse2012.md) +[**InlineResponse2014**](inline_response_201_4.md) ### Authorization diff --git a/docs/UpdateAttribute.md b/docs/UpdateAttribute.md index c0c8348..14984e8 100644 --- a/docs/UpdateAttribute.md +++ b/docs/UpdateAttribute.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]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] [default to null] +**Enumeration** | [**[]UpdateAttributeEnumeration**](updateAttribute_enumeration.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] [default to null] +**MultiCategoryOptions** | **[]string** | Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateBatchContacts.md b/docs/UpdateBatchContacts.md index 05b69af..d7e8689 100644 --- a/docs/UpdateBatchContacts.md +++ b/docs/UpdateBatchContacts.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [**[]UpdateBatchContactsContacts**](updateBatchContactsContacts.md) | List of contacts to be updated | [optional] [default to null] +**Contacts** | [**[]UpdateBatchContactsContacts**](updateBatchContacts_contacts.md) | List of contacts to be updated | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateBatchContactsContacts.md b/docs/UpdateBatchContactsContacts.md index f2c7801..6ea24ee 100644 --- a/docs/UpdateBatchContactsContacts.md +++ b/docs/UpdateBatchContactsContacts.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Id** | **int64** | id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] [default to null] **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] [default to null] **ExtId** | **string** | Pass your own Id to update ext_id of a contact. | [optional] [default to null] -**Attributes** | [**map[string]interface{}** | ](interface{}.md) | 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] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **EmailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] [default to null] **ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md index 60b4abb..dafd9cd 100644 --- a/docs/UpdateContact.md +++ b/docs/UpdateContact.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Attributes** | **map[string]interface{}** | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **ExtId** | **string** | Pass your own Id to update ext_id of a contact. | [optional] [default to null] **EmailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] [default to null] diff --git a/docs/UpdateCouponCollection.md b/docs/UpdateCouponCollection.md new file mode 100644 index 0000000..220ae98 --- /dev/null +++ b/docs/UpdateCouponCollection.md @@ -0,0 +1,13 @@ +# UpdateCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultCoupon** | **string** | A default coupon to be used in case there are no coupons left | [optional] [default to null] +**ExpirationDate** | [**time.Time**](time.Time.md) | Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. | [optional] [default to null] +**RemainingDaysAlert** | **int32** | Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. | [optional] [default to null] +**RemainingCouponsAlert** | **int32** | Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md index a623f4e..250e388 100644 --- a/docs/UpdateEmailCampaign.md +++ b/docs/UpdateEmailCampaign.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the campaign | [optional] [default to null] -**Sender** | [***UpdateEmailCampaignSender**](updateEmailCampaignSender.md) | | [optional] [default to null] +**Sender** | [***UpdateEmailCampaignSender**](updateEmailCampaign_sender.md) | | [optional] [default to null] **Name** | **string** | Name of the campaign | [optional] [default to null] **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] [default to null] **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] **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] [default to null] **Subject** | **string** | Subject of the campaign | [optional] [default to null] +**PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] [default to null] **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] [default to null] -**Recipients** | [***UpdateEmailCampaignRecipients**](updateEmailCampaignRecipients.md) | | [optional] [default to null] +**Recipients** | [***UpdateEmailCampaignRecipients**](updateEmailCampaign_recipients.md) | | [optional] [default to null] **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] [default to null] **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 null] **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] [default to null] @@ -20,7 +21,7 @@ Name | Type | Description | Notes **Footer** | **string** | Footer of the email campaign | [optional] [default to null] **Header** | **string** | Header of the email campaign | [optional] [default to null] **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] [default to null] -**Params** | **map[string]interface{}** | 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] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **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] [default to null] **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 null] **SubjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] diff --git a/docs/UpdateExternalFeed.md b/docs/UpdateExternalFeed.md index 47121a9..52e7b6a 100644 --- a/docs/UpdateExternalFeed.md +++ b/docs/UpdateExternalFeed.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [optional] [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [optional] [default to null] **Cache** | **bool** | Toggle caching of feed url response | [optional] [default to null] diff --git a/docs/UpdateSender.md b/docs/UpdateSender.md index b136775..366cd16 100644 --- a/docs/UpdateSender.md +++ b/docs/UpdateSender.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | From Name to update the sender | [optional] [default to null] **Email** | **string** | From Email to update the sender | [optional] [default to null] -**Ips** | [**[]CreateSenderIps**](createSenderIps.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] [default to null] +**Ips** | [**[]CreateSenderIps**](createSender_ips.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md index 23e6a04..3807fab 100644 --- a/docs/UpdateSmtpTemplate.md +++ b/docs/UpdateSmtpTemplate.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the template | [optional] [default to null] -**Sender** | [***UpdateSmtpTemplateSender**](updateSmtpTemplateSender.md) | | [optional] [default to null] +**Sender** | [***UpdateSmtpTemplateSender**](updateSmtpTemplate_sender.md) | | [optional] [default to null] **TemplateName** | **string** | Name of the template | [optional] [default to null] **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] [default to null] **HtmlUrl** | **string** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] [default to null] diff --git a/docs/UpdateWebhook.md b/docs/UpdateWebhook.md index 02cda83..edd93d2 100644 --- a/docs/UpdateWebhook.md +++ b/docs/UpdateWebhook.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **Description** | **string** | Description of the webhook | [optional] [default to null] **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] [default to null] **Domain** | **string** | Inbound domain of webhook, used in case of event type `inbound` | [optional] [default to null] +**Batched** | **bool** | To send batched webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateWhatsAppCampaign.md b/docs/UpdateWhatsAppCampaign.md new file mode 100644 index 0000000..69efe92 --- /dev/null +++ b/docs/UpdateWhatsAppCampaign.md @@ -0,0 +1,13 @@ +# UpdateWhatsAppCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignName** | **string** | Name of the campaign | [optional] [default to null] +**CampaignStatus** | **string** | Status of the campaign | [optional] [default to null] +**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] [default to null] +**Recipients** | [***CreateWhatsAppCampaignRecipients**](createWhatsAppCampaign_recipients.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..0b8d03c --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,171 @@ +# \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** +> Inviteuser EditUserPermission(ctx, 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **updatePermissions** | [**Inviteuser**](Inviteuser.md)| Values to update permissions for an invited user | + +### Return type + +[**Inviteuser**](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** +> GetInvitedUsersList GetInvitedUsersList(ctx, ) +Get the list of all your users + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetInvitedUsersList**](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** +> GetUserPermission GetUserPermission(ctx, email) +Check user permission + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **email** | **string**| Email of the invited user. | + +### Return type + +[**GetUserPermission**](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** +> Inviteuser Inviteuser(ctx, 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sendInvitation** | [**Inviteuser**](Inviteuser.md)| Values to create an invitation | + +### Return type + +[**Inviteuser**](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** +> PutRevokeUserPermission PutRevokeUserPermission(ctx, email) +Revoke user permission + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **email** | **string**| Email of the invited user. | + +### Return type + +[**PutRevokeUserPermission**](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** +> Putresendcancelinvitation Putresendcancelinvitation(ctx, action, email) +Resend / Cancel invitation + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **action** | **string**| action | + **email** | **string**| Email of the invited user. | + +### Return type + +[**Putresendcancelinvitation**](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/docs/WebhooksApi.md b/docs/WebhooksApi.md index ed4b199..46b3b67 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -6,7 +6,7 @@ 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 transactional events +[**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 @@ -25,7 +25,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -66,9 +66,9 @@ Name | Type | Description | Notes # **ExportWebhooksHistory** > CreatedProcessId ExportWebhooksHistory(ctx, exportWebhookHistory) -Export all transactional events +Export all webhook events -This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download that CSV file will send to the webhook link provided in notifyURL of the body payload. +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. ### Required Parameters @@ -79,7 +79,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](CreatedProcessId.md) +[**CreatedProcessId**](createdProcessId.md) ### Authorization @@ -105,7 +105,7 @@ Name | Type | Description | Notes ### Return type -[**GetWebhook**](GetWebhook.md) +[**GetWebhook**](getWebhook.md) ### Authorization @@ -139,7 +139,7 @@ Name | Type | Description | Notes ### Return type -[**GetWebhooks**](GetWebhooks.md) +[**GetWebhooks**](getWebhooks.md) ### Authorization diff --git a/docs/WhatsAppCampaignsApi.md b/docs/WhatsAppCampaignsApi.md index 315751a..cfa75e3 100644 --- a/docs/WhatsAppCampaignsApi.md +++ b/docs/WhatsAppCampaignsApi.md @@ -11,6 +11,8 @@ Method | HTTP request | Description [**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** @@ -26,7 +28,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -52,7 +54,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](CreateModel.md) +[**CreateModel**](createModel.md) ### Authorization @@ -104,7 +106,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappCampaignOverview**](GetWhatsappCampaignOverview.md) +[**GetWhatsappCampaignOverview**](getWhatsappCampaignOverview.md) ### Authorization @@ -141,7 +143,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappCampaigns**](GetWhatsappCampaigns.md) +[**GetWhatsappCampaigns**](getWhatsappCampaigns.md) ### Authorization @@ -163,7 +165,7 @@ This endpoint does not need any parameter. ### Return type -[**GetWhatsAppConfig**](GetWhatsAppConfig.md) +[**GetWhatsAppConfig**](getWhatsAppConfig.md) ### Authorization @@ -192,15 +194,77 @@ Optional parameters are passed through a pointer to a GetWhatsAppTemplatesOpts s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **startDate** | **optional.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** | **optional.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** | + **startDate** | **optional.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** | **optional.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** | **optional.Int64**| Number of documents per page | [default to 50] **offset** | **optional.Int64**| Index of the first document in the page | [default to 0] **sort** | **optional.String**| Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed | [default to desc] + **source** | **optional.String**| source of the template | ### Return type -[**GetWaTemplates**](GetWATemplates.md) +[**GetWaTemplates**](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(ctx, templateId) +Send your WhatsApp template for approval + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **templateId** | **int64**| id of the campaign | + +### Return type + + (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(ctx, campaignId, optional) +Update a WhatsApp campaign + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **campaignId** | **int64**| Id of the campaign | + **optional** | ***UpdateWhatsAppCampaignOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a UpdateWhatsAppCampaignOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **whatsAppCampaign** | [**optional.Interface of UpdateWhatsAppCampaign**](UpdateWhatsAppCampaign.md)| values to update WhatsApp Campaign | + +### Return type + + (empty response body) ### Authorization diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/go.mod b/go.mod index 12ca590..da9544e 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,9 @@ -module github.com/getbrevo/brevo-go +module lib -go 1.17 +go 1.22.3 require ( github.com/antihax/optional v1.0.0 - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb -) - -require ( - github.com/golang/protobuf v1.4.2 // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/protobuf v1.25.0 // indirect + github.com/getbrevo/brevo-go v1.0.3 + golang.org/x/oauth2 v0.21.0 ) diff --git a/go.sum b/go.sum index 952c702..d5b40b3 100644 --- a/go.sum +++ b/go.sum @@ -1,369 +1,8 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +github.com/getbrevo/brevo-go v1.0.3 h1:N1jnMil8Ol1+bSgxjWiCv9vp2waligj4GdYxK4E2t94= +github.com/getbrevo/brevo-go v1.0.3/go.mod h1:2TBMEnaDqq/oiAXUYtn6eykiEdHcEoS7tc63+YoFibw= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= diff --git a/lib/api_account.go b/lib/api_account.go index 5c3e095..15ab5a8 100644 --- a/lib/api_account.go +++ b/lib/api_account.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" @@ -16,7 +16,6 @@ import ( "net/http" "net/url" "strings" - "github.com/antihax/optional" ) @@ -27,18 +26,18 @@ var ( type AccountApiService service -/* +/* AccountApiService Get your account information, plan and credits details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetAccount */ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAccount ) @@ -76,7 +75,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -89,7 +88,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,36 +109,36 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAccount - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* AccountApiService Get user activity logs * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetAccountActivityOpts - Optional Parameters: @@ -151,19 +150,19 @@ AccountApiService Get user activity logs @return GetAccountActivity */ -type GetAccountActivityOpts struct { +type GetAccountActivityOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAccountActivity ) @@ -213,7 +212,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -226,7 +225,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -247,40 +246,40 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAccountActivity - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_companies.go b/lib/api_companies.go index b71fad8..d61cebd 100644 --- a/lib/api_companies.go +++ b/lib/api_companies.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,18 +27,18 @@ var ( type CompaniesApiService service -/* +/* CompaniesApiService Get company attributes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return CompanyAttributes */ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (CompanyAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CompanyAttributes ) @@ -77,7 +76,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +89,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,36 +110,36 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CompanyAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Get all companies * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CompaniesGetOpts - Optional Parameters: @@ -155,22 +154,22 @@ CompaniesApiService Get all companies @return CompaniesList */ -type CompaniesGetOpts struct { - Filters optional.String +type CompaniesGetOpts struct { + Filters optional.String LinkedContactsIds optional.Int64 - LinkedDealsIds optional.String - Page optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + LinkedDealsIds optional.String + Page optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptionals *CompaniesGetOpts) (CompaniesList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CompaniesList ) @@ -229,7 +228,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -242,7 +241,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -263,50 +262,52 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CompaniesList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Delete a company - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + */ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -314,6 +315,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -351,7 +353,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -364,7 +366,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -383,53 +385,54 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* CompaniesApiService Get a company - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id @return Company */ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Company, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Company ) @@ -468,7 +471,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -481,7 +484,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -502,71 +505,71 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Company - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Update a company - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id - - @param body Updated company details. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated company details. @return Company */ -func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body1) (Company, *http.Response, error) { +func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body6) (Company, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Company ) @@ -607,7 +610,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -620,7 +623,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -641,69 +644,72 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Company - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Link and Unlink company with contacts and deals - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id - - @param body Linked / Unlinked contacts and deals ids. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Linked / Unlinked contacts and deals ids. + + */ -func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body2) (*http.Response, error) { +func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body7) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -743,7 +749,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -756,7 +762,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -775,43 +781,44 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* CompaniesApiService Create a company - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Company create data. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Company create data. -@return InlineResponse200 +@return InlineResponse2002 */ -func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body) (InlineResponse200, *http.Response, error) { +func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (InlineResponse2002, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse200 + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2002 ) // create path and map variables @@ -850,7 +857,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body) (Inl key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -863,7 +870,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body) (Inl key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -884,29 +891,29 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body) (Inl if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v InlineResponse200 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2002 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_contacts.go b/lib/api_contacts.go index a69abc1..beb5840 100644 --- a/lib/api_contacts.go +++ b/lib/api_contacts.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,20 +27,20 @@ var ( type ContactsApiService service -/* +/* ContactsApiService Add existing contacts to a list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param listId Id of the list - - @param contactEmails Emails addresses OR IDs of the contacts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts @return PostContactInfo */ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -82,7 +81,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -95,7 +94,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -116,63 +115,65 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create contact attribute - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param attributeCategory Category of the attribute - - @param attributeName Name of the attribute - - @param createAttribute Values to create an attribute + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param attributeCategory Category of the attribute + * @param attributeName Name of the attribute + * @param createAttribute Values to create an attribute + + */ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error) { var ( @@ -180,6 +181,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -220,7 +222,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -233,7 +235,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -252,43 +254,43 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Create a contact - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createContact Values to create a contact + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createContact Values to create a contact @return CreateUpdateContactModel */ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact CreateContact) (CreateUpdateContactModel, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateContactModel ) @@ -328,7 +330,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -341,7 +343,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -362,50 +364,52 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateContactModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create Contact via DOI (Double-Opt-In) Flow - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createDoiContact Values to create the Double opt-in (DOI) contact + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createDoiContact Values to create the Double opt-in (DOI) contact + + */ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiContact CreateDoiContact) (*http.Response, error) { var ( @@ -413,6 +417,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -451,7 +456,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -464,7 +469,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -483,42 +488,43 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Create a folder - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createFolder Name of the folder + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createFolder Name of the folder @return CreateModel */ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -558,7 +564,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -571,7 +577,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -592,59 +598,59 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create a list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createList Values to create a list + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createList Values to create a list @return CreateModel */ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -684,7 +690,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -697,7 +703,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -718,51 +724,53 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Delete an attribute - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param attributeCategory Category of the attribute - - @param attributeName Name of the existing attribute + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param attributeCategory Category of the attribute + * @param attributeName Name of the existing attribute + + */ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error) { var ( @@ -770,6 +778,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -808,7 +817,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -821,7 +830,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -840,44 +849,47 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a contact - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param identifier Email (urlencoded) OR ID of the contact + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param identifier Email (urlencoded) OR ID of the contact + + */ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -885,6 +897,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -922,7 +935,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -935,7 +948,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -954,55 +967,58 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a folder (and all its lists) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param folderId Id of the folder + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param folderId Id of the folder + + */ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error) { var ( @@ -1010,6 +1026,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1047,7 +1064,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1060,7 +1077,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1079,44 +1096,47 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param listId Id of the list + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param listId Id of the list + + */ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error) { var ( @@ -1124,6 +1144,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1161,7 +1182,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1174,7 +1195,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1193,52 +1214,53 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService List all attributes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetAttributes */ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAttributes ) @@ -1276,7 +1298,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1289,7 +1311,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1310,58 +1332,58 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value * @param optional nil or *GetContactInfoOpts - Optional Parameters: - * @param "StartDate" (optional.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 - * @param "EndDate" (optional.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. + * @param "StartDate" (optional.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 + * @param "EndDate" (optional.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. @return GetExtendedContactDetails */ -type GetContactInfoOpts struct { +type GetContactInfoOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string, localVarOptionals *GetContactInfoOpts) (GetExtendedContactDetails, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedContactDetails ) @@ -1406,7 +1428,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1419,7 +1441,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1440,58 +1462,58 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedContactDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get email campaigns' statistics for a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact @@ -1502,17 +1524,17 @@ ContactsApiService Get email campaigns' statistics for a contact @return GetContactCampaignStats */ -type GetContactStatsOpts struct { +type GetContactStatsOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *GetContactStatsOpts) (GetContactCampaignStats, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContactCampaignStats ) @@ -1557,7 +1579,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1570,7 +1592,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1591,58 +1613,58 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContactCampaignStats - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetContactsOpts - Optional Parameters: @@ -1651,24 +1673,30 @@ ContactsApiService Get all the contacts * @param "ModifiedSince" (optional.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. * @param "CreatedSince" (optional.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. * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "SegmentId" (optional.Int64) - Id of the segment. **Either listIds or segmentId can be passed.** + * @param "ListIds" (optional.Interface of []int64) - Ids of the list. **Either listIds or segmentId can be passed.** + * @param "Filter" (optional.String) - Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** @return GetContacts */ -type GetContactsOpts struct { - Limit optional.Int64 - Offset optional.Int64 +type GetContactsOpts struct { + Limit optional.Int64 + Offset optional.Int64 ModifiedSince optional.String - CreatedSince optional.String - Sort optional.String + CreatedSince optional.String + Sort optional.String + SegmentId optional.Int64 + ListIds optional.Interface + Filter optional.String } func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *GetContactsOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1694,6 +1722,15 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.SegmentId.IsSet() { + localVarQueryParams.Add("segmentId", parameterToString(localVarOptionals.SegmentId.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ListIds.IsSet() { + localVarQueryParams.Add("listIds", parameterToString(localVarOptionals.ListIds.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Filter.IsSet() { + localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1721,7 +1758,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1734,7 +1771,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1755,47 +1792,47 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get contacts in a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list @@ -1808,19 +1845,19 @@ ContactsApiService Get contacts in a list @return GetContacts */ -type GetContactsFromListOpts struct { +type GetContactsFromListOpts struct { ModifiedSince optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1871,7 +1908,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1884,7 +1921,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1905,70 +1942,70 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Returns a folder's details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param folderId id of the folder + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param folderId id of the folder @return GetFolder */ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolder ) @@ -2007,7 +2044,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2020,7 +2057,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2041,58 +2078,58 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolder - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get lists in a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder @@ -2104,18 +2141,18 @@ ContactsApiService Get lists in a folder @return GetFolderLists */ -type GetFolderListsOpts struct { - Limit optional.Int64 +type GetFolderListsOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolderLists ) @@ -2163,7 +2200,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2176,7 +2213,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2197,58 +2234,58 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolderLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all folders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page @@ -2259,16 +2296,16 @@ ContactsApiService Get all folders @return GetFolders */ -type GetFoldersOpts struct { +type GetFoldersOpts struct { Sort optional.String } func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolders ) @@ -2317,7 +2354,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2330,7 +2367,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2351,59 +2388,68 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolders - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get a list's details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param listId Id of the list + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param listId Id of the list + * @param optional nil or *GetListOpts - Optional Parameters: + * @param "StartDate" (optional.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 + * @param "EndDate" (optional.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 @return GetExtendedList */ -func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExtendedList, *http.Response, error) { + +type GetListOpts struct { + StartDate optional.String + EndDate optional.String +} + +func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVarOptionals *GetListOpts) (GetExtendedList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedList ) @@ -2415,6 +2461,12 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -2442,7 +2494,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2455,7 +2507,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2476,58 +2528,58 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the lists * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetListsOpts - Optional Parameters: @@ -2538,18 +2590,18 @@ ContactsApiService Get all the lists @return GetLists */ -type GetListsOpts struct { - Limit optional.Int64 +type GetListsOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetLists ) @@ -2596,7 +2648,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2609,7 +2661,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2630,47 +2682,47 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the Segments * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page @@ -2681,16 +2733,16 @@ ContactsApiService Get all the Segments @return GetSegments */ -type GetSegmentsOpts struct { +type GetSegmentsOpts struct { Sort optional.String } func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offset int64, localVarOptionals *GetSegmentsOpts) (GetSegments, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSegments ) @@ -2739,7 +2791,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2752,7 +2804,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2773,60 +2825,60 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSegments - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Import contacts -It returns the background process ID which on completion calls the notify URL that you have set in the input. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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`` +It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param 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`` @return CreatedProcessId */ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactImport RequestContactImport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -2866,7 +2918,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2879,7 +2931,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2900,60 +2952,60 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a contact from a list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param listId Id of the list - - @param contactEmails Emails addresses OR IDs of the contacts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts @return PostContactInfo */ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -2994,7 +3046,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3007,7 +3059,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3028,71 +3080,71 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService 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. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param requestContactExport Values to request a contact export + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param requestContactExport Values to request a contact export @return CreatedProcessId */ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestContactExport RequestContactExport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -3132,7 +3184,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3145,7 +3197,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3166,52 +3218,54 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Update contact attribute - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param attributeCategory Category of the attribute - - @param attributeName Name of the existing attribute - - @param updateAttribute Values to update an attribute + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param attributeCategory Category of the attribute + * @param attributeName Name of the existing attribute + * @param updateAttribute Values to update an attribute + + */ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error) { var ( @@ -3219,6 +3273,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -3259,7 +3314,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3272,7 +3327,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3291,44 +3346,47 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update multiple contacts - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param updateBatchContacts Values to update multiple contacts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param updateBatchContacts Values to update multiple contacts + + */ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatchContacts UpdateBatchContacts) (*http.Response, error) { var ( @@ -3336,6 +3394,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -3374,7 +3433,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3387,7 +3446,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3406,34 +3465,37 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a contact - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param identifier Email (urlencoded) OR ID of the contact - - @param updateContact Values to update a contact + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param identifier Email (urlencoded) OR ID of the contact + * @param updateContact Values to update a contact + + */ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier string, updateContact UpdateContact) (*http.Response, error) { var ( @@ -3441,6 +3503,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -3480,7 +3543,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3493,7 +3556,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3512,45 +3575,48 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a folder - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param folderId Id of the folder - - @param updateFolder Name of the folder + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param folderId Id of the folder + * @param updateFolder Name of the folder + + */ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error) { var ( @@ -3558,6 +3624,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -3597,7 +3664,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3610,7 +3677,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3629,45 +3696,48 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param listId Id of the list - - @param updateList Values to update a list + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param listId Id of the list + * @param updateList Values to update a list + + */ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error) { var ( @@ -3675,6 +3745,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -3714,7 +3785,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3727,7 +3798,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3746,34 +3817,35 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_conversations.go b/lib/api_conversations.go index 4fd8b02..d1396f1 100644 --- a/lib/api_conversations.go +++ b/lib/api_conversations.go @@ -1,24 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/antihax/optional" + "fmt" ) // Linger please @@ -28,18 +26,21 @@ var ( type ConversationsApiService service -/* +/* ConversationsApiService Sets agent’s status to online for 2-3 minutes We recommend pinging this endpoint every minute for as long as the agent has to be considered online. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Agent fields. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Agent fields. + + */ -func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.Context, body Body12) (*http.Response, error) { +func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.Context, body Body17) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -78,7 +79,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +92,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,34 +111,37 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Delete a message sent by an agent Only agents’ messages can be deleted. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id ID of the message + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the message + + */ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -145,6 +149,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -182,7 +187,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -195,7 +200,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -214,53 +219,54 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Get a message - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id ID of the message + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the message @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -299,7 +305,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -312,7 +318,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -333,78 +339,78 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Update a message sent by an agent Only agents’ messages can be edited. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param id ID of the message * @param optional nil or *ConversationsMessagesIdPutOpts - Optional Parameters: - * @param "Body" (optional.Interface of Body9) - + * @param "Body" (optional.Interface of Body14) - @return ConversationsMessage */ -type ConversationsMessagesIdPutOpts struct { +type ConversationsMessagesIdPutOpts struct { Body optional.Interface } func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context, id string, localVarOptionals *ConversationsMessagesIdPutOpts) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -435,10 +441,10 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context } // body params if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(Body9) + + localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(Body14) if !localVarOptionalBodyok { - return localVarReturnValue, nil, reportError("body should be Body9") + return localVarReturnValue, nil, reportError("body should be Body14") } localVarPostBody = &localVarOptionalBody } @@ -452,7 +458,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -465,7 +471,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -486,70 +492,70 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Send a message as an agent - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Message fields. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Message fields. @return ConversationsMessage */ -func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, body Body8) (ConversationsMessage, *http.Response, error) { +func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, body Body13) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -589,7 +595,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -602,7 +608,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -623,50 +629,52 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Delete an automated message - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id ID of the message + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the message + + */ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -674,6 +682,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -711,7 +720,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -724,7 +733,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -743,53 +752,54 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Get an automated message - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id ID of the message sent previously + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the message sent previously @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -828,7 +838,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -841,7 +851,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -862,71 +872,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Update an automated message - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id ID of the message - - @param body + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the message + * @param body @return ConversationsMessage */ -func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.Context, id string, body Body11) (ConversationsMessage, *http.Response, error) { +func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.Context, id string, body Body16) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -967,7 +977,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -980,7 +990,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1001,71 +1011,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Send an automated message to a visitor Example of automated messages: order status, announce new features in your web app, etc. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body @return ConversationsMessage */ -func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Context, body Body10) (ConversationsMessage, *http.Response, error) { +func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Context, body Body15) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -1105,7 +1115,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1118,7 +1128,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1139,40 +1149,40 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_coupons.go b/lib/api_coupons.go new file mode 100644 index 0000000..473c7d2 --- /dev/null +++ b/lib/api_coupons.go @@ -0,0 +1,764 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type CouponsApiService service + +/* +CouponsApiService Create а coupon collection + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createCouponCollection Values to create a coupon collection + +@return InlineResponse2013 +*/ +func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCouponCollection CreateCouponCollection) (InlineResponse2013, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2013 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/couponCollections" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createCouponCollection + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v InlineResponse2013 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CouponsApiService Create coupons for a coupon collection + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createCoupons Values to create coupons + + +*/ +func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons CreateCoupons) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/coupons" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createCoupons + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CouponsApiService Get a coupon collection by id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the collection to return + +@return GetCouponCollection +*/ +func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) (GetCouponCollection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCouponCollection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/couponCollections/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCouponCollection + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CouponsApiService Get all your coupon collections + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetCouponCollectionsOpts - Optional Parameters: + * @param "Limit" (optional.Int64) - Number of documents returned per page + * @param "Offset" (optional.Int64) - Index of the first document on the page + * @param "Sort" (optional.String) - Sort the results by creation time in ascending/descending order + * @param "SortBy" (optional.String) - The field used to sort coupon collections + +@return GetCouponCollection +*/ + +type GetCouponCollectionsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + SortBy optional.String +} + +func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOptionals *GetCouponCollectionsOpts) (GetCouponCollection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCouponCollection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/couponCollections" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortBy.IsSet() { + localVarQueryParams.Add("sortBy", parameterToString(localVarOptionals.SortBy.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCouponCollection + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CouponsApiService Update a coupon collection by id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the collection to update + * @param optional nil or *UpdateCouponCollectionOpts - Optional Parameters: + * @param "UpdateCouponCollection" (optional.Interface of UpdateCouponCollection) - Values to update the coupon collection + +@return InlineResponse2008 +*/ + +type UpdateCouponCollectionOpts struct { + UpdateCouponCollection optional.Interface +} + +func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id string, localVarOptionals *UpdateCouponCollectionOpts) (InlineResponse2008, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2008 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/couponCollections/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.UpdateCouponCollection.IsSet() { + + localVarOptionalUpdateCouponCollection, localVarOptionalUpdateCouponCollectionok := localVarOptionals.UpdateCouponCollection.Value().(UpdateCouponCollection) + if !localVarOptionalUpdateCouponCollectionok { + return localVarReturnValue, nil, reportError("updateCouponCollection should be UpdateCouponCollection") + } + localVarPostBody = &localVarOptionalUpdateCouponCollection + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2008 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_deals.go b/lib/api_deals.go index e4fd2e2..332caa9 100644 --- a/lib/api_deals.go +++ b/lib/api_deals.go @@ -1,24 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" + "os" ) // Linger please @@ -28,18 +28,18 @@ var ( type DealsApiService service -/* +/* DealsApiService Get deal attributes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return DealAttributes */ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue DealAttributes ) @@ -77,7 +77,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +90,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,40 +111,40 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v DealAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get all deals * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmDealsGetOpts - Optional Parameters: - * @param "FiltersAttributes" (optional.String) - Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + * @param "FiltersAttributesDealName" (optional.String) - Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. * @param "FiltersLinkedCompaniesIds" (optional.String) - Filter by linked companies ids * @param "FiltersLinkedContactsIds" (optional.String) - Filter by linked companies ids * @param "Offset" (optional.Int64) - Index of the first document of the page @@ -155,22 +155,22 @@ DealsApiService Get all deals @return DealsList */ -type CrmDealsGetOpts struct { - FiltersAttributes optional.String +type CrmDealsGetOpts struct { + FiltersAttributesDealName optional.String FiltersLinkedCompaniesIds optional.String - FiltersLinkedContactsIds optional.String - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + FiltersLinkedContactsIds optional.String + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *CrmDealsGetOpts) (DealsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue DealsList ) @@ -181,8 +181,8 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if localVarOptionals != nil && localVarOptionals.FiltersAttributes.IsSet() { - localVarQueryParams.Add("filters[attributes]", parameterToString(localVarOptionals.FiltersAttributes.Value(), "")) + if localVarOptionals != nil && localVarOptionals.FiltersAttributesDealName.IsSet() { + localVarQueryParams.Add("filters[attributes.deal_name]", parameterToString(localVarOptionals.FiltersAttributesDealName.Value(), "")) } if localVarOptionals != nil && localVarOptionals.FiltersLinkedCompaniesIds.IsSet() { localVarQueryParams.Add("filters[linkedCompaniesIds]", parameterToString(localVarOptionals.FiltersLinkedCompaniesIds.Value(), "")) @@ -229,7 +229,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -242,7 +242,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -263,50 +263,52 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v DealsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Delete a deal - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + */ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -314,6 +316,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -351,7 +354,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -364,7 +367,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -383,53 +386,54 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DealsApiService Get a deal - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id @return Deal */ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Deal ) @@ -468,7 +472,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -481,7 +485,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -502,69 +506,72 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Deal - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Update a deal - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id - - @param body Updated deal details. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated deal details. + + */ -func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body4) (*http.Response, error) { +func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body9) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -604,7 +611,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -617,7 +624,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -636,52 +643,190 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* +DealsApiService Import deals(creation and updation) +Import deals from a CSV file with mapping options. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name + * @param mapping The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank } + +@return InlineResponse2003 +*/ +func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, mapping string) (InlineResponse2003, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2003 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals/import" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + var localVarFile *os.File + if localVarFile != nil { + fbs, _ := ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + localVarFormParams.Add("mapping", parameterToString(mapping, "")) + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2003 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* DealsApiService Link and Unlink a deal with contacts and companies - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id - - @param body Linked / Unlinked contacts and companies ids. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Linked / Unlinked contacts and companies ids. + + */ -func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id string, body Body5) (*http.Response, error) { +func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id string, body Body10) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -721,7 +866,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -734,7 +879,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -753,43 +898,44 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DealsApiService Create a deal - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Deal create data. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Deal create data. -@return InlineResponse201 +@return InlineResponse2011 */ -func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body3) (InlineResponse201, *http.Response, error) { +func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineResponse2011, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse201 + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2011 ) // create path and map variables @@ -828,7 +974,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body3) (InlineR key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -841,7 +987,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body3) (InlineR key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -862,47 +1008,171 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body3) (InlineR if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { - var v InlineResponse201 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2011 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Get all pipelines + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return Pipelines +*/ +func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelines, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Pipelines + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/pipeline/details/all" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err } + } + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Pipelines + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get pipeline stages - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return Pipeline */ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Pipeline ) @@ -940,7 +1210,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -953,7 +1223,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -974,29 +1244,154 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Pipeline - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Get a pipeline + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param pipelineID + +@return Pipelines +*/ +func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, pipelineID string) (Pipelines, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Pipelines + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/pipeline/details/{pipelineID}" + localVarPath = strings.Replace(localVarPath, "{"+"pipelineID"+"}", fmt.Sprintf("%v", pipelineID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err } + } + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Pipelines + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_domains.go b/lib/api_domains.go index 8c13f73..dbe3f0a 100644 --- a/lib/api_domains.go +++ b/lib/api_domains.go @@ -1,24 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/antihax/optional" + "fmt" ) // Linger please @@ -28,19 +26,19 @@ var ( type DomainsApiService service -/* +/* DomainsApiService Authenticate a domain - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param domainName Domain name + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param domainName Domain name @return AuthenticateDomainModel */ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName string) (AuthenticateDomainModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue AuthenticateDomainModel ) @@ -79,7 +77,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +90,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,58 +111,58 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v AuthenticateDomainModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Create a new domain * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateDomainOpts - Optional Parameters: @@ -173,16 +171,16 @@ DomainsApiService Create a new domain @return CreateDomainModel */ -type CreateDomainOpts struct { +type CreateDomainOpts struct { DomainName optional.Interface } func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals *CreateDomainOpts) (CreateDomainModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateDomainModel ) @@ -212,10 +210,10 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals } // body params if localVarOptionals != nil && localVarOptionals.DomainName.IsSet() { - + localVarOptionalDomainName, localVarOptionalDomainNameok := localVarOptionals.DomainName.Value().(CreateDomain) if !localVarOptionalDomainNameok { - return localVarReturnValue, nil, reportError("domainName should be CreateDomain") + return localVarReturnValue, nil, reportError("domainName should be CreateDomain") } localVarPostBody = &localVarOptionalDomainName } @@ -229,7 +227,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -242,7 +240,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -263,50 +261,52 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CreateDomainModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Delete a domain - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param domainName Domain name + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param domainName Domain name + + */ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) (*http.Response, error) { var ( @@ -314,6 +314,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -351,7 +352,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -364,7 +365,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -383,54 +384,55 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DomainsApiService Validate domain configuration - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param domainName Domain name + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param domainName Domain name -@return GetDomainonfigurationModel +@return GetDomainConfigurationModel */ -func (a *DomainsApiService) GetDomainonfiguration(ctx context.Context, domainName string) (GetDomainonfigurationModel, *http.Response, error) { +func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainName string) (GetDomainConfigurationModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetDomainonfigurationModel + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetDomainConfigurationModel ) // create path and map variables @@ -468,7 +470,7 @@ func (a *DomainsApiService) GetDomainonfiguration(ctx context.Context, domainNam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -481,7 +483,7 @@ func (a *DomainsApiService) GetDomainonfiguration(ctx context.Context, domainNam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -502,69 +504,69 @@ func (a *DomainsApiService) GetDomainonfiguration(ctx context.Context, domainNam if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetDomainonfigurationModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v GetDomainConfigurationModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Get the list of all your domains - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetDomainsList */ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetDomainsList ) @@ -602,7 +604,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -615,7 +617,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -636,40 +638,40 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetDomainsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_ecommerce.go b/lib/api_ecommerce.go index 52b8f08..f0a410f 100644 --- a/lib/api_ecommerce.go +++ b/lib/api_ecommerce.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,11 +27,13 @@ var ( type EcommerceApiService service -/* +/* EcommerceApiService Create orders in batch Create multiple orders at one time instead of one order at a time - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param orderBatch + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orderBatch + + */ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch OrderBatch) (*http.Response, error) { var ( @@ -40,6 +41,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -78,7 +80,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +93,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,34 +112,37 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EcommerceApiService Managing the status of the order Manages the transactional status of the order - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param order + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param order + + */ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*http.Response, error) { var ( @@ -145,6 +150,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -183,7 +189,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -196,7 +202,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -215,42 +221,43 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EcommerceApiService Create categories in batch - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createUpdateBatchCategory Values to create a batch of categories + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createUpdateBatchCategory Values to create a batch of categories @return CreateUpdateBatchCategoryModel */ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, createUpdateBatchCategory CreateUpdateBatchCategory) (CreateUpdateBatchCategoryModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateBatchCategoryModel ) @@ -290,7 +297,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -303,7 +310,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -324,59 +331,59 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateBatchCategoryModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create products in batch - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createUpdateBatchProducts Values to create a batch of products + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createUpdateBatchProducts Values to create a batch of products @return CreateUpdateBatchProductsModel */ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, createUpdateBatchProducts CreateUpdateBatchProducts) (CreateUpdateBatchProductsModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateBatchProductsModel ) @@ -416,7 +423,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -429,7 +436,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -450,59 +457,59 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateBatchProductsModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create/Update a category - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createUpdateCategory Values to create/update a category + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createUpdateCategory Values to create/update a category @return CreateCategoryModel */ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUpdateCategory CreateUpdateCategory) (CreateCategoryModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateCategoryModel ) @@ -542,7 +549,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -555,7 +562,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -576,59 +583,59 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateCategoryModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create/Update a product - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createUpdateProduct Values to create/update a product + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createUpdateProduct Values to create/update a product @return CreateProductModel */ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpdateProduct CreateUpdateProduct) (CreateProductModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateProductModel ) @@ -668,7 +675,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -681,7 +688,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -702,50 +709,52 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateProductModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Activate the eCommerce app Getting access to Brevo eCommerce. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + + */ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.Response, error) { var ( @@ -753,6 +762,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -789,7 +799,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -802,7 +812,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -821,92 +831,67 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* -EcommerceApiService Return all your categories +/* +EcommerceApiService Get detailed attribution metrics for a single Brevo campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *GetCategoriesOpts - Optional Parameters: - * @param "Limit" (optional.Int64) - Number of documents per page - * @param "Offset" (optional.Int64) - Index of the first document in the page - * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param "Ids" (optional.Interface of []string) - Filter by category ids - * @param "Name" (optional.String) - Filter by category name + * @param conversionSource The Brevo campaign type for which data will be retrieved + * @param conversionSourceId The Brevo campaign id for which data will be retrieved -@return GetCategories +@return InlineResponse2006 */ - -type GetCategoriesOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String - Ids optional.Interface - Name optional.String -} - -func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptionals *GetCategoriesOpts) (GetCategories, *http.Response, error) { +func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2006, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetCategories + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2006 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/categories" + localVarPath := a.client.cfg.BasePath + "/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}" + localVarPath = strings.Replace(localVarPath, "{"+"conversionSource"+"}", fmt.Sprintf("%v", conversionSource), -1) + localVarPath = strings.Replace(localVarPath, "{"+"conversionSourceId"+"}", fmt.Sprintf("%v", conversionSourceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { - localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { - localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Ids.IsSet() { - localVarQueryParams.Add("ids", parameterToString(localVarOptionals.Ids.Value(), "csv")) - } - if localVarOptionals != nil && localVarOptionals.Name.IsSet() { - localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) - } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -934,7 +919,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -947,7 +932,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -968,70 +953,88 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetCategories - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2006 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -EcommerceApiService Get a category details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Category ID +/* +EcommerceApiService Get attribution metrics for one or more Brevo campaigns + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *EcommerceAttributionMetricsGetOpts - Optional Parameters: + * @param "PeriodFrom" (optional.Time) - When getting metrics for a specific period, define the starting datetime in RFC3339 format + * @param "PeriodTo" (optional.Time) - When getting metrics for a specific period, define the end datetime in RFC3339 format + * @param "EmailCampaignId" (optional.Interface of []float32) - The email campaign id(s) to get metrics for -@return GetCategoryDetails +@return InlineResponse2005 */ -func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (GetCategoryDetails, *http.Response, error) { + +type EcommerceAttributionMetricsGetOpts struct { + PeriodFrom optional.Time + PeriodTo optional.Time + EmailCampaignId optional.Interface +} + +func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context, localVarOptionals *EcommerceAttributionMetricsGetOpts) (InlineResponse2005, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetCategoryDetails + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2005 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/categories/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/ecommerce/attribution/metrics" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.PeriodFrom.IsSet() { + localVarQueryParams.Add("periodFrom", parameterToString(localVarOptionals.PeriodFrom.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PeriodTo.IsSet() { + localVarQueryParams.Add("periodTo", parameterToString(localVarOptionals.PeriodTo.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EmailCampaignId.IsSet() { + localVarQueryParams.Add("emailCampaignId[]", parameterToString(localVarOptionals.EmailCampaignId.Value(), "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1059,7 +1062,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1072,7 +1075,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1093,76 +1096,67 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetCategoryDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2005 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 404 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -EcommerceApiService Get a product's details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Product ID +/* +EcommerceApiService Get attributed product sales for a single Brevo campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param conversionSource The Brevo campaign type for which data will be retrieved + * @param conversionSourceId The Brevo campaign id for which data will be retrieved -@return GetProductDetails +@return InlineResponse2007 */ -func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (GetProductDetails, *http.Response, error) { +func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2007, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetProductDetails + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2007 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/products/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}" + localVarPath = strings.Replace(localVarPath, "{"+"conversionSource"+"}", fmt.Sprintf("%v", conversionSource), -1) + localVarPath = strings.Replace(localVarPath, "{"+"conversionSourceId"+"}", fmt.Sprintf("%v", conversionSourceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1195,7 +1189,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1208,7 +1202,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1229,144 +1223,68 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetProductDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2007 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 404 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -EcommerceApiService Return all your products +/* +EcommerceApiService Get the ISO 4217 compliant display currency code for your Brevo account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *GetProductsOpts - Optional Parameters: - * @param "Limit" (optional.Int64) - Number of documents per page - * @param "Offset" (optional.Int64) - Index of the first document in the page - * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param "Ids" (optional.Interface of []string) - Filter by product ids - * @param "Name" (optional.String) - Filter by product name, minimum 3 characters should be present for search - * @param "PriceLte" (optional.Float32) - Price filter for products less than and equals to particular amount - * @param "PriceGte" (optional.Float32) - Price filter for products greater than and equals to particular amount - * @param "PriceLt" (optional.Float32) - Price filter for products less than particular amount - * @param "PriceGt" (optional.Float32) - Price filter for products greater than particular amount - * @param "PriceEq" (optional.Float32) - Price filter for products equals to particular amount - * @param "PriceNe" (optional.Float32) - Price filter for products not equals to particular amount - * @param "Categories" (optional.Interface of []string) - Filter by category ids -@return GetProducts +@return InlineResponse2004 */ - -type GetProductsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String - Ids optional.Interface - Name optional.String - PriceLte optional.Float32 - PriceGte optional.Float32 - PriceLt optional.Float32 - PriceGt optional.Float32 - PriceEq optional.Float32 - PriceNe optional.Float32 - Categories optional.Interface -} - -func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals *GetProductsOpts) (GetProducts, *http.Response, error) { +func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Context) (InlineResponse2004, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetProducts + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2004 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/products" + localVarPath := a.client.cfg.BasePath + "/ecommerce/config/displayCurrency" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { - localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { - localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Ids.IsSet() { - localVarQueryParams.Add("ids", parameterToString(localVarOptionals.Ids.Value(), "csv")) - } - if localVarOptionals != nil && localVarOptionals.Name.IsSet() { - localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceLte.IsSet() { - localVarQueryParams.Add("price[lte]", parameterToString(localVarOptionals.PriceLte.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceGte.IsSet() { - localVarQueryParams.Add("price[gte]", parameterToString(localVarOptionals.PriceGte.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceLt.IsSet() { - localVarQueryParams.Add("price[lt]", parameterToString(localVarOptionals.PriceLt.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceGt.IsSet() { - localVarQueryParams.Add("price[gt]", parameterToString(localVarOptionals.PriceGt.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceEq.IsSet() { - localVarQueryParams.Add("price[eq]", parameterToString(localVarOptionals.PriceEq.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.PriceNe.IsSet() { - localVarQueryParams.Add("price[ne]", parameterToString(localVarOptionals.PriceNe.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Categories.IsSet() { - localVarQueryParams.Add("categories", parameterToString(localVarOptionals.Categories.Value(), "csv")) - } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -1394,7 +1312,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1407,7 +1325,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1428,40 +1346,1008 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetProducts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2004 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Return all your categories + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetCategoriesOpts - Optional Parameters: + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Offset" (optional.Int64) - Index of the first document in the page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "Ids" (optional.Interface of []string) - Filter by category ids + * @param "Name" (optional.String) - Filter by category name + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** + +@return GetCategories +*/ + +type GetCategoriesOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Ids optional.Interface + Name optional.String + ModifiedSince optional.String + CreatedSince optional.String +} + +func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptionals *GetCategoriesOpts) (GetCategories, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCategories + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/categories" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Ids.IsSet() { + localVarQueryParams.Add("ids", parameterToString(localVarOptionals.Ids.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Name.IsSet() { + localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ModifiedSince.IsSet() { + localVarQueryParams.Add("modifiedSince", parameterToString(localVarOptionals.ModifiedSince.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.CreatedSince.IsSet() { + localVarQueryParams.Add("createdSince", parameterToString(localVarOptionals.CreatedSince.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCategories + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Get a category details + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Category ID + +@return GetCategoryDetails +*/ +func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (GetCategoryDetails, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCategoryDetails + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/categories/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCategoryDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Get order details +Get all the orders + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetOrdersOpts - Optional Parameters: + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Offset" (optional.Int64) - Index of the first document in the page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** + +@return GetOrders +*/ + +type GetOrdersOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + ModifiedSince optional.String + CreatedSince optional.String +} + +func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *GetOrdersOpts) (GetOrders, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetOrders + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/orders" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.ModifiedSince.IsSet() { + localVarQueryParams.Add("modifiedSince", parameterToString(localVarOptionals.ModifiedSince.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.CreatedSince.IsSet() { + localVarQueryParams.Add("createdSince", parameterToString(localVarOptionals.CreatedSince.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetOrders + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Get a product's details + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Product ID + +@return GetProductDetails +*/ +func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (GetProductDetails, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetProductDetails + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/products/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetProductDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Return all your products + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetProductsOpts - Optional Parameters: + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Offset" (optional.Int64) - Index of the first document in the page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "Ids" (optional.Interface of []string) - Filter by product ids + * @param "Name" (optional.String) - Filter by product name, minimum 3 characters should be present for search + * @param "PriceLte" (optional.Float32) - Price filter for products less than and equals to particular amount + * @param "PriceGte" (optional.Float32) - Price filter for products greater than and equals to particular amount + * @param "PriceLt" (optional.Float32) - Price filter for products less than particular amount + * @param "PriceGt" (optional.Float32) - Price filter for products greater than particular amount + * @param "PriceEq" (optional.Float32) - Price filter for products equals to particular amount + * @param "PriceNe" (optional.Float32) - Price filter for products not equals to particular amount + * @param "Categories" (optional.Interface of []string) - Filter by category ids + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** + +@return GetProducts +*/ + +type GetProductsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Ids optional.Interface + Name optional.String + PriceLte optional.Float32 + PriceGte optional.Float32 + PriceLt optional.Float32 + PriceGt optional.Float32 + PriceEq optional.Float32 + PriceNe optional.Float32 + Categories optional.Interface + ModifiedSince optional.String + CreatedSince optional.String +} + +func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals *GetProductsOpts) (GetProducts, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetProducts + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/products" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Ids.IsSet() { + localVarQueryParams.Add("ids", parameterToString(localVarOptionals.Ids.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Name.IsSet() { + localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceLte.IsSet() { + localVarQueryParams.Add("price[lte]", parameterToString(localVarOptionals.PriceLte.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceGte.IsSet() { + localVarQueryParams.Add("price[gte]", parameterToString(localVarOptionals.PriceGte.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceLt.IsSet() { + localVarQueryParams.Add("price[lt]", parameterToString(localVarOptionals.PriceLt.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceGt.IsSet() { + localVarQueryParams.Add("price[gt]", parameterToString(localVarOptionals.PriceGt.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceEq.IsSet() { + localVarQueryParams.Add("price[eq]", parameterToString(localVarOptionals.PriceEq.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PriceNe.IsSet() { + localVarQueryParams.Add("price[ne]", parameterToString(localVarOptionals.PriceNe.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Categories.IsSet() { + localVarQueryParams.Add("categories", parameterToString(localVarOptionals.Categories.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.ModifiedSince.IsSet() { + localVarQueryParams.Add("modifiedSince", parameterToString(localVarOptionals.ModifiedSince.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.CreatedSince.IsSet() { + localVarQueryParams.Add("createdSince", parameterToString(localVarOptionals.CreatedSince.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetProducts + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +EcommerceApiService Set the ISO 4217 compliant display currency code for your Brevo account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload + +@return SetConfigDisplayCurrency +*/ +func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setConfigDisplayCurrency SetConfigDisplayCurrency) (SetConfigDisplayCurrency, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SetConfigDisplayCurrency + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/ecommerce/config/displayCurrency" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &setConfigDisplayCurrency + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v SetConfigDisplayCurrency + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 422 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_email_campaigns.go b/lib/api_email_campaigns.go index 2668fda..15815b8 100644 --- a/lib/api_email_campaigns.go +++ b/lib/api_email_campaigns.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,19 +27,19 @@ var ( type EmailCampaignsApiService service -/* +/* EmailCampaignsApiService Create an email campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param emailCampaigns Values to create a campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param emailCampaigns Values to create a campaign @return CreateModel */ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emailCampaigns CreateEmailCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -80,7 +79,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +92,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -114,50 +113,52 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Delete an email campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the campaign + + */ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -165,6 +166,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -202,7 +204,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -215,7 +217,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -234,41 +236,42 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Export the recipients of an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign @@ -278,16 +281,16 @@ EmailCampaignsApiService Export the recipients of an email campaign @return CreatedProcessId */ -type EmailExportRecipientsOpts struct { +type EmailExportRecipientsOpts struct { RecipientExport optional.Interface } func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -318,10 +321,10 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca } // body params if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { - + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(EmailExportRecipients) if !localVarOptionalRecipientExportok { - return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients") + return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients") } localVarPostBody = &localVarOptionalRecipientExport } @@ -335,7 +338,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -348,7 +351,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -369,71 +372,71 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get an A/B test email campaign results Obtain winning version of an A/B test email campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the A/B test campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the A/B test campaign @return AbTestCampaignResult */ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, campaignId int64) (AbTestCampaignResult, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue AbTestCampaignResult ) @@ -472,7 +475,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -485,7 +488,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -506,69 +509,69 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v AbTestCampaignResult - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get an email campaign report * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign @@ -578,16 +581,16 @@ EmailCampaignsApiService Get an email campaign report @return GetEmailCampaign */ -type GetEmailCampaignOpts struct { +type GetEmailCampaignOpts struct { Statistics optional.String } func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaignId int64, localVarOptionals *GetEmailCampaignOpts) (GetEmailCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaign ) @@ -629,7 +632,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -642,7 +645,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -663,64 +666,64 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Return all your created email campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetEmailCampaignsOpts - Optional Parameters: * @param "Type_" (optional.String) - Filter on the type of the campaigns * @param "Status" (optional.String) - Filter on the status of the campaign - * @param "Statistics" (optional.String) - Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + * @param "Statistics" (optional.String) - Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. * @param "StartDate" (optional.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' ) * @param "EndDate" (optional.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' ) * @param "Limit" (optional.Int64) - Number of documents per page @@ -731,24 +734,24 @@ EmailCampaignsApiService Return all your created email campaigns @return GetEmailCampaigns */ -type GetEmailCampaignsOpts struct { - Type_ optional.String - Status optional.String - Statistics optional.String - StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetEmailCampaignsOpts struct { + Type_ optional.String + Status optional.String + Statistics optional.String + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String ExcludeHtmlContent optional.Bool } func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *GetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaigns ) @@ -813,7 +816,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -826,7 +829,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -847,60 +850,60 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get a shared template url Get a unique URL to share & import an email template from one Brevo account to another. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign or template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign or template @return GetSharedTemplateUrl */ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, campaignId int64) (GetSharedTemplateUrl, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSharedTemplateUrl ) @@ -939,7 +942,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -952,7 +955,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -973,61 +976,63 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSharedTemplateUrl - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send an email campaign immediately, based on campaignId - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + + */ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -1035,6 +1040,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1072,7 +1078,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1085,7 +1091,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1104,57 +1110,60 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send the report of a campaign A PDF will be sent to the specified email addresses - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign - - @param sendReport Values for send a report + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + * @param sendReport Values for send a report + + */ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( @@ -1162,6 +1171,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1201,7 +1211,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1214,7 +1224,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1233,45 +1243,48 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send an email campaign to your test list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign - - @param emailTo + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + * @param emailTo + + */ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId int64, emailTo SendTestEmail) (*http.Response, error) { var ( @@ -1279,6 +1292,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1318,7 +1332,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1331,7 +1345,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1350,45 +1364,48 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Update an email campaign status - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign - - @param status Status of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + * @param status Status of the campaign + + */ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( @@ -1396,6 +1413,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1435,7 +1453,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1448,7 +1466,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1467,45 +1485,48 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Update an email campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign - - @param emailCampaign Values to update a campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + * @param emailCampaign Values to update a campaign + + */ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, campaignId int64, emailCampaign UpdateEmailCampaign) (*http.Response, error) { var ( @@ -1513,6 +1534,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1552,7 +1574,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1565,7 +1587,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1584,53 +1606,54 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Upload an image to your account's image gallery - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uploadImage Parameters to upload an image + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uploadImage Parameters to upload an image @return UploadImageModel */ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, uploadImage UploadImageToGallery) (UploadImageModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue UploadImageModel ) @@ -1670,7 +1693,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1683,7 +1706,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1704,40 +1727,40 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v UploadImageModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_events.go b/lib/api_events.go new file mode 100644 index 0000000..b36ba6f --- /dev/null +++ b/lib/api_events.go @@ -0,0 +1,146 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type EventsApiService service + +/* +EventsApiService Create an event +Create an event to track a contact's interaction. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param event + + +*/ +func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &event + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} diff --git a/lib/api_external_feeds.go b/lib/api_external_feeds.go index 54f3d29..d37aade 100644 --- a/lib/api_external_feeds.go +++ b/lib/api_external_feeds.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,21 +27,21 @@ var ( type ExternalFeedsApiService service -/* +/* ExternalFeedsApiService Create an external feed This endpoint will create an external feed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createExternalFeed Values to create a feed + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createExternalFeed Values to create a feed -@return InlineResponse2013 +@return InlineResponse2015 */ -func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, createExternalFeed CreateExternalFeed) (InlineResponse2013, *http.Response, error) { +func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, createExternalFeed CreateExternalFeed) (InlineResponse2015, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2013 + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2015 ) // create path and map variables @@ -81,7 +80,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -94,7 +93,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -115,51 +114,53 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { - var v InlineResponse2013 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2015 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Delete an external feed This endpoint will delete an external feed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uuid UUID of the feed to delete + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid UUID of the feed to delete + + */ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid string) (*http.Response, error) { var ( @@ -167,6 +168,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -204,7 +206,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -217,7 +219,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -236,41 +238,42 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Fetch all external feeds This endpoint can fetch all created external feeds. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -286,22 +289,22 @@ This endpoint can fetch all created external feeds. @return GetAllExternalFeeds */ -type GetAllExternalFeedsOpts struct { - Search optional.String +type GetAllExternalFeedsOpts struct { + Search optional.String StartDate optional.String - EndDate optional.String - Sort optional.String - AuthType optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Sort optional.String + AuthType optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, localVarOptionals *GetAllExternalFeedsOpts) (GetAllExternalFeeds, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAllExternalFeeds ) @@ -360,7 +363,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -373,7 +376,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -394,71 +397,71 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAllExternalFeeds - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Get an external feed by UUID This endpoint will update an external feed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uuid UUID of the feed to fetch + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid UUID of the feed to fetch @return GetExternalFeedByUuid */ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uuid string) (GetExternalFeedByUuid, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExternalFeedByUuid ) @@ -497,7 +500,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -510,7 +513,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -531,63 +534,65 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExternalFeedByUuid - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Update an external feed This endpoint will update an external feed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uuid UUID of the feed to update - - @param updateExternalFeed Values to update a feed + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid UUID of the feed to update + * @param updateExternalFeed Values to update a feed + + */ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid string, updateExternalFeed UpdateExternalFeed) (*http.Response, error) { var ( @@ -595,6 +600,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -634,7 +640,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -647,7 +653,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -666,34 +672,35 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_files.go b/lib/api_files.go index 2f8a3bb..6c084ac 100644 --- a/lib/api_files.go +++ b/lib/api_files.go @@ -1,25 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" - "os" "strings" - + "fmt" "github.com/antihax/optional" + "os" ) // Linger please @@ -29,7 +28,7 @@ var ( type FilesApiService service -/* +/* FilesApiService Get all files * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmFilesGetOpts - Optional Parameters: @@ -44,22 +43,22 @@ FilesApiService Get all files @return FileList */ -type CrmFilesGetOpts struct { - Entity optional.String +type CrmFilesGetOpts struct { + Entity optional.String EntityIds optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String } func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *CrmFilesGetOpts) (FileList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileList ) @@ -118,7 +117,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -131,7 +130,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -152,59 +151,59 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Get file details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id File id to get file data. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id File id to get file data. @return FileData */ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (FileData, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileData ) @@ -243,7 +242,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -256,7 +255,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -277,61 +276,63 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileData - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Delete a file - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id File id to delete. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id File id to delete. + + */ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -339,6 +340,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -376,7 +378,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -389,7 +391,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -408,53 +410,54 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* FilesApiService Download a file - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id File id to download. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id File id to download. @return FileDownloadableLink */ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDownloadableLink, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileDownloadableLink ) @@ -493,7 +496,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -506,7 +509,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -527,58 +530,58 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileDownloadableLink - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Upload a file * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param file File data to create a file. @@ -590,18 +593,18 @@ FilesApiService Upload a file @return FileData */ -type CrmFilesPostOpts struct { - DealId optional.String +type CrmFilesPostOpts struct { + DealId optional.String ContactId optional.Int64 CompanyId optional.String } func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, localVarOptionals *CrmFilesPostOpts) (FileData, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileData ) @@ -655,7 +658,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -668,7 +671,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -689,40 +692,40 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v FileData - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_inbound_parsing.go b/lib/api_inbound_parsing.go index 7b36622..f276bda 100644 --- a/lib/api_inbound_parsing.go +++ b/lib/api_inbound_parsing.go @@ -1,24 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" - "os" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -29,20 +27,20 @@ var ( type InboundParsingApiService service -/* +/* InboundParsingApiService Retrieve inbound attachment with download token. This endpoint will retrieve inbound attachment with download token. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param downloadToken Token to fetch a particular attachment + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param downloadToken Token to fetch a particular attachment @return *os.File */ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context, downloadToken string) (*os.File, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue *os.File ) @@ -81,7 +79,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -94,7 +92,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -115,58 +113,58 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v *os.File - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* InboundParsingApiService Get the list of all the events for the received emails. This endpoint will show the list of all the events for the received emails. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -181,21 +179,21 @@ This endpoint will show the list of all the events for the received emails. @return GetInboundEmailEvents */ -type GetInboundEmailEventsOpts struct { - Sender optional.String +type GetInboundEmailEventsOpts struct { + Sender optional.String StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, localVarOptionals *GetInboundEmailEventsOpts) (GetInboundEmailEvents, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetInboundEmailEvents ) @@ -251,7 +249,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -264,7 +262,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -285,60 +283,60 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetInboundEmailEvents - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* InboundParsingApiService Fetch all events history for one particular received email. This endpoint will show the list of all events history for one particular received email. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uuid UUID to fetch events specific to recieved email + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid UUID to fetch events specific to recieved email @return GetInboundEmailEventsByUuid */ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Context, uuid string) (GetInboundEmailEventsByUuid, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetInboundEmailEventsByUuid ) @@ -377,7 +375,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -390,7 +388,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -411,40 +409,40 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetInboundEmailEventsByUuid - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_master_account.go b/lib/api_master_account.go index 15c5af5..549e167 100644 --- a/lib/api_master_account.go +++ b/lib/api_master_account.go @@ -1,22 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" + "fmt" + "github.com/antihax/optional" ) // Linger please @@ -26,24 +27,26 @@ var ( type MasterAccountApiService service -/* -MasterAccountApiService Get the details of requested master account -This endpoint will provide the details of the master account. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +/* +MasterAccountApiService Delete a group +This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the group + -@return MasterDetailsResponse */ -func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error) { +func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue MasterDetailsResponse + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/masterAccount" + localVarPath := a.client.cfg.BasePath + "/corporate/group/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -76,7 +79,7 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -89,94 +92,74 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHttpResponse, err := a.client.callAPI(r) if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err + return localVarHttpResponse, err } localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHttpResponse, err + return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - - if localVarHttpResponse.StatusCode == 200 { - var v MasterDetailsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - - return localVarReturnValue, localVarHttpResponse, newErr + + return localVarHttpResponse, newErr } - return localVarReturnValue, localVarHttpResponse, nil + return localVarHttpResponse, nil } -/* -MasterAccountApiService Get the list of all the sub-accounts of the master account. -This endpoint will provide the list all the sub-accounts of the master account. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param offset Index of the first sub-account in the page - - @param limit Number of sub-accounts to be displayed on each page +/* +MasterAccountApiService GET a group details +This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the group of sub-organization -@return SubAccountsResponse +@return CorporateGroupDetailsResponse */ -func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error) { +func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id string) (CorporateGroupDetailsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue SubAccountsResponse + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CorporateGroupDetailsResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" + localVarPath := a.client.cfg.BasePath + "/corporate/group/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - localVarQueryParams.Add("offset", parameterToString(offset, "")) - localVarQueryParams.Add("limit", parameterToString(limit, "")) // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -204,7 +187,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -217,7 +200,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -238,61 +221,55 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v SubAccountsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 400 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v CorporateGroupDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -MasterAccountApiService Delete a sub-account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Id of the sub-account organization to be deleted +/* +MasterAccountApiService Update a group of sub-accounts +This endpoint allows you to update a group of sub-accounts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the group + * @param body Group details to be updated. + + */ -func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error) { +func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id string, body Body3) (*http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" + localVarPath := a.client.cfg.BasePath + "/corporate/group/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) localVarHeaderParams := make(map[string]string) @@ -316,6 +293,8 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } + // body params + localVarPostBody = &body if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -326,7 +305,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -339,7 +318,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -358,38 +337,49 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* -MasterAccountApiService Get sub-account details -This endpoint will provide the details for the specified sub-account company - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Id of the sub-account organization +/* +MasterAccountApiService Create a new group of sub-accounts +This endpoint allows to create a group of sub-accounts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Group details to be created. -@return SubAccountDetailsResponse +@return InlineResponse201 */ -func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error) { +func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body Body) (InlineResponse201, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue SubAccountDetailsResponse + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse201 ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/corporate/group" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -412,6 +402,8 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } + // body params + localVarPostBody = &body if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -422,7 +414,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -435,7 +427,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -456,53 +448,67 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - - if localVarHttpResponse.StatusCode == 200 { - var v SubAccountDetailsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + + if localVarHttpResponse.StatusCode == 201 { + var v InlineResponse201 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -MasterAccountApiService Update sub-account plan -This endpoint will update the sub-account plan - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Id of the sub-account organization - - @param updatePlanDetails Values to update a sub-account plan +/* +MasterAccountApiService Delete sub-account from group +This endpoint allows you to remove a sub-organization from a group. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param groupId Id of the group + * @param body List of sub-account ids + + */ -func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error) { +func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx context.Context, groupId string, body Body4) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}/plan" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/corporate/group/unlink/{groupId}/subAccounts" + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", fmt.Sprintf("%v", groupId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -526,7 +532,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &updatePlanDetails + localVarPostBody = &body if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -537,7 +543,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -550,7 +556,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -569,59 +575,48 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 403 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* -MasterAccountApiService Create an API key for a sub-account -This endpoint will generate an API v3 key for a sub account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createApiKeyRequest Values to generate API key for sub-account +/* +MasterAccountApiService Get the details of requested master account +This endpoint will provide the details of the master account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return CreateApiKeyResponse +@return MasterDetailsResponse */ -func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context, createApiKeyRequest CreateApiKeyRequest) (CreateApiKeyResponse, *http.Response, error) { +func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue CreateApiKeyResponse + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue MasterDetailsResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/key" + localVarPath := a.client.cfg.BasePath + "/corporate/masterAccount" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -644,8 +639,6 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - // body params - localVarPostBody = &createApiKeyRequest if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -656,7 +649,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -669,7 +662,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -690,65 +683,65 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - - if localVarHttpResponse.StatusCode == 201 { - var v CreateApiKeyResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + + if localVarHttpResponse.StatusCode == 200 { + var v MasterDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -MasterAccountApiService Create a new sub-account under a master account. -This endpoint will create a new sub-account under a master account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param subAccountCreate values to create new sub-account +/* +MasterAccountApiService Generate SSO token to access admin account +This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ssoTokenRequestCorporate User email of admin account -@return CreateSubAccountResponse +@return GetSsoToken */ -func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error) { +func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, ssoTokenRequestCorporate SsoTokenRequestCorporate) (GetSsoToken, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue CreateSubAccountResponse + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetSsoToken ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" + localVarPath := a.client.cfg.BasePath + "/corporate/ssoToken" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -772,7 +765,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &subAccountCreate + localVarPostBody = &ssoTokenRequestCorporate if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -783,7 +776,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -796,7 +789,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -817,70 +810,84 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - - if localVarHttpResponse.StatusCode == 201 { - var v CreateSubAccountResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + + if localVarHttpResponse.StatusCode == 200 { + var v GetSsoToken + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* -MasterAccountApiService 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. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param ssoTokenRequest Values to generate SSO token for sub-account +/* +MasterAccountApiService Get the list of all the sub-accounts of the master account. +This endpoint will provide the list all the sub-accounts of the master account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param offset Index of the first sub-account in the page + * @param limit Number of sub-accounts to be displayed on each page -@return GetSsoToken +@return SubAccountsResponse */ -func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error) { +func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue GetSsoToken + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SubAccountsResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/ssoToken" + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + localVarQueryParams.Add("offset", parameterToString(offset, "")) + localVarQueryParams.Add("limit", parameterToString(limit, "")) // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -898,8 +905,6 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - // body params - localVarPostBody = &ssoTokenRequest if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -910,7 +915,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -923,7 +928,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -944,51 +949,2007 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { - var v GetSsoToken - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v SubAccountsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Enable/disable sub-account application(s) +API endpoint for the Corporate owner to enable/disable applications on the sub-account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization (mandatory) + * @param toggleApplications List of applications to activate or deactivate on a sub-account - if localVarHttpResponse.StatusCode == 403 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx context.Context, id int64, toggleApplications SubAccountAppsToggleRequest) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}/applications/toggle" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &toggleApplications + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Delete a sub-account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization to be deleted + + +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get sub-account details +This endpoint will provide the details for the specified sub-account company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization + +@return SubAccountDetailsResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SubAccountDetailsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v SubAccountDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Update sub-account plan +This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization + * @param updatePlanDetails Values to update a sub-account plan + + +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}/plan" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updatePlanDetails + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Associate an IP to sub-accounts +This endpoint allows to associate an IP to sub-accounts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Ip address association details + +@return interface{} +*/ +func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context.Context, body Body1) (interface{}, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue interface{} + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/ip/associate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v interface{} + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Dissociate an IP from sub-accounts +This endpoint allows to dissociate an IP from sub-accounts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Ip address dissociation details + + +*/ +func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context.Context, body Body2) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/ip/dissociate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Create an API key for a sub-account +This endpoint will generate an API v3 key for a sub account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createApiKeyRequest Values to generate API key for sub-account + +@return CreateApiKeyResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context, createApiKeyRequest CreateApiKeyRequest) (CreateApiKeyResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CreateApiKeyResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/key" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createApiKeyRequest + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v CreateApiKeyResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Create a new sub-account under a master account. +This endpoint will create a new sub-account under a master account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subAccountCreate values to create new sub-account + +@return CreateSubAccountResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CreateSubAccountResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &subAccountCreate + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v CreateSubAccountResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Generate SSO token to access sub-account +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. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ssoTokenRequest Values to generate SSO token for sub-account + +@return GetSsoToken +*/ +func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetSsoToken + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/ssoToken" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &ssoTokenRequest + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetSsoToken + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Resend / cancel admin user invitation +This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param action Action to be performed (cancel / resend) + * @param email Email address of the recipient + +@return InlineResponse200 +*/ +func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx context.Context, action string, email string) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/user/invitation/{action}/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"action"+"}", fmt.Sprintf("%v", action), -1) + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Revoke an admin user +This endpoint allows to revoke/remove an invited member of your Admin account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param email Email of the invited user + + +*/ +func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Context, email string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/user/revoke/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get user activity logs + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetAccountActivityOpts - Optional Parameters: + * @param "StartDate" (optional.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. + * @param "EndDate" (optional.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. + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Offset" (optional.Int64) - Index of the first document in the page. + +@return GetAccountActivity +*/ + +type GetAccountActivityOpts struct { + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 +} + +func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetAccountActivity + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/activities" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetAccountActivity + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get the list of all admin users +This endpoint allows you to list all Admin users of your Admin account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return GetCorporateInvitedUsersList +*/ +func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Context) (GetCorporateInvitedUsersList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCorporateInvitedUsersList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/invited/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCorporateInvitedUsersList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Check admin user permissions + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param email Email of the invited user + +@return GetCorporateUserPermission +*/ +func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context, email string) (GetCorporateUserPermission, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetCorporateUserPermission + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/user/{email}/permissions" + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetCorporateUserPermission + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get the list of groups +This endpoint allows you to list all groups created on your Admin account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return []InlineResponse2001 +*/ +func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]InlineResponse2001, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []InlineResponse2001 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []InlineResponse2001 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService 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. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sendInvitation Payload to send an invitation + +@return InviteAdminUser +*/ +func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvitation InviteAdminUser) (InviteAdminUser, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InviteAdminUser + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/user/invitation/send" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &sendInvitation + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v InviteAdminUser + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_notes.go b/lib/api_notes.go index 2ac76cb..2b6661d 100644 --- a/lib/api_notes.go +++ b/lib/api_notes.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,7 +27,7 @@ var ( type NotesApiService service -/* +/* NotesApiService Get all notes * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmNotesGetOpts - Optional Parameters: @@ -43,22 +42,22 @@ NotesApiService Get all notes @return NoteList */ -type CrmNotesGetOpts struct { - Entity optional.String +type CrmNotesGetOpts struct { + Entity optional.String EntityIds optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String } func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *CrmNotesGetOpts) (NoteList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue NoteList ) @@ -117,7 +116,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -130,7 +129,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -151,50 +150,52 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v NoteList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* NotesApiService Delete a note - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Note ID to delete + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to delete + + */ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -202,6 +203,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -239,7 +241,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -252,7 +254,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -271,53 +273,54 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* NotesApiService Get a note - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Note ID to get + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to get @return Note */ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Note ) @@ -356,7 +359,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -369,7 +372,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -390,62 +393,64 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Note - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* NotesApiService Update a note - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id Note ID to update - - @param body Note data to update a note + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to update + * @param body Note data to update a note + + */ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body NoteData) (*http.Response, error) { var ( @@ -453,6 +458,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -492,7 +498,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -505,7 +511,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -524,64 +530,65 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 415 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* NotesApiService Create a note - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Note data to create a note. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Note data to create a note. @return NoteId */ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (NoteId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue NoteId ) @@ -621,7 +628,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -634,7 +641,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -655,51 +662,51 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v NoteId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 415 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_payments.go b/lib/api_payments.go new file mode 100644 index 0000000..55983d2 --- /dev/null +++ b/lib/api_payments.go @@ -0,0 +1,462 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type PaymentsApiService service + +/* +PaymentsApiService Create a payment request + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createPaymentRquest Create a payment request + +@return CreatePaymentResponse +*/ +func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPaymentRquest CreatePaymentRequest) (CreatePaymentResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CreatePaymentResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/payments/requests" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createPaymentRquest + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v CreatePaymentResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +PaymentsApiService Delete a payment request. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the payment request. + + +*/ +func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/payments/requests/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +PaymentsApiService Get payment request details + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the payment Request + +@return GetPaymentRequest +*/ +func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (GetPaymentRequest, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetPaymentRequest + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/payments/requests/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetPaymentRequest + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 401 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_process.go b/lib/api_process.go index 0503a84..a4e0cf5 100644 --- a/lib/api_process.go +++ b/lib/api_process.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,19 +27,19 @@ var ( type ProcessApiService service -/* +/* ProcessApiService Return the informations for a process - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param processId Id of the process + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param processId Id of the process @return GetProcess */ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (GetProcess, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcess ) @@ -79,7 +78,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +91,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,58 +112,58 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProcess - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ProcessApiService Return all the processes for your account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetProcessesOpts - Optional Parameters: @@ -175,18 +174,18 @@ ProcessApiService Return all the processes for your account @return GetProcesses */ -type GetProcessesOpts struct { - Limit optional.Int64 +type GetProcessesOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *GetProcessesOpts) (GetProcesses, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcesses ) @@ -233,7 +232,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -246,7 +245,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -267,40 +266,40 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProcesses - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_reseller.go b/lib/api_reseller.go index 7a80f0a..78312d2 100644 --- a/lib/api_reseller.go +++ b/lib/api_reseller.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,20 +27,20 @@ var ( type ResellerApiService service -/* +/* ResellerApiService Add Email and/or SMS credits to a specific child account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param addCredits Values to post to add credit to a specific child account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param addCredits Values to post to add credit to a specific child account @return RemainingCreditModel */ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier string, addCredits AddCredits) (RemainingCreditModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue RemainingCreditModel ) @@ -82,7 +81,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -95,7 +94,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -116,73 +115,75 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Associate a dedicated IP to the child - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param ip IP to associate + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param ip IP to associate + + */ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( @@ -190,6 +191,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -229,7 +231,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -242,7 +244,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -261,45 +263,48 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Create a domain for a child account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. + + */ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentifier string, addChildDomain AddChildDomain) (*http.Response, error) { var ( @@ -307,6 +312,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -346,7 +352,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -359,7 +365,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -378,52 +384,53 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Creates a reseller child * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateResellerChildOpts - Optional Parameters: @@ -432,16 +439,16 @@ ResellerApiService Creates a reseller child @return CreateReseller */ -type CreateResellerChildOpts struct { +type CreateResellerChildOpts struct { ResellerChild optional.Interface } func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *CreateResellerChildOpts) (CreateReseller, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateReseller ) @@ -471,10 +478,10 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp } // body params if localVarOptionals != nil && localVarOptionals.ResellerChild.IsSet() { - + localVarOptionalResellerChild, localVarOptionalResellerChildok := localVarOptionals.ResellerChild.Value().(CreateChild) if !localVarOptionalResellerChildok { - return localVarReturnValue, nil, reportError("resellerChild should be CreateChild") + return localVarReturnValue, nil, reportError("resellerChild should be CreateChild") } localVarPostBody = &localVarOptionalResellerChild } @@ -488,7 +495,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -501,7 +508,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -522,62 +529,64 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateReseller - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param domainName Pass the existing domain that needs to be deleted + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param domainName Pass the existing domain that needs to be deleted + + */ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentifier string, domainName string) (*http.Response, error) { var ( @@ -585,6 +594,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -623,7 +633,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -636,7 +646,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -655,55 +665,58 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Delete a single reseller child based on the child identifier supplied - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or child id of reseller's child + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or child id of reseller's child + + */ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdentifier string) (*http.Response, error) { var ( @@ -711,6 +724,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -748,7 +762,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -761,7 +775,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -780,56 +794,59 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Dissociate a dedicated IP to the child - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param ip IP to dissociate + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param ip IP to dissociate + + */ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( @@ -837,6 +854,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -876,7 +894,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -889,7 +907,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -908,53 +926,54 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child @return GetChildAccountCreationStatus */ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, childIdentifier string) (GetChildAccountCreationStatus, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildAccountCreationStatus ) @@ -993,7 +1012,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1006,7 +1025,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1027,81 +1046,81 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildAccountCreationStatus - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get all sender domains for a specific child account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child @return GetChildDomains */ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) (GetChildDomains, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildDomains ) @@ -1140,7 +1159,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1153,7 +1172,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1174,81 +1193,81 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildDomains - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get a child account's details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child @return GetChildInfo */ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier string) (GetChildInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildInfo ) @@ -1287,7 +1306,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1300,7 +1319,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1321,69 +1340,69 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get the list of all children accounts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetResellerChildsOpts - Optional Parameters: @@ -1393,17 +1412,17 @@ ResellerApiService Get the list of all children accounts @return GetChildrenList */ -type GetResellerChildsOpts struct { - Limit optional.Int64 +type GetResellerChildsOpts struct { + Limit optional.Int64 Offset optional.Int64 } func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *GetResellerChildsOpts) (GetChildrenList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildrenList ) @@ -1447,7 +1466,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1460,7 +1479,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1481,60 +1500,60 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildrenList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService 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] - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child @return GetSsoToken */ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier string) (GetSsoToken, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSsoToken ) @@ -1573,7 +1592,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1586,7 +1605,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1607,82 +1626,82 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSsoToken - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Remove Email and/or SMS credits from a specific child account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param removeCredits Values to post to remove email or SMS credits from a specific child account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param removeCredits Values to post to remove email or SMS credits from a specific child account @return RemainingCreditModel */ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier string, removeCredits RemoveCredits) (RemainingCreditModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue RemainingCreditModel ) @@ -1723,7 +1742,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1736,7 +1755,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1757,73 +1776,75 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Update info of reseller's child account status based on the childIdentifier supplied - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param updateChildAccountStatus values to update in child account status + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param updateChildAccountStatus values to update in child account status + + */ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, childIdentifier string, updateChildAccountStatus UpdateChildAccountStatus) (*http.Response, error) { var ( @@ -1831,6 +1852,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1870,7 +1892,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1883,7 +1905,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1902,57 +1924,60 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Update the sender domain of reseller's child based on the childIdentifier and domainName passed - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param domainName Pass the existing domain that needs to be updated - - @param updateChildDomain value to update for sender domain + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param domainName Pass the existing domain that needs to be updated + * @param updateChildDomain value to update for sender domain + + */ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentifier string, domainName string, updateChildDomain UpdateChildDomain) (*http.Response, error) { var ( @@ -1960,6 +1985,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -2000,7 +2026,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2013,7 +2039,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2032,56 +2058,59 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Update info of reseller's child based on the child identifier supplied - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param childIdentifier Either auth key or id of reseller's child - - @param resellerChild values to update in child profile + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param childIdentifier Either auth key or id of reseller's child + * @param resellerChild values to update in child profile + + */ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdentifier string, resellerChild UpdateChild) (*http.Response, error) { var ( @@ -2089,6 +2118,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -2128,7 +2158,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2141,7 +2171,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2160,45 +2190,46 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_senders.go b/lib/api_senders.go index c04ef25..7032b5b 100644 --- a/lib/api_senders.go +++ b/lib/api_senders.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,7 +27,7 @@ var ( type SendersApiService service -/* +/* SendersApiService Create a new sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateSenderOpts - Optional Parameters: @@ -37,16 +36,16 @@ SendersApiService Create a new sender @return CreateSenderModel */ -type CreateSenderOpts struct { +type CreateSenderOpts struct { Sender optional.Interface } func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *CreateSenderOpts) (CreateSenderModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSenderModel ) @@ -76,10 +75,10 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals } // body params if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { - + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(CreateSender) if !localVarOptionalSenderok { - return localVarReturnValue, nil, reportError("sender should be CreateSender") + return localVarReturnValue, nil, reportError("sender should be CreateSender") } localVarPostBody = &localVarOptionalSender } @@ -93,7 +92,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -106,7 +105,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -127,50 +126,52 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateSenderModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Delete a sender - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param senderId Id of the sender + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param senderId Id of the sender + + */ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*http.Response, error) { var ( @@ -178,6 +179,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -215,7 +217,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -228,7 +230,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -247,52 +249,53 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SendersApiService Get all the dedicated IPs for your account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetIps */ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIps ) @@ -330,7 +333,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -343,7 +346,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -364,48 +367,48 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetIps - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Get all the dedicated IPs for a sender - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param senderId Id of the sender + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param senderId Id of the sender @return GetIpsFromSender */ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64) (GetIpsFromSender, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIpsFromSender ) @@ -444,7 +447,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -457,7 +460,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -478,58 +481,58 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetIpsFromSender - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Get the list of all your senders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSendersOpts - Optional Parameters: @@ -539,17 +542,17 @@ SendersApiService Get the list of all your senders @return GetSendersList */ -type GetSendersOpts struct { - Ip optional.String +type GetSendersOpts struct { + Ip optional.String Domain optional.String } func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *GetSendersOpts) (GetSendersList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSendersList ) @@ -593,7 +596,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -606,7 +609,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -627,47 +630,47 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSendersList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Update a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender @@ -677,7 +680,7 @@ SendersApiService Update a sender */ -type UpdateSenderOpts struct { +type UpdateSenderOpts struct { Sender optional.Interface } @@ -687,6 +690,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -716,10 +720,10 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo } // body params if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { - + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(UpdateSender) if !localVarOptionalSenderok { - return nil, reportError("sender should be UpdateSender") + return nil, reportError("sender should be UpdateSender") } localVarPostBody = &localVarOptionalSender } @@ -733,7 +737,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -746,7 +750,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -765,41 +769,42 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SendersApiService Update a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender @@ -809,7 +814,7 @@ SendersApiService Update a sender */ -type ValidateSenderByOTPOpts struct { +type ValidateSenderByOTPOpts struct { Otp optional.Interface } @@ -819,6 +824,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -848,10 +854,10 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in } // body params if localVarOptionals != nil && localVarOptionals.Otp.IsSet() { - + localVarOptionalOtp, localVarOptionalOtpok := localVarOptionals.Otp.Value().(Otp) if !localVarOptionalOtpok { - return nil, reportError("otp should be Otp") + return nil, reportError("otp should be Otp") } localVarPostBody = &localVarOptionalOtp } @@ -865,7 +871,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -878,7 +884,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -897,34 +903,35 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_sms_campaigns.go b/lib/api_sms_campaigns.go index 00c711c..71e90d2 100644 --- a/lib/api_sms_campaigns.go +++ b/lib/api_sms_campaigns.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,19 +27,19 @@ var ( type SMSCampaignsApiService service -/* +/* SMSCampaignsApiService Creates an SMS campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createSmsCampaign Values to create an SMS Campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createSmsCampaign Values to create an SMS Campaign @return CreateModel */ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSmsCampaign CreateSmsCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -80,7 +79,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +92,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -114,50 +113,52 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Delete an SMS campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the SMS campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the SMS campaign + + */ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -165,6 +166,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -202,7 +204,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -215,7 +217,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -234,53 +236,54 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Get an SMS campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the SMS campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the SMS campaign @return GetSmsCampaign */ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId int64) (GetSmsCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaign ) @@ -319,7 +322,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -332,7 +335,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -353,58 +356,58 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Returns the information for all your created SMS campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmsCampaignsOpts - Optional Parameters: @@ -418,21 +421,21 @@ SMSCampaignsApiService Returns the information for all your created SMS campaign @return GetSmsCampaigns */ -type GetSmsCampaignsOpts struct { - Status optional.String +type GetSmsCampaignsOpts struct { + Status optional.String StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *GetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaigns ) @@ -488,7 +491,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -501,7 +504,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -522,47 +525,47 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -573,16 +576,16 @@ It returns the background process ID which on completion calls the notify URL th @return CreatedProcessId */ -type RequestSmsRecipientExportOpts struct { +type RequestSmsRecipientExportOpts struct { RecipientExport optional.Interface } func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *RequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -613,10 +616,10 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, } // body params if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { - + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(RequestSmsRecipientExport) if !localVarOptionalRecipientExportok { - return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport") + return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport") } localVarPostBody = &localVarOptionalRecipientExport } @@ -630,7 +633,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -643,7 +646,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -664,61 +667,63 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Send your SMS campaign immediately - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the campaign + + */ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -726,6 +731,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -763,7 +769,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -776,7 +782,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -795,57 +801,60 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService 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. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the campaign - - @param sendReport Values for send a report + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the campaign + * @param sendReport Values for send a report + + */ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( @@ -853,6 +862,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -892,7 +902,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -905,7 +915,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -924,45 +934,48 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Send a test SMS campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the SMS campaign - - @param 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 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the SMS campaign + * @param 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 + + */ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int64, phoneNumber SendTestSms) (*http.Response, error) { var ( @@ -970,6 +983,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1009,7 +1023,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1022,7 +1036,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1041,45 +1055,48 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendSmsTestFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Update an SMS campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the SMS campaign - - @param updateSmsCampaign Values to update an SMS Campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the SMS campaign + * @param updateSmsCampaign Values to update an SMS Campaign + + */ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaignId int64, updateSmsCampaign UpdateSmsCampaign) (*http.Response, error) { var ( @@ -1087,6 +1104,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1126,7 +1144,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1139,7 +1157,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1158,45 +1176,48 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Update a campaign's status - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the campaign - - @param status Status of the campaign. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the campaign + * @param status Status of the campaign. + + */ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( @@ -1204,6 +1225,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -1243,7 +1265,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1256,7 +1278,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1275,34 +1297,35 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_tasks.go b/lib/api_tasks.go index d5f908e..2cd737f 100644 --- a/lib/api_tasks.go +++ b/lib/api_tasks.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,14 +27,14 @@ var ( type TasksApiService service -/* +/* TasksApiService Get all tasks * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmTasksGetOpts - Optional Parameters: * @param "FilterType" (optional.String) - Filter by task type (ID) * @param "FilterStatus" (optional.String) - Filter by task status * @param "FilterDate" (optional.String) - Filter by date - * @param "FilterAssignTo" (optional.String) - Filter by assignTo id + * @param "FilterAssignTo" (optional.String) - Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute. * @param "FilterContacts" (optional.String) - Filter by contact ids * @param "FilterDeals" (optional.String) - Filter by deals ids * @param "FilterCompanies" (optional.String) - Filter by companies ids @@ -49,28 +48,28 @@ TasksApiService Get all tasks @return TaskList */ -type CrmTasksGetOpts struct { - FilterType optional.String - FilterStatus optional.String - FilterDate optional.String - FilterAssignTo optional.String - FilterContacts optional.String - FilterDeals optional.String +type CrmTasksGetOpts struct { + FilterType optional.String + FilterStatus optional.String + FilterDate optional.String + FilterAssignTo optional.String + FilterContacts optional.String + FilterDeals optional.String FilterCompanies optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *CrmTasksGetOpts) (TaskList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue TaskList ) @@ -147,7 +146,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -160,7 +159,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -181,50 +180,52 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v TaskList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Delete a task - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + */ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -232,6 +233,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -269,7 +271,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -282,7 +284,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -301,53 +303,54 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TasksApiService Get a task - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id @return Task */ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Task ) @@ -386,7 +389,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -399,7 +402,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -420,69 +423,72 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Task - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Update a task - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param id - - @param body Updated task details. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated task details. + + */ -func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body7) (*http.Response, error) { +func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body12) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -522,7 +528,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -535,7 +541,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -554,54 +560,55 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TasksApiService Create a task - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Task name. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Task name. -@return InlineResponse2011 +@return InlineResponse2012 */ -func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body6) (InlineResponse2011, *http.Response, error) { +func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (InlineResponse2012, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2011 + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2012 ) // create path and map variables @@ -640,7 +647,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body6) (InlineR key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -653,7 +660,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body6) (InlineR key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -674,47 +681,47 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body6) (InlineR if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { - var v InlineResponse2011 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2012 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Get all task types - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return TaskTypes */ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue TaskTypes ) @@ -752,7 +759,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -765,7 +772,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -786,29 +793,29 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v TaskTypes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_transactional_emails.go b/lib/api_transactional_emails.go index 06ef2f3..c371d94 100644 --- a/lib/api_transactional_emails.go +++ b/lib/api_transactional_emails.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,11 +27,13 @@ var ( type TransactionalEmailsApiService service -/* +/* TransactionalEmailsApiService Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param blockDomain + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param blockDomain + + */ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, blockDomain BlockDomain) (*http.Response, error) { var ( @@ -40,6 +41,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -78,7 +80,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +93,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,42 +112,43 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Create an email template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param smtpTemplate values to update in transactional email template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param smtpTemplate values to update in transactional email template @return CreateModel */ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, smtpTemplate CreateSmtpTemplate) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -185,7 +188,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -198,7 +201,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -219,51 +222,53 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param domain The name of the domain to be deleted + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param domain The name of the domain to be deleted + + */ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, domain string) (*http.Response, error) { var ( @@ -271,6 +276,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -308,7 +314,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -321,7 +327,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -340,30 +346,31 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -373,7 +380,7 @@ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) */ -type DeleteHardbouncesOpts struct { +type DeleteHardbouncesOpts struct { DeleteHardbounces optional.Interface } @@ -383,6 +390,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -411,10 +419,10 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l } // body params if localVarOptionals != nil && localVarOptionals.DeleteHardbounces.IsSet() { - + localVarOptionalDeleteHardbounces, localVarOptionalDeleteHardbouncesok := localVarOptionals.DeleteHardbounces.Value().(DeleteHardbounces) if !localVarOptionalDeleteHardbouncesok { - return nil, reportError("deleteHardbounces should be DeleteHardbounces") + return nil, reportError("deleteHardbounces should be DeleteHardbounces") } localVarPostBody = &localVarOptionalDeleteHardbounces } @@ -428,7 +436,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -441,7 +449,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -460,34 +468,37 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageId - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + + */ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -495,6 +506,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -532,7 +544,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -545,7 +557,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -564,44 +576,47 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete an inactive email template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param templateId id of the template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId id of the template + + */ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, templateId int64) (*http.Response, error) { var ( @@ -609,6 +624,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -646,7 +662,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -659,7 +675,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -678,41 +694,42 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService 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 * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -725,19 +742,19 @@ This endpoint will show the aggregated stats for past 90 days by default if  @return GetAggregatedReport */ -type GetAggregatedSmtpReportOpts struct { +type GetAggregatedSmtpReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *GetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAggregatedReport ) @@ -787,7 +804,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -800,7 +817,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -821,59 +838,59 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAggregatedReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of blocked domains Get the list of blocked domains - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetBlockedDomains */ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (GetBlockedDomains, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetBlockedDomains ) @@ -911,7 +928,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -924,7 +941,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -945,36 +962,36 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetBlockedDomains - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -994,26 +1011,26 @@ This endpoint will show the aggregated stats for past 30 days by default if  @return GetEmailEventReport */ -type GetEmailEventReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Email optional.String - Event optional.String - Tags optional.String - MessageId optional.String +type GetEmailEventReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Email optional.String + Event optional.String + Tags optional.String + MessageId optional.String TemplateId optional.Int64 - Sort optional.String + Sort optional.String } func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *GetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailEventReport ) @@ -1084,7 +1101,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1097,7 +1114,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1118,47 +1135,47 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Fetch scheduled emails by batchId Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1174,21 +1191,21 @@ Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) @return GetScheduledEmailByBatchId */ -type GetScheduledEmailByBatchIdOpts struct { +type GetScheduledEmailByBatchIdOpts struct { StartDate optional.String - EndDate optional.String - Sort optional.String - Status optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Sort optional.String + Status optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.Context, batchId string, localVarOptionals *GetScheduledEmailByBatchIdOpts) (GetScheduledEmailByBatchId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetScheduledEmailByBatchId ) @@ -1245,7 +1262,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1258,7 +1275,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1279,58 +1296,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetScheduledEmailByBatchId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Fetch scheduled email by messageId Fetch scheduled email by messageId (Can retrieve data upto 30 days old) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1342,17 +1359,17 @@ Fetch scheduled email by messageId (Can retrieve data upto 30 days old) @return GetScheduledEmailByMessageId */ -type GetScheduledEmailByMessageIdOpts struct { +type GetScheduledEmailByMessageIdOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context.Context, messageId string, localVarOptionals *GetScheduledEmailByMessageIdOpts) (GetScheduledEmailByMessageId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetScheduledEmailByMessageId ) @@ -1397,7 +1414,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1410,7 +1427,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1431,58 +1448,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetScheduledEmailByMessageId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get your transactional email activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmtpReportOpts - Optional Parameters: @@ -1497,22 +1514,22 @@ TransactionalEmailsApiService Get your transactional email activity aggregated p @return GetReports */ -type GetSmtpReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 +type GetSmtpReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *GetSmtpReportOpts) (GetReports, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetReports ) @@ -1571,7 +1588,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1584,7 +1601,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1605,59 +1622,59 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetReports - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Returns the template information - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param templateId id of the template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId id of the template @return GetSmtpTemplateOverview */ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, templateId int64) (GetSmtpTemplateOverview, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplateOverview ) @@ -1696,7 +1713,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1709,7 +1726,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1730,58 +1747,58 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplateOverview - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of email templates * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmtpTemplatesOpts - Optional Parameters: @@ -1793,19 +1810,19 @@ TransactionalEmailsApiService Get the list of email templates @return GetSmtpTemplates */ -type GetSmtpTemplatesOpts struct { +type GetSmtpTemplatesOpts struct { TemplateStatus optional.Bool - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *GetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplates ) @@ -1855,7 +1872,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1868,7 +1885,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1889,47 +1906,47 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplates - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of blocked or unsubscribed transactional contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacBlockedContactsOpts - Optional Parameters: @@ -1943,21 +1960,21 @@ TransactionalEmailsApiService Get the list of blocked or unsubscribed transactio @return GetTransacBlockedContacts */ -type GetTransacBlockedContactsOpts struct { +type GetTransacBlockedContactsOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Senders optional.Interface - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Senders optional.Interface + Sort optional.String } func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Context, localVarOptionals *GetTransacBlockedContactsOpts) (GetTransacBlockedContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacBlockedContacts ) @@ -2013,7 +2030,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2026,7 +2043,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2047,59 +2064,59 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacBlockedContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the personalized content of a sent transactional email - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param uuid Unique id of the transactional email that has been sent to a particular contact + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid Unique id of the transactional email that has been sent to a particular contact @return GetTransacEmailContent */ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Context, uuid string) (GetTransacEmailContent, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailContent ) @@ -2138,7 +2155,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2151,7 +2168,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2172,36 +2189,36 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailContent - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -2218,23 +2235,23 @@ This endpoint will show the list of emails for past 30 days by default. To retri @return GetTransacEmailsList */ -type GetTransacEmailsListOpts struct { - Email optional.String +type GetTransacEmailsListOpts struct { + Email optional.String TemplateId optional.Int64 - MessageId optional.String - StartDate optional.String - EndDate optional.String - Sort optional.String - Limit optional.Int64 - Offset optional.Int64 + MessageId optional.String + StartDate optional.String + EndDate optional.String + Sort optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *GetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailsList ) @@ -2296,7 +2313,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2309,7 +2326,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2330,51 +2347,53 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Send a template to your test list - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param templateId Id of the template - - @param sendTestEmail + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId Id of the template + * @param sendTestEmail + + */ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, templateId int64, sendTestEmail SendTestEmail) (*http.Response, error) { var ( @@ -2382,6 +2401,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -2421,7 +2441,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2434,7 +2454,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2453,53 +2473,54 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Send a transactional email - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param sendSmtpEmail Values to send a transactional email + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sendSmtpEmail Values to send a transactional email @return CreateSmtpEmail */ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, sendSmtpEmail SendSmtpEmail) (CreateSmtpEmail, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSmtpEmail ) @@ -2539,7 +2560,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2552,7 +2573,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2573,61 +2594,63 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateSmtpEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 202 { var v ScheduleSmtpEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Unblock or resubscribe a transactional contact - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param email contact email (urlencoded) to unblock. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param email contact email (urlencoded) to unblock. + + */ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx context.Context, email string) (*http.Response, error) { var ( @@ -2635,6 +2658,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -2672,7 +2696,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2685,7 +2709,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2704,56 +2728,60 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete an SMTP transactional log - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param messageId MessageId of the transactional log to delete + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param identifier MessageId or Email of the transactional log(s) to delete + + */ -func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Context, messageId string) (*http.Response, error) { +func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Context, identifier string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/smtp/log/{messageId}" - localVarPath = strings.Replace(localVarPath, "{"+"messageId"+"}", fmt.Sprintf("%v", messageId), -1) + localVarPath := a.client.cfg.BasePath + "/smtp/log/{identifier}" + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2786,7 +2814,7 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2799,7 +2827,7 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2818,45 +2846,48 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Update an email template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param templateId id of the template - - @param smtpTemplate values to update in transactional email template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId id of the template + * @param smtpTemplate values to update in transactional email template + + */ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, templateId int64, smtpTemplate UpdateSmtpTemplate) (*http.Response, error) { var ( @@ -2864,6 +2895,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -2903,7 +2935,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2916,7 +2948,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2935,34 +2967,35 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_transactional_sms.go b/lib/api_transactional_sms.go index 604d8a9..621f5c9 100644 --- a/lib/api_transactional_sms.go +++ b/lib/api_transactional_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" @@ -16,7 +16,6 @@ import ( "net/http" "net/url" "strings" - "github.com/antihax/optional" ) @@ -27,7 +26,7 @@ var ( type TransactionalSMSApiService service -/* +/* TransactionalSMSApiService Get all your SMS activity (unaggregated events) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmsEventsOpts - Optional Parameters: @@ -44,24 +43,24 @@ TransactionalSMSApiService Get all your SMS activity (unaggregated events) @return GetSmsEventReport */ -type GetSmsEventsOpts struct { - Limit optional.Int64 - StartDate optional.String - EndDate optional.String - Offset optional.Int64 - Days optional.Int64 +type GetSmsEventsOpts struct { + Limit optional.Int64 + StartDate optional.String + EndDate optional.String + Offset optional.Int64 + Days optional.Int64 PhoneNumber optional.String - Event optional.String - Tags optional.String - Sort optional.String + Event optional.String + Tags optional.String + Sort optional.String } func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *GetSmsEventsOpts) (GetSmsEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsEventReport ) @@ -126,7 +125,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -139,7 +138,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -160,47 +159,47 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Get your SMS activity aggregated over a period of time * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacAggregatedSmsReportOpts - Optional Parameters: @@ -212,19 +211,19 @@ TransactionalSMSApiService Get your SMS activity aggregated over a period of tim @return GetTransacAggregatedSmsReport */ -type GetTransacAggregatedSmsReportOpts struct { +type GetTransacAggregatedSmsReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.Context, localVarOptionals *GetTransacAggregatedSmsReportOpts) (GetTransacAggregatedSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacAggregatedSmsReport ) @@ -274,7 +273,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -287,7 +286,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -308,47 +307,47 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacAggregatedSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Get your SMS activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacSmsReportOpts - Optional Parameters: @@ -361,20 +360,20 @@ TransactionalSMSApiService Get your SMS activity aggregated per day @return GetTransacSmsReport */ -type GetTransacSmsReportOpts struct { +type GetTransacSmsReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *GetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacSmsReport ) @@ -427,7 +426,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -440,7 +439,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -461,59 +460,59 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Send SMS message to a mobile number - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param sendTransacSms Values to send a transactional SMS + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sendTransacSms Values to send a transactional SMS @return SendSms */ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTransacSms SendTransacSms) (SendSms, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SendSms ) @@ -553,7 +552,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -566,7 +565,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -587,51 +586,51 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v SendSms - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_transactional_whats_app.go b/lib/api_transactional_whats_app.go index 790da7c..8064fee 100644 --- a/lib/api_transactional_whats_app.go +++ b/lib/api_transactional_whats_app.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" @@ -16,7 +16,6 @@ import ( "net/http" "net/url" "strings" - "github.com/antihax/optional" ) @@ -27,16 +26,16 @@ var ( type TransactionalWhatsAppApiService service -/* +/* TransactionalWhatsAppApiService 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) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsappEventReportOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number limitation for the result returned * @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from - * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate - * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate + * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ * @param "ContactNumber" (optional.String) - Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) * @param "Event" (optional.String) - Filter the report for a specific event type * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed @@ -44,23 +43,23 @@ This endpoint will show the unaggregated statistics for WhatsApp activity (30 da @return GetWhatsappEventReport */ -type GetWhatsappEventReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 +type GetWhatsappEventReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 ContactNumber optional.String - Event optional.String - Sort optional.String + Event optional.String + Sort optional.String } func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Context, localVarOptionals *GetWhatsappEventReportOpts) (GetWhatsappEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappEventReport ) @@ -122,7 +121,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -135,7 +134,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -156,61 +155,61 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalWhatsAppApiService Send a WhatsApp message This endpoint is used to send a WhatsApp message. <br/>(**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.**) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param sendWhatsappMessage Values to send WhatsApp message + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sendWhatsappMessage Values to send WhatsApp message -@return InlineResponse2012 +@return InlineResponse2014 */ -func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Context, sendWhatsappMessage SendWhatsappMessage) (InlineResponse2012, *http.Response, error) { +func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Context, sendWhatsappMessage SendWhatsappMessage) (InlineResponse2014, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2012 + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2014 ) // create path and map variables @@ -249,7 +248,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -262,7 +261,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -283,40 +282,40 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { - var v InlineResponse2012 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + var v InlineResponse2014 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_user.go b/lib/api_user.go new file mode 100644 index 0000000..e8a7e91 --- /dev/null +++ b/lib/api_user.go @@ -0,0 +1,781 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type UserApiService service + +/* +UserApiService 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param updatePermissions Values to update permissions for an invited user + +@return Inviteuser +*/ +func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissions Inviteuser) (Inviteuser, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Inviteuser + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/user/update/permissions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updatePermissions + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Inviteuser + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +UserApiService Get the list of all your users + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return GetInvitedUsersList +*/ +func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUsersList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetInvitedUsersList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/invited/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetInvitedUsersList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +UserApiService Check user permission + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param email Email of the invited user. + +@return GetUserPermission +*/ +func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (GetUserPermission, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetUserPermission + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/user/{email}/permissions" + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetUserPermission + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +UserApiService 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sendInvitation Values to create an invitation + +@return Inviteuser +*/ +func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteuser) (Inviteuser, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Inviteuser + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/user/invitation/send" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &sendInvitation + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Inviteuser + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +UserApiService Revoke user permission + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param email Email of the invited user. + +@return PutRevokeUserPermission +*/ +func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email string) (PutRevokeUserPermission, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PutRevokeUserPermission + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/user/invitation/revoke/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PutRevokeUserPermission + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +UserApiService Resend / Cancel invitation + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param action action + * @param email Email of the invited user. + +@return Putresendcancelinvitation +*/ +func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action string, email string) (Putresendcancelinvitation, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Putresendcancelinvitation + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/organization/user/invitation/{action}/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"action"+"}", fmt.Sprintf("%v", action), -1) + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", fmt.Sprintf("%v", email), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Putresendcancelinvitation + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_webhooks.go b/lib/api_webhooks.go index 0c0cf41..7d5d3a9 100644 --- a/lib/api_webhooks.go +++ b/lib/api_webhooks.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,19 +27,19 @@ var ( type WebhooksApiService service -/* +/* WebhooksApiService Create a webhook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param createWebhook Values to create a webhook + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param createWebhook Values to create a webhook @return CreateModel */ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook CreateWebhook) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -80,7 +79,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +92,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -114,50 +113,52 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Delete a webhook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param webhookId Id of the webhook + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param webhookId Id of the webhook + + */ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) (*http.Response, error) { var ( @@ -165,6 +166,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -202,7 +204,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -215,7 +217,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -234,54 +236,55 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* -WebhooksApiService Export all transactional events -This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download that CSV file will send to the webhook link provided in notifyURL of the body payload. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param exportWebhookHistory Values to submit for webhooks history +/* +WebhooksApiService 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. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param exportWebhookHistory Values to submit for webhooks history @return CreatedProcessId */ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWebhookHistory ExportWebhooksHistory) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -321,7 +324,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -334,7 +337,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -355,59 +358,59 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Get a webhook details - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param webhookId Id of the webhook + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param webhookId Id of the webhook @return GetWebhook */ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (GetWebhook, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhook ) @@ -446,7 +449,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -459,7 +462,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -480,58 +483,58 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWebhook - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Get all webhooks * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWebhooksOpts - Optional Parameters: @@ -541,17 +544,17 @@ WebhooksApiService Get all webhooks @return GetWebhooks */ -type GetWebhooksOpts struct { +type GetWebhooksOpts struct { Type_ optional.String - Sort optional.String + Sort optional.String } func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *GetWebhooksOpts) (GetWebhooks, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhooks ) @@ -595,7 +598,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -608,7 +611,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -629,51 +632,53 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWebhooks - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Update a webhook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param webhookId Id of the webhook - - @param updateWebhook Values to update a webhook + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param webhookId Id of the webhook + * @param updateWebhook Values to update a webhook + + */ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, updateWebhook UpdateWebhook) (*http.Response, error) { var ( @@ -681,6 +686,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -720,7 +726,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -733,7 +739,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -752,34 +758,35 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_whats_app_campaigns.go b/lib/api_whats_app_campaigns.go index 4e18884..a9ea966 100644 --- a/lib/api_whats_app_campaigns.go +++ b/lib/api_whats_app_campaigns.go @@ -1,23 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" "strings" - + "fmt" "github.com/antihax/optional" ) @@ -28,19 +27,19 @@ var ( type WhatsAppCampaignsApiService service -/* +/* WhatsAppCampaignsApiService Create and Send a WhatsApp campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param whatsAppCampaigns Values to create a campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param whatsAppCampaigns Values to create a campaign @return CreateModel */ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context, whatsAppCampaigns CreateWhatsAppCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -80,7 +79,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +92,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -114,59 +113,59 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Create a WhatsApp template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param whatsAppTemplates Values to create a template + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param whatsAppTemplates Values to create a template @return CreateModel */ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context, whatsAppTemplates CreateWhatsAppTemplate) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -206,7 +205,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -219,7 +218,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -240,50 +239,52 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Delete a WhatsApp campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId id of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId id of the campaign + + */ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -291,6 +292,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + ) // create path and map variables @@ -328,7 +330,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -341,7 +343,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -360,53 +362,54 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Get a WhatsApp campaign - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param campaignId Id of the campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign @return GetWhatsappCampaignOverview */ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, campaignId int64) (GetWhatsappCampaignOverview, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappCampaignOverview ) @@ -445,7 +448,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -458,7 +461,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -479,63 +482,63 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappCampaignOverview - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Return all your created WhatsApp campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsAppCampaignsOpts - Optional Parameters: - * @param "StartDate" (optional.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** - * @param "EndDate" (optional.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** + * @param "StartDate" (optional.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** + * @param "EndDate" (optional.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** * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed @@ -543,20 +546,20 @@ WhatsAppCampaignsApiService Return all your created WhatsApp campaigns @return GetWhatsappCampaigns */ -type GetWhatsAppCampaignsOpts struct { +type GetWhatsAppCampaignsOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, localVarOptionals *GetWhatsAppCampaignsOpts) (GetWhatsappCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappCampaigns ) @@ -609,7 +612,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -622,7 +625,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -643,58 +646,58 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Get your WhatsApp API account information - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetWhatsAppConfig */ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (GetWhatsAppConfig, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsAppConfig ) @@ -732,7 +735,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -745,7 +748,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -766,73 +769,75 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsAppConfig - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Return all your created WhatsApp templates * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsAppTemplatesOpts - Optional Parameters: - * @param "StartDate" (optional.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** - * @param "EndDate" (optional.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** + * @param "StartDate" (optional.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** + * @param "EndDate" (optional.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** * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed + * @param "Source" (optional.String) - source of the template @return GetWaTemplates */ -type GetWhatsAppTemplatesOpts struct { +type GetWhatsAppTemplatesOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Source optional.String } func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, localVarOptionals *GetWhatsAppTemplatesOpts) (GetWaTemplates, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWaTemplates ) @@ -858,6 +863,9 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.Source.IsSet() { + localVarQueryParams.Add("source", parameterToString(localVarOptionals.Source.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} @@ -885,7 +893,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -898,7 +906,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -919,42 +927,283 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWaTemplates - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +WhatsAppCampaignsApiService Send your WhatsApp template for approval + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId id of the campaign + + +*/ +func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.Context, templateId int64) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/whatsappCampaigns/template/approval/{templateId}" + localVarPath = strings.Replace(localVarPath, "{"+"templateId"+"}", fmt.Sprintf("%v", templateId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr + localVarHeaderParams["partner-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +WhatsAppCampaignsApiService Update a WhatsApp campaign + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param campaignId Id of the campaign + * @param optional nil or *UpdateWhatsAppCampaignOpts - Optional Parameters: + * @param "WhatsAppCampaign" (optional.Interface of UpdateWhatsAppCampaign) - values to update WhatsApp Campaign + + +*/ + +type UpdateWhatsAppCampaignOpts struct { + WhatsAppCampaign optional.Interface +} + +func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context, campaignId int64, localVarOptionals *UpdateWhatsAppCampaignOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/whatsappCampaigns/{campaignId}" + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", fmt.Sprintf("%v", campaignId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + if localVarOptionals != nil && localVarOptionals.WhatsAppCampaign.IsSet() { + + localVarOptionalWhatsAppCampaign, localVarOptionalWhatsAppCampaignok := localVarOptionals.WhatsAppCampaign.Value().(UpdateWhatsAppCampaign) + if !localVarOptionalWhatsAppCampaignok { + return nil, reportError("whatsAppCampaign should be UpdateWhatsAppCampaign") + } + localVarPostBody = &localVarOptionalWhatsAppCampaign + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr + localVarHeaderParams["partner-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } - return localVarReturnValue, localVarHttpResponse, newErr + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err } - return localVarReturnValue, localVarHttpResponse, nil + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil } diff --git a/lib/client.go b/lib/client.go index 5af904d..9b71b04 100644 --- a/lib/client.go +++ b/lib/client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "bytes" @@ -54,6 +54,8 @@ type APIClient struct { ConversationsApi *ConversationsApiService + CouponsApi *CouponsApiService + DealsApi *DealsApiService DomainsApi *DomainsApiService @@ -62,6 +64,8 @@ type APIClient struct { EmailCampaignsApi *EmailCampaignsApiService + EventsApi *EventsApiService + ExternalFeedsApi *ExternalFeedsApiService FilesApi *FilesApiService @@ -72,6 +76,8 @@ type APIClient struct { NotesApi *NotesApiService + PaymentsApi *PaymentsApiService + ProcessApi *ProcessApiService ResellerApi *ResellerApiService @@ -88,6 +94,8 @@ type APIClient struct { TransactionalWhatsAppApi *TransactionalWhatsAppApiService + UserApi *UserApiService + WebhooksApi *WebhooksApiService WhatsAppCampaignsApi *WhatsAppCampaignsApiService @@ -113,15 +121,18 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.CompaniesApi = (*CompaniesApiService)(&c.common) c.ContactsApi = (*ContactsApiService)(&c.common) c.ConversationsApi = (*ConversationsApiService)(&c.common) + c.CouponsApi = (*CouponsApiService)(&c.common) c.DealsApi = (*DealsApiService)(&c.common) c.DomainsApi = (*DomainsApiService)(&c.common) c.EcommerceApi = (*EcommerceApiService)(&c.common) c.EmailCampaignsApi = (*EmailCampaignsApiService)(&c.common) + c.EventsApi = (*EventsApiService)(&c.common) c.ExternalFeedsApi = (*ExternalFeedsApiService)(&c.common) c.FilesApi = (*FilesApiService)(&c.common) c.InboundParsingApi = (*InboundParsingApiService)(&c.common) c.MasterAccountApi = (*MasterAccountApiService)(&c.common) c.NotesApi = (*NotesApiService)(&c.common) + c.PaymentsApi = (*PaymentsApiService)(&c.common) c.ProcessApi = (*ProcessApiService)(&c.common) c.ResellerApi = (*ResellerApiService)(&c.common) c.SMSCampaignsApi = (*SMSCampaignsApiService)(&c.common) @@ -130,6 +141,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.TransactionalEmailsApi = (*TransactionalEmailsApiService)(&c.common) c.TransactionalSMSApi = (*TransactionalSMSApiService)(&c.common) c.TransactionalWhatsAppApi = (*TransactionalWhatsAppApiService)(&c.common) + c.UserApi = (*UserApiService)(&c.common) c.WebhooksApi = (*WebhooksApiService)(&c.common) c.WhatsAppCampaignsApi = (*WhatsAppCampaignsApiService)(&c.common) @@ -367,17 +379,17 @@ func (c *APIClient) prepareRequest( } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if strings.Contains(contentType, "application/xml") { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } else if strings.Contains(contentType, "application/json") { - if err = json.Unmarshal(b, v); err != nil { - return err + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil } - return nil - } return errors.New("undefined response type") } @@ -528,4 +540,4 @@ func (e GenericSwaggerError) Body() []byte { // Model returns the unpacked model of the error func (e GenericSwaggerError) Model() interface{} { return e.model -} +} \ No newline at end of file diff --git a/lib/configuration.go b/lib/configuration.go index 359e04c..c248265 100644 --- a/lib/configuration.go +++ b/lib/configuration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "net/http" @@ -63,7 +63,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://api.brevo.com/v3", DefaultHeader: make(map[string]string), - UserAgent: "brevo_clientAPI/v1.0.0/go", + UserAgent: "Swagger-Codegen/1.0.0/go", } return cfg } diff --git a/lib/model_ab_test_campaign_result.go b/lib/model_ab_test_campaign_result.go index 3fb37d2..cc0f878 100644 --- a/lib/model_ab_test_campaign_result.go +++ b/lib/model_ab_test_campaign_result.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AbTestCampaignResult struct { // 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. @@ -22,7 +22,7 @@ type AbTestCampaignResult struct { // Click rate for current winning version ClickRate string `json:"clickRate,omitempty"` // Open/Click rate for the winner version - WinningVersionRate string `json:"winningVersionRate,omitempty"` - Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` - ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` + WinningVersionRate string `json:"winningVersionRate,omitempty"` + Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` + ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` } diff --git a/lib/model_ab_test_campaign_result_clicked_links.go b/lib/model_ab_test_campaign_result_clicked_links.go index 950468a..6482f57 100644 --- a/lib/model_ab_test_campaign_result_clicked_links.go +++ b/lib/model_ab_test_campaign_result_clicked_links.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AbTestCampaignResultClickedLinks struct { VersionA *AbTestVersionClicks `json:"Version A"` diff --git a/lib/model_ab_test_campaign_result_statistics.go b/lib/model_ab_test_campaign_result_statistics.go index c79dc88..9a9adb3 100644 --- a/lib/model_ab_test_campaign_result_statistics.go +++ b/lib/model_ab_test_campaign_result_statistics.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AbTestCampaignResultStatistics struct { - Openers *AbTestVersionStats `json:"openers"` - Clicks *AbTestVersionStats `json:"clicks"` + Openers *AbTestVersionStats `json:"openers"` + Clicks *AbTestVersionStats `json:"clicks"` Unsubscribed *AbTestVersionStats `json:"unsubscribed"` - HardBounces *AbTestVersionStats `json:"hardBounces"` - SoftBounces *AbTestVersionStats `json:"softBounces"` - Complaints *AbTestVersionStats `json:"complaints"` + HardBounces *AbTestVersionStats `json:"hardBounces"` + SoftBounces *AbTestVersionStats `json:"softBounces"` + Complaints *AbTestVersionStats `json:"complaints"` } diff --git a/lib/model_ab_test_version_clicks.go b/lib/model_ab_test_version_clicks.go index 4abf56e..f11a070 100644 --- a/lib/model_ab_test_version_clicks.go +++ b/lib/model_ab_test_version_clicks.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Information on clicked links for a particular version type AbTestVersionClicks struct { diff --git a/lib/model_ab_test_version_clicks_inner.go b/lib/model_ab_test_version_clicks_inner.go index 1415923..2d87c65 100644 --- a/lib/model_ab_test_version_clicks_inner.go +++ b/lib/model_ab_test_version_clicks_inner.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AbTestVersionClicksInner struct { // URL of the link diff --git a/lib/model_ab_test_version_stats.go b/lib/model_ab_test_version_stats.go index 8786919..a358aed 100644 --- a/lib/model_ab_test_version_stats.go +++ b/lib/model_ab_test_version_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Percentage of a particular event for both versions type AbTestVersionStats struct { diff --git a/lib/model_add_child_domain.go b/lib/model_add_child_domain.go index a9903e2..37e80a8 100644 --- a/lib/model_add_child_domain.go +++ b/lib/model_add_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AddChildDomain struct { // Sender domain to add for a specific child account diff --git a/lib/model_add_contact_to_list.go b/lib/model_add_contact_to_list.go index 40d2d7e..74041db 100644 --- a/lib/model_add_contact_to_list.go +++ b/lib/model_add_contact_to_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AddContactToList struct { // 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. diff --git a/lib/model_add_credits.go b/lib/model_add_credits.go index b31c0eb..051dd5e 100644 --- a/lib/model_add_credits.go +++ b/lib/model_add_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AddCredits struct { // Required if email credits are empty. SMS credits to be added to the child account diff --git a/lib/model_authenticate_domain_model.go b/lib/model_authenticate_domain_model.go index 1a98389..48c251a 100644 --- a/lib/model_authenticate_domain_model.go +++ b/lib/model_authenticate_domain_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type AuthenticateDomainModel struct { // Domain diff --git a/lib/model_block_domain.go b/lib/model_block_domain.go index 07b6ff4..cfb1430 100644 --- a/lib/model_block_domain.go +++ b/lib/model_block_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type BlockDomain struct { // name of the domain to be blocked diff --git a/lib/model_body.go b/lib/model_body.go index eb35592..be74cb6 100644 --- a/lib/model_body.go +++ b/lib/model_body.go @@ -1,20 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body struct { - // Name of company - Name string `json:"name"` - // Attributes for company creation - Attributes map[string]interface{} `json:"attributes,omitempty"` - // Country code if phone_number is passed in attributes. - CountryCode int64 `json:"countryCode,omitempty"` + // The name of the group of sub-accounts + GroupName string `json:"groupName"` + // Pass the list of sub-account Ids to be included in the group + SubAccountIds []int64 `json:"subAccountIds,omitempty"` } diff --git a/lib/model_body_1.go b/lib/model_body_1.go index c9908b3..3750e90 100644 --- a/lib/model_body_1.go +++ b/lib/model_body_1.go @@ -1,20 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body1 struct { - // Name of company - Name string `json:"name,omitempty"` - // Attributes for company update - Attributes map[string]interface{} `json:"attributes,omitempty"` - // Country code if phone_number is passed in attributes. - CountryCode int64 `json:"countryCode,omitempty"` + // IP Address + Ip string `json:"ip"` + // Pass the list of sub-account Ids to be associated with the IP address + Ids []int64 `json:"ids"` } diff --git a/lib/model_body_10.go b/lib/model_body_10.go index acf5e96..da18f3d 100644 --- a/lib/model_body_10.go +++ b/lib/model_body_10.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body10 struct { - // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations - VisitorId string `json:"visitorId"` - // message text - Text string `json:"text"` - // agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. - AgentId string `json:"agentId,omitempty"` - // group ID. It can be found on group’s page. Optional if `agentId` is set. - GroupId string `json:"groupId,omitempty"` + // Contact ids for contacts to be linked with deal + LinkContactIds []int64 `json:"linkContactIds,omitempty"` + // Contact ids for contacts to be unlinked from deal + UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"` + // Company ids to be linked with deal + LinkCompanyIds []string `json:"linkCompanyIds,omitempty"` + // Company ids to be unlinked from deal + UnlinkCompanyIds []string `json:"unlinkCompanyIds,omitempty"` } diff --git a/lib/model_body_11.go b/lib/model_body_11.go index 85fb80e..d232b9e 100644 --- a/lib/model_body_11.go +++ b/lib/model_body_11.go @@ -1,16 +1,39 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger + +import ( + "time" +) type Body11 struct { - // edited message text - Text string `json:"text"` + // Name of task + Name string `json:"name"` + // Duration of task in milliseconds [1 minute = 60000 ms] + Duration int64 `json:"duration,omitempty"` + // Id for type of task e.g Call / Email / Meeting etc. + TaskTypeId string `json:"taskTypeId"` + // Task due date and time + Date time.Time `json:"date"` + // Notes added to a task + Notes string `json:"notes,omitempty"` + // Task marked as done + Done bool `json:"done,omitempty"` + // To assign a task to a user you can use either the account email or ID. + AssignToId string `json:"assignToId,omitempty"` + // Contact ids for contacts linked to this task + ContactsIds []int32 `json:"contactsIds,omitempty"` + // Deal ids for deals a task is linked to + DealsIds []string `json:"dealsIds,omitempty"` + // Companies ids for companies a task is linked to + CompaniesIds []string `json:"companiesIds,omitempty"` + Reminder *TaskReminder `json:"reminder,omitempty"` } diff --git a/lib/model_body_12.go b/lib/model_body_12.go index 6f793ae..f8f216a 100644 --- a/lib/model_body_12.go +++ b/lib/model_body_12.go @@ -1,22 +1,38 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger + +import ( + "time" +) type Body12 struct { - // 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). - AgentId string `json:"agentId,omitempty"` - // mark your messages to distinguish messages created by you from the others. - ReceivedFrom string `json:"receivedFrom,omitempty"` - // 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. - AgentEmail string `json:"agentEmail,omitempty"` - // agent name. - AgentName string `json:"agentName,omitempty"` + // Name of task + Name string `json:"name,omitempty"` + // Duration of task in milliseconds [1 minute = 60000 ms] + Duration int32 `json:"duration,omitempty"` + // Id for type of task e.g Call / Email / Meeting etc. + TaskTypeId string `json:"taskTypeId,omitempty"` + // Task date/time + Date time.Time `json:"date,omitempty"` + // Notes added to a task + Notes string `json:"notes,omitempty"` + // Task marked as done + Done bool `json:"done,omitempty"` + // To assign a task to a user you can use either the account email or ID. + AssignToId string `json:"assignToId,omitempty"` + // Contact ids for contacts linked to this task + ContactsIds []int32 `json:"contactsIds,omitempty"` + // Deal ids for deals a task is linked to + DealsIds []string `json:"dealsIds,omitempty"` + // Companies ids for companies a task is linked to + CompaniesIds []string `json:"companiesIds,omitempty"` } diff --git a/lib/model_body_13.go b/lib/model_body_13.go new file mode 100644 index 0000000..61702bd --- /dev/null +++ b/lib/model_body_13.go @@ -0,0 +1,26 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Body13 struct { + // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + VisitorId string `json:"visitorId"` + // message text + Text string `json:"text"` + // agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + AgentId string `json:"agentId,omitempty"` + // mark your messages to distinguish messages created by you from the others. + ReceivedFrom string `json:"receivedFrom,omitempty"` + // 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. + AgentEmail string `json:"agentEmail,omitempty"` + // agent name + AgentName string `json:"agentName,omitempty"` +} diff --git a/lib/model_body_14.go b/lib/model_body_14.go new file mode 100644 index 0000000..8a9b20c --- /dev/null +++ b/lib/model_body_14.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Body14 struct { + // edited message text + Text string `json:"text"` +} diff --git a/lib/model_body_15.go b/lib/model_body_15.go new file mode 100644 index 0000000..642dd7a --- /dev/null +++ b/lib/model_body_15.go @@ -0,0 +1,22 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Body15 struct { + // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + VisitorId string `json:"visitorId"` + // message text + Text string `json:"text"` + // agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. + AgentId string `json:"agentId,omitempty"` + // group ID. It can be found on group’s page. Optional if `agentId` is set. + GroupId string `json:"groupId,omitempty"` +} diff --git a/lib/model_body_16.go b/lib/model_body_16.go new file mode 100644 index 0000000..fb899a7 --- /dev/null +++ b/lib/model_body_16.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Body16 struct { + // edited message text + Text string `json:"text"` +} diff --git a/lib/model_body_17.go b/lib/model_body_17.go new file mode 100644 index 0000000..e258872 --- /dev/null +++ b/lib/model_body_17.go @@ -0,0 +1,22 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Body17 struct { + // 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). + AgentId string `json:"agentId,omitempty"` + // mark your messages to distinguish messages created by you from the others. + ReceivedFrom string `json:"receivedFrom,omitempty"` + // 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. + AgentEmail string `json:"agentEmail,omitempty"` + // agent name. + AgentName string `json:"agentName,omitempty"` +} diff --git a/lib/model_body_2.go b/lib/model_body_2.go index 671a9fe..275fd67 100644 --- a/lib/model_body_2.go +++ b/lib/model_body_2.go @@ -1,22 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body2 struct { - // Contact ids for contacts to be linked with company - LinkContactIds []int64 `json:"linkContactIds,omitempty"` - // Contact ids for contacts to be unlinked from company - UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"` - // Deals ids for deals to be linked with company - LinkDealsIds []string `json:"linkDealsIds,omitempty"` - // Deals ids for deals to be unlinked from company - UnlinkDealsIds []string `json:"unlinkDealsIds,omitempty"` + // IP Address + Ip string `json:"ip"` + // Pass the list of sub-account Ids to be dissociated from the IP address + Ids []int64 `json:"ids"` } diff --git a/lib/model_body_3.go b/lib/model_body_3.go index 708ba3f..5ad4166 100644 --- a/lib/model_body_3.go +++ b/lib/model_body_3.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body3 struct { - // Name of deal - Name string `json:"name"` - // Attributes fo\\r deal creation - Attributes map[string]interface{} `json:"attributes,omitempty"` + // The name of the group of sub-accounts + GroupName string `json:"groupName"` + // Pass the list of sub-account Ids to be included in the group + SubAccountIds []int64 `json:"subAccountIds,omitempty"` } diff --git a/lib/model_body_4.go b/lib/model_body_4.go index 2aad472..a952ff6 100644 --- a/lib/model_body_4.go +++ b/lib/model_body_4.go @@ -1,18 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body4 struct { - // Name of deal - Name string `json:"name,omitempty"` - // Attributes for deal update - Attributes map[string]interface{} `json:"attributes,omitempty"` + // List of sub-account ids + SubAccountIds []int64 `json:"subAccountIds"` } diff --git a/lib/model_body_5.go b/lib/model_body_5.go index e64e1f2..a5e50b4 100644 --- a/lib/model_body_5.go +++ b/lib/model_body_5.go @@ -1,22 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body5 struct { - // Contact ids for contacts to be linked with deal - LinkContactIds []int64 `json:"linkContactIds,omitempty"` - // Contact ids for contacts to be unlinked from deal - UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"` - // Company ids to be linked with deal - LinkCompanyIds []string `json:"linkCompanyIds,omitempty"` - // Company ids to be unlinked from deal - UnlinkCompanyIds []string `json:"unlinkCompanyIds,omitempty"` + // Name of company + Name string `json:"name"` + // Attributes for company creation + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Country code if phone_number is passed in attributes. + CountryCode int64 `json:"countryCode,omitempty"` + // Contact ids to be linked with company + LinkedContactsIds []int64 `json:"linkedContactsIds,omitempty"` + // Deal ids to be linked with company + LinkedDealsIds []string `json:"linkedDealsIds,omitempty"` } diff --git a/lib/model_body_6.go b/lib/model_body_6.go index c61ebf3..82ff68e 100644 --- a/lib/model_body_6.go +++ b/lib/model_body_6.go @@ -1,39 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib - -import ( - "time" -) +package swagger type Body6 struct { - // Name of task - Name string `json:"name"` - // Duration of task in milliseconds [1 minute = 60000 ms] - Duration int64 `json:"duration,omitempty"` - // Id for type of task e.g Call / Email / Meeting etc. - TaskTypeId string `json:"taskTypeId"` - // Task due date and time - Date time.Time `json:"date"` - // Notes added to a task - Notes string `json:"notes,omitempty"` - // Task marked as done - Done bool `json:"done,omitempty"` - // User id to whom task is assigned - AssignToId string `json:"assignToId,omitempty"` - // Contact ids for contacts linked to this task - ContactsIds []int32 `json:"contactsIds,omitempty"` - // Deal ids for deals a task is linked to - DealsIds []string `json:"dealsIds,omitempty"` - // Companies ids for companies a task is linked to - CompaniesIds []string `json:"companiesIds,omitempty"` - Reminder *TaskReminder `json:"reminder,omitempty"` + // Name of company + Name string `json:"name,omitempty"` + // Attributes for company update + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Country code if phone_number is passed in attributes. + CountryCode int64 `json:"countryCode,omitempty"` } diff --git a/lib/model_body_7.go b/lib/model_body_7.go index 7ac7851..e8e7667 100644 --- a/lib/model_body_7.go +++ b/lib/model_body_7.go @@ -1,38 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib - -import ( - "time" -) +package swagger type Body7 struct { - // Name of task - Name string `json:"name,omitempty"` - // Duration of task in milliseconds [1 minute = 60000 ms] - Duration int32 `json:"duration,omitempty"` - // Id for type of task e.g Call / Email / Meeting etc. - TaskTypeId string `json:"taskTypeId,omitempty"` - // Task date/time - Date time.Time `json:"date,omitempty"` - // Notes added to a task - Notes string `json:"notes,omitempty"` - // Task marked as done - Done bool `json:"done,omitempty"` - // User id to whom task is assigned - AssignToId string `json:"assignToId,omitempty"` - // Contact ids for contacts linked to this task - ContactsIds []int32 `json:"contactsIds,omitempty"` - // Deal ids for deals a task is linked to - DealsIds []string `json:"dealsIds,omitempty"` - // Companies ids for companies a task is linked to - CompaniesIds []string `json:"companiesIds,omitempty"` + // Contact ids for contacts to be linked with company + LinkContactIds []int64 `json:"linkContactIds,omitempty"` + // Contact ids for contacts to be unlinked from company + UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"` + // Deals ids for deals to be linked with company + LinkDealsIds []string `json:"linkDealsIds,omitempty"` + // Deals ids for deals to be unlinked from company + UnlinkDealsIds []string `json:"unlinkDealsIds,omitempty"` } diff --git a/lib/model_body_8.go b/lib/model_body_8.go index 008c243..cf92043 100644 --- a/lib/model_body_8.go +++ b/lib/model_body_8.go @@ -1,26 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body8 struct { - // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations - VisitorId string `json:"visitorId"` - // message text - Text string `json:"text"` - // agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - AgentId string `json:"agentId,omitempty"` - // mark your messages to distinguish messages created by you from the others. - ReceivedFrom string `json:"receivedFrom,omitempty"` - // 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. - AgentEmail string `json:"agentEmail,omitempty"` - // agent name - AgentName string `json:"agentName,omitempty"` + // Name of deal + Name string `json:"name"` + // Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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}` + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Contact ids to be linked with deal + LinkedContactsIds []int64 `json:"linkedContactsIds,omitempty"` + // Company ids to be linked with deal + LinkedCompaniesIds []string `json:"linkedCompaniesIds,omitempty"` } diff --git a/lib/model_body_9.go b/lib/model_body_9.go index bb0d974..c5b45ea 100644 --- a/lib/model_body_9.go +++ b/lib/model_body_9.go @@ -1,16 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Body9 struct { - // edited message text - Text string `json:"text"` + // Name of deal + Name string `json:"name,omitempty"` + // Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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}` + Attributes map[string]interface{} `json:"attributes,omitempty"` } diff --git a/lib/model_body_variables_items.go b/lib/model_body_variables_items.go index feb54a7..930f21d 100644 --- a/lib/model_body_variables_items.go +++ b/lib/model_body_variables_items.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type BodyVariablesItems struct { } diff --git a/lib/model_cart.go b/lib/model_cart.go new file mode 100644 index 0000000..b9b82bc --- /dev/null +++ b/lib/model_cart.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Specify the payment currency and amount. +type Cart struct { + // Currency code for the payment amount. + Currency string `json:"currency"` + // Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. + SpecificAmount int64 `json:"specificAmount"` +} diff --git a/lib/model_companies_list.go b/lib/model_companies_list.go index bb8b2ae..c2ce1f4 100644 --- a/lib/model_companies_list.go +++ b/lib/model_companies_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of companies type CompaniesList struct { diff --git a/lib/model_company.go b/lib/model_company.go index 7ed9f8f..01cd02d 100644 --- a/lib/model_company.go +++ b/lib/model_company.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Company Details type Company struct { diff --git a/lib/model_company_attributes.go b/lib/model_company_attributes.go index 9e07304..b807ac0 100644 --- a/lib/model_company_attributes.go +++ b/lib/model_company_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of company attributes type CompanyAttributes struct { diff --git a/lib/model_company_attributes_inner.go b/lib/model_company_attributes_inner.go index 1017f20..7995148 100644 --- a/lib/model_company_attributes_inner.go +++ b/lib/model_company_attributes_inner.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of attributes type CompanyAttributesInner struct { - InternalName string `json:"internalName,omitempty"` - Label string `json:"label,omitempty"` - AttributeTypeName string `json:"attributeTypeName,omitempty"` - AttributeOptions []interface{} `json:"attributeOptions,omitempty"` - IsRequired bool `json:"isRequired,omitempty"` + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` } diff --git a/lib/model_component_items.go b/lib/model_component_items.go index bb65aef..0514fed 100644 --- a/lib/model_component_items.go +++ b/lib/model_component_items.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ComponentItems struct { Type_ string `json:"type,omitempty"` - Text string `json:"text,omitempty"` + Text string `json:"text,omitempty"` } diff --git a/lib/model_configuration.go b/lib/model_configuration.go new file mode 100644 index 0000000..ed7f675 --- /dev/null +++ b/lib/model_configuration.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated +type Configuration struct { + // Absolute URL of the custom success page. + CustomSuccessUrl string `json:"customSuccessUrl"` +} diff --git a/lib/model_conversations_message.go b/lib/model_conversations_message.go index 25fabbc..eaff1bd 100644 --- a/lib/model_conversations_message.go +++ b/lib/model_conversations_message.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // a Conversations message type ConversationsMessage struct { @@ -29,6 +29,6 @@ type ConversationsMessage struct { // `true` for pushed messages IsPushed bool `json:"isPushed,omitempty"` // 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. - ReceivedFrom string `json:"receivedFrom,omitempty"` - File *ConversationsMessageFile `json:"file,omitempty"` + ReceivedFrom string `json:"receivedFrom,omitempty"` + File *ConversationsMessageFile `json:"file,omitempty"` } diff --git a/lib/model_conversations_message_file.go b/lib/model_conversations_message_file.go index 7cb3876..9422d15 100644 --- a/lib/model_conversations_message_file.go +++ b/lib/model_conversations_message_file.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ConversationsMessageFile struct { // Name of the file @@ -18,6 +18,6 @@ type ConversationsMessageFile struct { // Whether the file is an image IsImage bool `json:"isImage,omitempty"` // URL of the file - Url string `json:"url,omitempty"` + Url string `json:"url,omitempty"` ImageInfo *ConversationsMessageFileImageInfo `json:"imageInfo,omitempty"` } diff --git a/lib/model_conversations_message_file_image_info.go b/lib/model_conversations_message_file_image_info.go index 811bfbd..9bd685d 100644 --- a/lib/model_conversations_message_file_image_info.go +++ b/lib/model_conversations_message_file_image_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // image info is passed in case the file is an image type ConversationsMessageFileImageInfo struct { diff --git a/lib/model_conversion_source_metrics.go b/lib/model_conversion_source_metrics.go new file mode 100644 index 0000000..226bf4e --- /dev/null +++ b/lib/model_conversion_source_metrics.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type ConversionSourceMetrics struct { + Id float32 `json:"id"` + ConversionSource string `json:"conversionSource"` + OrdersCount float32 `json:"ordersCount"` + Revenue float32 `json:"revenue"` + AverageBasket float32 `json:"averageBasket"` +} diff --git a/lib/model_conversion_source_product.go b/lib/model_conversion_source_product.go new file mode 100644 index 0000000..3522bd8 --- /dev/null +++ b/lib/model_conversion_source_product.go @@ -0,0 +1,22 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type ConversionSourceProduct struct { + Id string `json:"id"` + Name string `json:"name,omitempty"` + Sku string `json:"sku,omitempty"` + Price float32 `json:"price,omitempty"` + Url string `json:"url,omitempty"` + ImageUrl string `json:"imageUrl,omitempty"` + OrdersCount int32 `json:"ordersCount,omitempty"` + Revenue float32 `json:"revenue,omitempty"` +} diff --git a/lib/model_corporate_group_details_response.go b/lib/model_corporate_group_details_response.go new file mode 100644 index 0000000..d22402b --- /dev/null +++ b/lib/model_corporate_group_details_response.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CorporateGroupDetailsResponse struct { + Group *CorporateGroupDetailsResponseGroup `json:"group,omitempty"` + SubAccounts []CorporateGroupDetailsResponseSubaccounts `json:"sub-accounts,omitempty"` + Users []CorporateGroupDetailsResponseUsers `json:"users,omitempty"` +} diff --git a/lib/model_corporate_group_details_response_group.go b/lib/model_corporate_group_details_response_group.go new file mode 100644 index 0000000..a00048b --- /dev/null +++ b/lib/model_corporate_group_details_response_group.go @@ -0,0 +1,20 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CorporateGroupDetailsResponseGroup struct { + // Group id + Id string `json:"id,omitempty"` + // Name of the group + GroupName string `json:"groupName,omitempty"` + // Group creation date + CreatedAt string `json:"createdAt,omitempty"` +} diff --git a/lib/model_corporate_group_details_response_subaccounts.go b/lib/model_corporate_group_details_response_subaccounts.go new file mode 100644 index 0000000..48bba68 --- /dev/null +++ b/lib/model_corporate_group_details_response_subaccounts.go @@ -0,0 +1,20 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CorporateGroupDetailsResponseSubaccounts struct { + // Id of the sub-account organzation + Id int64 `json:"id,omitempty"` + // Name of the sub-account organzation + CompanyName string `json:"companyName,omitempty"` + // Creation date of the sub-account organzation + CreatedAt string `json:"createdAt,omitempty"` +} diff --git a/lib/model_corporate_group_details_response_users.go b/lib/model_corporate_group_details_response_users.go new file mode 100644 index 0000000..a6cfaba --- /dev/null +++ b/lib/model_corporate_group_details_response_users.go @@ -0,0 +1,20 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CorporateGroupDetailsResponseUsers struct { + // Email address of the user + Email string `json:"email,omitempty"` + // Last name of the user + LastName string `json:"lastName,omitempty"` + // First name of the user + FirstName string `json:"firstName,omitempty"` +} diff --git a/lib/model_create_api_key_request.go b/lib/model_create_api_key_request.go index 9da0109..745a5b9 100644 --- a/lib/model_create_api_key_request.go +++ b/lib/model_create_api_key_request.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateApiKeyRequest struct { // Id of the sub-account organization diff --git a/lib/model_create_api_key_response.go b/lib/model_create_api_key_response.go index 5b23bdb..285f60b 100644 --- a/lib/model_create_api_key_response.go +++ b/lib/model_create_api_key_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateApiKeyResponse struct { // Status of the API operation. diff --git a/lib/model_create_attribute.go b/lib/model_create_attribute.go index 814951e..6e36514 100644 --- a/lib/model_create_attribute.go +++ b/lib/model_create_attribute.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateAttribute struct { // Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' @@ -17,6 +17,8 @@ type CreateAttribute struct { IsRecurring bool `json:"isRecurring,omitempty"` // 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\"}] Enumeration []CreateAttributeEnumeration `json:"enumeration,omitempty"` - // 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 ) + // List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** + MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"` + // Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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 ) Type_ string `json:"type,omitempty"` } diff --git a/lib/model_create_attribute_enumeration.go b/lib/model_create_attribute_enumeration.go index d759c8e..63e3b7e 100644 --- a/lib/model_create_attribute_enumeration.go +++ b/lib/model_create_attribute_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateAttributeEnumeration struct { // Id of the value diff --git a/lib/model_create_category_model.go b/lib/model_create_category_model.go index 6095f72..d8ec73a 100644 --- a/lib/model_create_category_model.go +++ b/lib/model_create_category_model.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateCategoryModel struct { // ID of the category when a new category is created - Id string `json:"id,omitempty"` + Id int64 `json:"id,omitempty"` } diff --git a/lib/model_create_child.go b/lib/model_create_child.go index 9d2d3c2..531c05c 100644 --- a/lib/model_create_child.go +++ b/lib/model_create_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateChild struct { // Email address to create the child account diff --git a/lib/model_create_contact.go b/lib/model_create_contact.go index 75a2b55..09556d1 100644 --- a/lib/model_create_contact.go +++ b/lib/model_create_contact.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateContact struct { // 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\"} Email string `json:"email,omitempty"` // Pass your own Id to create a contact. ExtId string `json:"ext_id,omitempty"` - // Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + // Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. 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\"} Attributes map[string]interface{} `json:"attributes,omitempty"` // Set this field to blacklist the contact for emails (emailBlacklisted = true) EmailBlacklisted bool `json:"emailBlacklisted"` diff --git a/lib/model_create_coupon_collection.go b/lib/model_create_coupon_collection.go new file mode 100644 index 0000000..e6a164a --- /dev/null +++ b/lib/model_create_coupon_collection.go @@ -0,0 +1,28 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "time" +) + +type CreateCouponCollection struct { + // Name of the coupons collection + Name string `json:"name"` + // Default coupons collection name + DefaultCoupon string `json:"defaultCoupon"` + // Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. + ExpirationDate time.Time `json:"expirationDate,omitempty"` + // Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. + RemainingDaysAlert int32 `json:"remainingDaysAlert,omitempty"` + // Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. + RemainingCouponsAlert int32 `json:"remainingCouponsAlert,omitempty"` +} diff --git a/lib/model_create_coupons.go b/lib/model_create_coupons.go new file mode 100644 index 0000000..c45df69 --- /dev/null +++ b/lib/model_create_coupons.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CreateCoupons struct { + // The id of the coupon collection for which the coupons will be created + CollectionId string `json:"collectionId"` + Coupons []string `json:"coupons"` +} diff --git a/lib/model_create_doi_contact.go b/lib/model_create_doi_contact.go index 335b6da..f8d3ebb 100644 --- a/lib/model_create_doi_contact.go +++ b/lib/model_create_doi_contact.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateDoiContact struct { // Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. Email string `json:"email"` - // Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + // Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES':['India','China']} Attributes map[string]interface{} `json:"attributes,omitempty"` // Lists under user account where contact should be added IncludeListIds []int64 `json:"includeListIds"` diff --git a/lib/model_create_domain.go b/lib/model_create_domain.go index 909ac15..34d1bd3 100644 --- a/lib/model_create_domain.go +++ b/lib/model_create_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateDomain struct { // Domain name diff --git a/lib/model_create_domain_model.go b/lib/model_create_domain_model.go index bcfe6bb..00ceef4 100644 --- a/lib/model_create_domain_model.go +++ b/lib/model_create_domain_model.go @@ -1,21 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateDomainModel struct { // ID of the Domain created Id int64 `json:"id"` // Domain DomainName string `json:"domain_name,omitempty"` + // Domain Provider + DomainProvider string `json:"domain_provider,omitempty"` // Success message - Message string `json:"message,omitempty"` + Message string `json:"message,omitempty"` DnsRecords *CreateDomainModelDnsRecords `json:"dns_records,omitempty"` } diff --git a/lib/model_create_domain_model_dns_records.go b/lib/model_create_domain_model_dns_records.go index 978ee84..70bf409 100644 --- a/lib/model_create_domain_model_dns_records.go +++ b/lib/model_create_domain_model_dns_records.go @@ -1,16 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateDomainModelDnsRecords struct { DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"` - BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"` + BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"` + DmarcRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dmarc_record,omitempty"` } diff --git a/lib/model_create_domain_model_dns_records_dkim_record.go b/lib/model_create_domain_model_dns_records_dkim_record.go index f3b2f82..acebff2 100644 --- a/lib/model_create_domain_model_dns_records_dkim_record.go +++ b/lib/model_create_domain_model_dns_records_dkim_record.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateDomainModelDnsRecordsDkimRecord struct { - Type_ string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Type_ string `json:"type,omitempty"` + Value string `json:"value,omitempty"` HostName string `json:"host_name,omitempty"` - Status bool `json:"status,omitempty"` + Status bool `json:"status,omitempty"` } diff --git a/lib/model_create_email_campaign.go b/lib/model_create_email_campaign.go index 5022298..133436e 100644 --- a/lib/model_create_email_campaign.go +++ b/lib/model_create_email_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateEmailCampaign struct { // Tag of the campaign @@ -26,6 +26,8 @@ type CreateEmailCampaign struct { ScheduledAt string `json:"scheduledAt,omitempty"` // Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. Subject string `json:"subject,omitempty"` + // Preview text or preheader of the email campaign + PreviewText string `json:"previewText,omitempty"` // Email on which the campaign recipients will be able to reply to ReplyTo string `json:"replyTo,omitempty"` // 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 diff --git a/lib/model_create_email_campaign_recipients.go b/lib/model_create_email_campaign_recipients.go index da64373..6d301f6 100644 --- a/lib/model_create_email_campaign_recipients.go +++ b/lib/model_create_email_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Segment ids and List ids to include/exclude from campaign type CreateEmailCampaignRecipients struct { diff --git a/lib/model_create_email_campaign_sender.go b/lib/model_create_email_campaign_sender.go index bca3176..ded43a1 100644 --- a/lib/model_create_email_campaign_sender.go +++ b/lib/model_create_email_campaign_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type CreateEmailCampaignSender struct { diff --git a/lib/model_create_external_feed.go b/lib/model_create_external_feed.go index 347c123..8c56332 100644 --- a/lib/model_create_external_feed.go +++ b/lib/model_create_external_feed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateExternalFeed struct { // Name of the feed Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType,omitempty"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_create_list.go b/lib/model_create_list.go index 6064744..b91addc 100644 --- a/lib/model_create_list.go +++ b/lib/model_create_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateList struct { // Name of the list diff --git a/lib/model_create_model.go b/lib/model_create_model.go index 1f221ef..75c2038 100644 --- a/lib/model_create_model.go +++ b/lib/model_create_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateModel struct { // ID of the object created diff --git a/lib/model_create_payment_request.go b/lib/model_create_payment_request.go new file mode 100644 index 0000000..726c6c7 --- /dev/null +++ b/lib/model_create_payment_request.go @@ -0,0 +1,23 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CreatePaymentRequest struct { + // Reference of the payment request, it will appear on the payment page. + Reference string `json:"reference"` + Cart *Cart `json:"cart"` + // Brevo ID of the contact requested to pay. + ContactId int64 `json:"contactId"` + // description of payment request. + Description string `json:"description,omitempty"` + Notification *Notification `json:"notification,omitempty"` + Configuration *Configuration `json:"configuration,omitempty"` +} diff --git a/lib/model_create_payment_response.go b/lib/model_create_payment_response.go new file mode 100644 index 0000000..276da07 --- /dev/null +++ b/lib/model_create_payment_response.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type CreatePaymentResponse struct { + // ID of the object created + Id string `json:"id"` + // URL of the payment request created + Url string `json:"url,omitempty"` +} diff --git a/lib/model_create_product_model.go b/lib/model_create_product_model.go index 0c105d2..f1902f2 100644 --- a/lib/model_create_product_model.go +++ b/lib/model_create_product_model.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateProductModel struct { // ID of the Product when a new product is created - Id string `json:"id,omitempty"` + Id int64 `json:"id,omitempty"` } diff --git a/lib/model_create_reseller.go b/lib/model_create_reseller.go index 2e9b955..caf4e52 100644 --- a/lib/model_create_reseller.go +++ b/lib/model_create_reseller.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateReseller struct { // AuthKey of Reseller child created diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go index 7fc4271..e2a73bd 100644 --- a/lib/model_create_sender.go +++ b/lib/model_create_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSender struct { // From Name to use for the sender diff --git a/lib/model_create_sender_ips.go b/lib/model_create_sender_ips.go index 5f2bf83..f027446 100644 --- a/lib/model_create_sender_ips.go +++ b/lib/model_create_sender_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSenderIps struct { // Dedicated IP available in your account diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go index d40e596..be72393 100644 --- a/lib/model_create_sender_model.go +++ b/lib/model_create_sender_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSenderModel struct { // ID of the Sender created diff --git a/lib/model_create_sms_campaign.go b/lib/model_create_sms_campaign.go index 7390550..0170843 100644 --- a/lib/model_create_sms_campaign.go +++ b/lib/model_create_sms_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSmsCampaign struct { // Name of the campaign @@ -16,7 +16,7 @@ type CreateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender"` // 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 - Content string `json:"content"` + Content string `json:"content"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // 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. ScheduledAt string `json:"scheduledAt,omitempty"` diff --git a/lib/model_create_sms_campaign_recipients.go b/lib/model_create_sms_campaign_recipients.go index 2b6bfdf..c72fa30 100644 --- a/lib/model_create_sms_campaign_recipients.go +++ b/lib/model_create_sms_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSmsCampaignRecipients struct { // Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty diff --git a/lib/model_create_smtp_email.go b/lib/model_create_smtp_email.go index 328bd96..e943eb2 100644 --- a/lib/model_create_smtp_email.go +++ b/lib/model_create_smtp_email.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSmtpEmail struct { // Message ID of the transactional email sent - MessageId string `json:"messageId,omitempty"` + MessageId string `json:"messageId,omitempty"` MessageIds []string `json:"messageIds,omitempty"` } diff --git a/lib/model_create_smtp_template.go b/lib/model_create_smtp_template.go index 29453e1..1b786f1 100644 --- a/lib/model_create_smtp_template.go +++ b/lib/model_create_smtp_template.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *CreateSmtpTemplateSender `json:"sender"` // Name of the template TemplateName string `json:"templateName"` diff --git a/lib/model_create_smtp_template_sender.go b/lib/model_create_smtp_template_sender.go index 8a223bf..6e0226b 100644 --- a/lib/model_create_smtp_template_sender.go +++ b/lib/model_create_smtp_template_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type CreateSmtpTemplateSender struct { diff --git a/lib/model_create_sub_account.go b/lib/model_create_sub_account.go index 00184ab..339e9e3 100644 --- a/lib/model_create_sub_account.go +++ b/lib/model_create_sub_account.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSubAccount struct { // Set the name of the sub-account company @@ -19,4 +19,6 @@ type CreateSubAccount struct { Language string `json:"language,omitempty"` // Set the timezone of the sub-account Timezone string `json:"timezone,omitempty"` + // Set the group(s) for the sub-account + GroupIds []string `json:"groupIds,omitempty"` } diff --git a/lib/model_create_sub_account_response.go b/lib/model_create_sub_account_response.go index 888e622..e31fc6d 100644 --- a/lib/model_create_sub_account_response.go +++ b/lib/model_create_sub_account_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateSubAccountResponse struct { // ID of the sub-account created diff --git a/lib/model_create_update_batch_category.go b/lib/model_create_update_batch_category.go index 2195a02..6c770bb 100644 --- a/lib/model_create_update_batch_category.go +++ b/lib/model_create_update_batch_category.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateBatchCategory struct { // array of categories objects diff --git a/lib/model_create_update_batch_category_model.go b/lib/model_create_update_batch_category_model.go index 30db780..881b654 100644 --- a/lib/model_create_update_batch_category_model.go +++ b/lib/model_create_update_batch_category_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateBatchCategoryModel struct { // Number of the new created categories diff --git a/lib/model_create_update_batch_products.go b/lib/model_create_update_batch_products.go index ddeb5ac..c19a4bc 100644 --- a/lib/model_create_update_batch_products.go +++ b/lib/model_create_update_batch_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateBatchProducts struct { // array of products objects diff --git a/lib/model_create_update_batch_products_model.go b/lib/model_create_update_batch_products_model.go index bf34da3..0d10327 100644 --- a/lib/model_create_update_batch_products_model.go +++ b/lib/model_create_update_batch_products_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateBatchProductsModel struct { // Number of the new created products diff --git a/lib/model_create_update_categories.go b/lib/model_create_update_categories.go index 5f16c16..27109b6 100644 --- a/lib/model_create_update_categories.go +++ b/lib/model_create_update_categories.go @@ -1,22 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateCategories struct { - // Unique Category ID as saved in the shop + // Unique Category ID as saved in the shop Id string `json:"id"` - // **Mandatory in case of creation**. Name of the Category, as displayed in the shop + // **Mandatory in case of creation**. Name of the Category, as displayed in the shop Name string `json:"name,omitempty"` // URL to the category Url string `json:"url,omitempty"` // UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database DeletedAt string `json:"deletedAt,omitempty"` + // category deleted from the shop's database + IsDeleted bool `json:"isDeleted,omitempty"` } diff --git a/lib/model_create_update_category.go b/lib/model_create_update_category.go index 3fdaae6..b9dd6d5 100644 --- a/lib/model_create_update_category.go +++ b/lib/model_create_update_category.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateCategory struct { - // Unique Category ID as saved in the shop + // Unique Category ID as saved in the shop Id string `json:"id"` - // **Mandatory in case of creation**. Name of the Category, as displayed in the shop + // **Mandatory in case of creation**. Name of the Category, as displayed in the shop Name string `json:"name,omitempty"` // URL to the category Url string `json:"url,omitempty"` @@ -21,4 +21,6 @@ type CreateUpdateCategory struct { UpdateEnabled bool `json:"updateEnabled,omitempty"` // UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database DeletedAt string `json:"deletedAt,omitempty"` + // category deleted from the shop's database + IsDeleted bool `json:"isDeleted,omitempty"` } diff --git a/lib/model_create_update_contact_model.go b/lib/model_create_update_contact_model.go index 529c49a..ef33de5 100644 --- a/lib/model_create_update_contact_model.go +++ b/lib/model_create_update_contact_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateContactModel struct { // ID of the contact when a new contact is created diff --git a/lib/model_create_update_folder.go b/lib/model_create_update_folder.go index 6476dc6..65f7179 100644 --- a/lib/model_create_update_folder.go +++ b/lib/model_create_update_folder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateFolder struct { // Name of the folder diff --git a/lib/model_create_update_product.go b/lib/model_create_update_product.go index 885877c..b391a04 100644 --- a/lib/model_create_update_product.go +++ b/lib/model_create_update_product.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateProduct struct { // Product ID for which you requested the details @@ -33,4 +33,6 @@ type CreateUpdateProduct struct { UpdateEnabled bool `json:"updateEnabled,omitempty"` // UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database DeletedAt string `json:"deletedAt,omitempty"` + // product deleted from the shop's database + IsDeleted bool `json:"isDeleted,omitempty"` } diff --git a/lib/model_create_update_products.go b/lib/model_create_update_products.go index b799f5b..19f6fbf 100644 --- a/lib/model_create_update_products.go +++ b/lib/model_create_update_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateUpdateProducts struct { // Product ID for which you requested the details @@ -31,4 +31,6 @@ type CreateUpdateProducts struct { MetaInfo map[string]string `json:"metaInfo,omitempty"` // UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database DeletedAt string `json:"deletedAt,omitempty"` + // product deleted from the shop's database + IsDeleted bool `json:"isDeleted,omitempty"` } diff --git a/lib/model_create_webhook.go b/lib/model_create_webhook.go index 126e0fd..8a24edc 100644 --- a/lib/model_create_webhook.go +++ b/lib/model_create_webhook.go @@ -1,24 +1,29 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateWebhook struct { // URL of the webhook Url string `json:"url"` // Description of the webhook Description string `json:"description,omitempty"` - // - 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` + // - 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` Events []string `json:"events"` // Type of the webhook Type_ string `json:"type,omitempty"` // Inbound domain of webhook, required in case of event type `inbound` Domain string `json:"domain,omitempty"` + // To send batched webhooks + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` + // Custom headers to be send with webhooks + Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_create_whats_app_campaign.go b/lib/model_create_whats_app_campaign.go index 268b287..e63ff0b 100644 --- a/lib/model_create_whats_app_campaign.go +++ b/lib/model_create_whats_app_campaign.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateWhatsAppCampaign struct { // Name of the WhatsApp campaign creation Name string `json:"name"` // Id of the WhatsApp template in **approved** state TemplateId int32 `json:"templateId"` - // 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** - ScheduledAt string `json:"scheduledAt"` - Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"` + // 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** + ScheduledAt string `json:"scheduledAt"` + Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"` } diff --git a/lib/model_create_whats_app_campaign_recipients.go b/lib/model_create_whats_app_campaign_recipients.go index 8f0f352..c252e7e 100644 --- a/lib/model_create_whats_app_campaign_recipients.go +++ b/lib/model_create_whats_app_campaign_recipients.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Segment ids and List ids to include/exclude from campaign type CreateWhatsAppCampaignRecipients struct { // List ids to exclude from the campaign - ExcludedIds []int64 `json:"excludedIds,omitempty"` - // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to + ExcludedListIds []int64 `json:"excludedListIds,omitempty"` + // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to ListIds []int64 `json:"listIds,omitempty"` - // **Mandatory if listIds are not used**. Segment ids to send the campaign to. + // **Mandatory if listIds are not used**. Segment ids to send the campaign to. Segments []int64 `json:"segments,omitempty"` } diff --git a/lib/model_create_whats_app_template.go b/lib/model_create_whats_app_template.go index 8cab4d0..b9e672c 100644 --- a/lib/model_create_whats_app_template.go +++ b/lib/model_create_whats_app_template.go @@ -1,27 +1,28 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreateWhatsAppTemplate struct { // Name of the template Name string `json:"name"` - // Language of the template + // Language of the template. For Example : **en** for English Language string `json:"language"` // Category of the template Category string `json:"category"` - // Absolute url of the media file **(no local file)** + // 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 MediaUrl string `json:"mediaUrl,omitempty"` - // Body of the template - Body string `json:"body"` - // Html content of the header - HeaderHtml string `json:"headerHtml,omitempty"` - HeaderType bool `json:"headerType,omitempty"` + // Body of the template. **Maximum allowed characters are 1024** + BodyText string `json:"bodyText"` + // 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** + HeaderText string `json:"headerText,omitempty"` + // source of the template + Source string `json:"source,omitempty"` } diff --git a/lib/model_created_batch_id.go b/lib/model_created_batch_id.go index 4819529..a68e9a6 100644 --- a/lib/model_created_batch_id.go +++ b/lib/model_created_batch_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreatedBatchId struct { // Batch ID of the request diff --git a/lib/model_created_process_id.go b/lib/model_created_process_id.go index 693eaa8..c5cb0fd 100644 --- a/lib/model_created_process_id.go +++ b/lib/model_created_process_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type CreatedProcessId struct { // Id of the process created diff --git a/lib/model_deal.go b/lib/model_deal.go index 52e8029..12cba8a 100644 --- a/lib/model_deal.go +++ b/lib/model_deal.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Deal Details type Deal struct { diff --git a/lib/model_deal_attributes.go b/lib/model_deal_attributes.go index 96913d0..366f81c 100644 --- a/lib/model_deal_attributes.go +++ b/lib/model_deal_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of deal attributes type DealAttributes struct { diff --git a/lib/model_deal_attributes_inner.go b/lib/model_deal_attributes_inner.go index 1b99269..d22beb2 100644 --- a/lib/model_deal_attributes_inner.go +++ b/lib/model_deal_attributes_inner.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of attributes type DealAttributesInner struct { - InternalName string `json:"internalName,omitempty"` - Label string `json:"label,omitempty"` - AttributeTypeName string `json:"attributeTypeName,omitempty"` - AttributeOptions []interface{} `json:"attributeOptions,omitempty"` - IsRequired bool `json:"isRequired,omitempty"` + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` } diff --git a/lib/model_deals_list.go b/lib/model_deals_list.go index 81e5b01..03efd80 100644 --- a/lib/model_deals_list.go +++ b/lib/model_deals_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of Deals type DealsList struct { diff --git a/lib/model_delete_hardbounces.go b/lib/model_delete_hardbounces.go index 16ca4ec..0279252 100644 --- a/lib/model_delete_hardbounces.go +++ b/lib/model_delete_hardbounces.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type DeleteHardbounces struct { // 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 diff --git a/lib/model_email_export_recipients.go b/lib/model_email_export_recipients.go index 4b8f529..929d913 100644 --- a/lib/model_email_export_recipients.go +++ b/lib/model_email_export_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type EmailExportRecipients struct { // Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 diff --git a/lib/model_error_model.go b/lib/model_error_model.go index 3d9525f..9df58f2 100644 --- a/lib/model_error_model.go +++ b/lib/model_error_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ErrorModel struct { // Error code displayed in case of a failure diff --git a/lib/model_event.go b/lib/model_event.go new file mode 100644 index 0000000..05acf56 --- /dev/null +++ b/lib/model_event.go @@ -0,0 +1,23 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Event struct { + // 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. + EventName string `json:"event_name"` + // 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. + EventDate string `json:"event_date,omitempty"` + Identifiers *EventIdentifiers `json:"identifiers"` + // 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** + ContactProperties map[string]interface{} `json:"contact_properties,omitempty"` + // 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. + EventProperties map[string]interface{} `json:"event_properties,omitempty"` +} diff --git a/lib/model_event_identifiers.go b/lib/model_event_identifiers.go new file mode 100644 index 0000000..66f249e --- /dev/null +++ b/lib/model_event_identifiers.go @@ -0,0 +1,25 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Identifies the contact associated with the event. At least one identifier is required. +type EventIdentifiers struct { + // Email Id associated with the event + EmailId string `json:"email_id,omitempty"` + // SMS associated with the event + PhoneId string `json:"phone_id,omitempty"` + // whatsapp associated with the event + WhatsappId string `json:"whatsapp_id,omitempty"` + // landline_number associated with the event + LandlineNumberId string `json:"landline_number_id,omitempty"` + // ext_id associated with the event + ExtId string `json:"ext_id,omitempty"` +} diff --git a/lib/model_export_webhooks_history.go b/lib/model_export_webhooks_history.go index 5182292..6c35218 100644 --- a/lib/model_export_webhooks_history.go +++ b/lib/model_export_webhooks_history.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ExportWebhooksHistory struct { // Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ @@ -19,6 +19,8 @@ type ExportWebhooksHistory struct { EndDate string `json:"endDate,omitempty"` // Sorting order of records (asc or desc) Sort string `json:"sort,omitempty"` + // Filter the history based on webhook type + Type_ string `json:"type"` // Filter the history for a specific event type Event string `json:"event"` // Webhook URL to receive CSV file link @@ -27,6 +29,6 @@ type ExportWebhooksHistory struct { WebhookId int32 `json:"webhookId,omitempty"` // Filter the history for a specific email Email string `json:"email,omitempty"` - // Filter the history for a specific message id + // Filter the history for a specific message id. Applicable only for transactional webhooks. MessageId int32 `json:"messageId,omitempty"` } diff --git a/lib/model_file_data.go b/lib/model_file_data.go index 9e527cd..194b5f4 100644 --- a/lib/model_file_data.go +++ b/lib/model_file_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_file_downloadable_link.go b/lib/model_file_downloadable_link.go index bb7b52b..b7ad916 100644 --- a/lib/model_file_downloadable_link.go +++ b/lib/model_file_downloadable_link.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type FileDownloadableLink struct { // A unique link to download the requested file. diff --git a/lib/model_file_list.go b/lib/model_file_list.go index 4b00b70..3947965 100644 --- a/lib/model_file_list.go +++ b/lib/model_file_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of files type FileList struct { diff --git a/lib/model_get_account.go b/lib/model_get_account.go index 17ff406..6858cf3 100644 --- a/lib/model_get_account.go +++ b/lib/model_get_account.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAccount struct { // Login Email @@ -18,10 +18,10 @@ type GetAccount struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Address *GetExtendedClientAddress `json:"address"` + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` // Information about your plans and credits - Plan []GetAccountPlan `json:"plan"` - Relay *GetAccountRelay `json:"relay"` + Plan []GetAccountPlan `json:"plan"` + Relay *GetAccountRelay `json:"relay"` MarketingAutomation *GetAccountMarketingAutomation `json:"marketingAutomation,omitempty"` } diff --git a/lib/model_get_account_activity.go b/lib/model_get_account_activity.go index 443a0eb..81737b5 100644 --- a/lib/model_get_account_activity.go +++ b/lib/model_get_account_activity.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAccountActivity struct { // Get user activity logs diff --git a/lib/model_get_account_activity_logs.go b/lib/model_get_account_activity_logs.go index 3936d75..0f25a7d 100644 --- a/lib/model_get_account_activity_logs.go +++ b/lib/model_get_account_activity_logs.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAccountActivityLogs struct { // Type of activity in the account. diff --git a/lib/model_get_account_marketing_automation.go b/lib/model_get_account_marketing_automation.go index a238233..eb26ddb 100644 --- a/lib/model_get_account_marketing_automation.go +++ b/lib/model_get_account_marketing_automation.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAccountMarketingAutomation struct { // Marketing Automation Tracker ID diff --git a/lib/model_get_account_plan.go b/lib/model_get_account_plan.go index 5d72533..2794e93 100644 --- a/lib/model_get_account_plan.go +++ b/lib/model_get_account_plan.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAccountPlan struct { // Displays the plan type of the user diff --git a/lib/model_get_account_relay.go b/lib/model_get_account_relay.go index eedd638..917fd28 100644 --- a/lib/model_get_account_relay.go +++ b/lib/model_get_account_relay.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Information about your transactional email account type GetAccountRelay struct { // Status of your transactional email Account (true=Enabled, false=Disabled) - Enabled bool `json:"enabled"` - Data *GetAccountRelayData `json:"data"` + Enabled bool `json:"enabled"` + Data *GetAccountRelayData `json:"data"` } diff --git a/lib/model_get_account_relay_data.go b/lib/model_get_account_relay_data.go index 1b4ff11..b426683 100644 --- a/lib/model_get_account_relay_data.go +++ b/lib/model_get_account_relay_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Data regarding the transactional email account type GetAccountRelayData struct { diff --git a/lib/model_get_aggregated_report.go b/lib/model_get_aggregated_report.go index e2d1903..984f5a3 100644 --- a/lib/model_get_aggregated_report.go +++ b/lib/model_get_aggregated_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAggregatedReport struct { // Time frame of the report diff --git a/lib/model_get_all_external_feeds.go b/lib/model_get_all_external_feeds.go index 02df9c7..4586803 100644 --- a/lib/model_get_all_external_feeds.go +++ b/lib/model_get_all_external_feeds.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAllExternalFeeds struct { // Total number of batches - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` Feeds []GetAllExternalFeedsFeeds `json:"feeds,omitempty"` } diff --git a/lib/model_get_all_external_feeds_feeds.go b/lib/model_get_all_external_feeds_feeds.go index 046f5e1..c3e5a48 100644 --- a/lib/model_get_all_external_feeds_feeds.go +++ b/lib/model_get_all_external_feeds_feeds.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" @@ -21,7 +21,7 @@ type GetAllExternalFeedsFeeds struct { Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_get_attributes.go b/lib/model_get_attributes.go index 26184a5..cbf5b21 100644 --- a/lib/model_get_attributes.go +++ b/lib/model_get_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAttributes struct { // Listing of available contact attributes in your account diff --git a/lib/model_get_attributes_attributes.go b/lib/model_get_attributes_attributes.go index 4e54953..f338fff 100644 --- a/lib/model_get_attributes_attributes.go +++ b/lib/model_get_attributes_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAttributesAttributes struct { // Name of the attribute diff --git a/lib/model_get_attributes_enumeration.go b/lib/model_get_attributes_enumeration.go index ee9b9f4..31a0627 100644 --- a/lib/model_get_attributes_enumeration.go +++ b/lib/model_get_attributes_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetAttributesEnumeration struct { // ID of Value of the \"category\" type attribute diff --git a/lib/model_get_blocked_domains.go b/lib/model_get_blocked_domains.go index 60d8add..64a0ed7 100644 --- a/lib/model_get_blocked_domains.go +++ b/lib/model_get_blocked_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // list of blocked domains type GetBlockedDomains struct { diff --git a/lib/model_get_campaign_overview.go b/lib/model_get_campaign_overview.go index 180a4eb..23f01f1 100644 --- a/lib/model_get_campaign_overview.go +++ b/lib/model_get_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetCampaignOverview struct { // ID of the campaign @@ -17,6 +17,8 @@ type GetCampaignOverview struct { Name string `json:"name"` // Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` Subject string `json:"subject,omitempty"` + // Preview text or preheader of the email campaign + PreviewText string `json:"previewText,omitempty"` // Type of campaign Type_ string `json:"type"` // Status of the campaign diff --git a/lib/model_get_campaign_recipients.go b/lib/model_get_campaign_recipients.go index f6a85c8..b99d44f 100644 --- a/lib/model_get_campaign_recipients.go +++ b/lib/model_get_campaign_recipients.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetCampaignRecipients struct { - Lists []int64 `json:"lists"` + Lists []int64 `json:"lists"` ExclusionLists []int64 `json:"exclusionLists"` } diff --git a/lib/model_get_campaign_stats.go b/lib/model_get_campaign_stats.go index 86c3a65..debacfe 100644 --- a/lib/model_get_campaign_stats.go +++ b/lib/model_get_campaign_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetCampaignStats struct { // List Id of email campaign (only in case of get email campaign(s)(not for global stats)) diff --git a/lib/model_get_categories.go b/lib/model_get_categories.go index 4857f37..b968e56 100644 --- a/lib/model_get_categories.go +++ b/lib/model_get_categories.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetCategories struct { Categories []interface{} `json:"categories"` diff --git a/lib/model_get_category_details.go b/lib/model_get_category_details.go index f15baeb..a6ddf8d 100644 --- a/lib/model_get_category_details.go +++ b/lib/model_get_category_details.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetCategoryDetails struct { // Category ID for which you requested the details diff --git a/lib/model_get_child_account_creation_status.go b/lib/model_get_child_account_creation_status.go index bd07d30..952d1b9 100644 --- a/lib/model_get_child_account_creation_status.go +++ b/lib/model_get_child_account_creation_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildAccountCreationStatus struct { // Status of child account creation whether it is successfully created (exists) or not. diff --git a/lib/model_get_child_domain.go b/lib/model_get_child_domain.go index a2ce46a..bf85d78 100644 --- a/lib/model_get_child_domain.go +++ b/lib/model_get_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildDomain struct { // Sender domain diff --git a/lib/model_get_child_domains.go b/lib/model_get_child_domains.go index 44f6655..b9c93b5 100644 --- a/lib/model_get_child_domains.go +++ b/lib/model_get_child_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildDomains struct { } diff --git a/lib/model_get_child_info.go b/lib/model_get_child_info.go index 55d74b9..e050b2d 100644 --- a/lib/model_get_child_info.go +++ b/lib/model_get_child_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildInfo struct { // Login Email @@ -18,12 +18,12 @@ type GetChildInfo struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Credits *GetChildInfoCredits `json:"credits,omitempty"` - Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` + CompanyName string `json:"companyName"` + Credits *GetChildInfoCredits `json:"credits,omitempty"` + Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` // The encrypted password of child account Password string `json:"password"` // IP(s) associated to a child account user - Ips []string `json:"ips,omitempty"` + Ips []string `json:"ips,omitempty"` ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"` } diff --git a/lib/model_get_child_info_api_keys.go b/lib/model_get_child_info_api_keys.go index b8d76cd..37b7e05 100644 --- a/lib/model_get_child_info_api_keys.go +++ b/lib/model_get_child_info_api_keys.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // API Keys associated to child account type GetChildInfoApiKeys struct { diff --git a/lib/model_get_child_info_api_keys_v2.go b/lib/model_get_child_info_api_keys_v2.go index afa7108..a0db018 100644 --- a/lib/model_get_child_info_api_keys_v2.go +++ b/lib/model_get_child_info_api_keys_v2.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildInfoApiKeysV2 struct { // Name of the key for version 2 diff --git a/lib/model_get_child_info_api_keys_v3.go b/lib/model_get_child_info_api_keys_v3.go index 219b6c1..3075120 100644 --- a/lib/model_get_child_info_api_keys_v3.go +++ b/lib/model_get_child_info_api_keys_v3.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildInfoApiKeysV3 struct { // Name of the key for version 3 diff --git a/lib/model_get_child_info_credits.go b/lib/model_get_child_info_credits.go index e3ab33c..f7cd0d5 100644 --- a/lib/model_get_child_info_credits.go +++ b/lib/model_get_child_info_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Credits available for your child type GetChildInfoCredits struct { diff --git a/lib/model_get_child_info_statistics.go b/lib/model_get_child_info_statistics.go index 34477be..605a0de 100644 --- a/lib/model_get_child_info_statistics.go +++ b/lib/model_get_child_info_statistics.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Statistics about your child account activity type GetChildInfoStatistics struct { diff --git a/lib/model_get_children_list.go b/lib/model_get_children_list.go index f54c9b3..14898b7 100644 --- a/lib/model_get_children_list.go +++ b/lib/model_get_children_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetChildrenList struct { // Your children's account information diff --git a/lib/model_get_client.go b/lib/model_get_client.go index 83c7565..4e9455e 100644 --- a/lib/model_get_client.go +++ b/lib/model_get_client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetClient struct { // Login Email diff --git a/lib/model_get_contact_campaign_stats.go b/lib/model_get_contact_campaign_stats.go index 4420fef..941ff6b 100644 --- a/lib/model_get_contact_campaign_stats.go +++ b/lib/model_get_contact_campaign_stats.go @@ -1,24 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Campaign Statistics for the contact type GetContactCampaignStats struct { - MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` - HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` - SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` - Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` - Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` - Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` - TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` - Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"` + MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` + HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` + SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` + Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` + Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` + TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` + Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"` } diff --git a/lib/model_get_contact_campaign_stats_clicked.go b/lib/model_get_contact_campaign_stats_clicked.go index a8c963c..5dda146 100644 --- a/lib/model_get_contact_campaign_stats_clicked.go +++ b/lib/model_get_contact_campaign_stats_clicked.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContactCampaignStatsClicked struct { // ID of the campaign which generated the event - CampaignId int64 `json:"campaignId"` - Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` + CampaignId int64 `json:"campaignId"` + Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` } diff --git a/lib/model_get_contact_campaign_stats_opened.go b/lib/model_get_contact_campaign_stats_opened.go index 8961489..0623e1d 100644 --- a/lib/model_get_contact_campaign_stats_opened.go +++ b/lib/model_get_contact_campaign_stats_opened.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContactCampaignStatsOpened struct { // ID of the campaign which generated the event diff --git a/lib/model_get_contact_campaign_stats_transac_attributes.go b/lib/model_get_contact_campaign_stats_transac_attributes.go index 13cc9d8..63c42b3 100644 --- a/lib/model_get_contact_campaign_stats_transac_attributes.go +++ b/lib/model_get_contact_campaign_stats_transac_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContactCampaignStatsTransacAttributes struct { // Date of the order diff --git a/lib/model_get_contact_campaign_stats_unsubscriptions.go b/lib/model_get_contact_campaign_stats_unsubscriptions.go index 214a34c..ce67dc2 100644 --- a/lib/model_get_contact_campaign_stats_unsubscriptions.go +++ b/lib/model_get_contact_campaign_stats_unsubscriptions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContactCampaignStatsUnsubscriptions struct { // Contact has unsubscribed via the unsubscription link in the email diff --git a/lib/model_get_contact_details.go b/lib/model_get_contact_details.go index 87ef6a8..b9e1263 100644 --- a/lib/model_get_contact_details.go +++ b/lib/model_get_contact_details.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContactDetails struct { // Email address of the contact for which you requested the details - Email string `json:"email"` + Email string `json:"email,omitempty"` // ID of the contact for which you requested the details Id int64 `json:"id"` // Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) diff --git a/lib/model_get_contacts.go b/lib/model_get_contacts.go index e2f1868..3a5ac11 100644 --- a/lib/model_get_contacts.go +++ b/lib/model_get_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetContacts struct { Contacts []interface{} `json:"contacts"` diff --git a/lib/model_get_corporate_invited_users_list.go b/lib/model_get_corporate_invited_users_list.go new file mode 100644 index 0000000..c1bdb44 --- /dev/null +++ b/lib/model_get_corporate_invited_users_list.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetCorporateInvitedUsersList struct { + // Get invited users list + Users []GetCorporateInvitedUsersListUsers `json:"users,omitempty"` +} diff --git a/lib/model_get_corporate_invited_users_list_feature_access.go b/lib/model_get_corporate_invited_users_list_feature_access.go new file mode 100644 index 0000000..cef2d60 --- /dev/null +++ b/lib/model_get_corporate_invited_users_list_feature_access.go @@ -0,0 +1,23 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Feature accessiblity given to the user. (Required only if status is active) +type GetCorporateInvitedUsersListFeatureAccess struct { + // User management accessiblity. + UserManagement []string `json:"user_management,omitempty"` + // Api keys accessiblity. + ApiKeys []string `json:"api_keys,omitempty"` + // My plan accessiblity. + MyPlan []string `json:"my_plan,omitempty"` + // Apps management accessiblity | Not available in ENTv2 + AppsManagement []string `json:"apps_management,omitempty"` +} diff --git a/lib/model_get_corporate_invited_users_list_groups.go b/lib/model_get_corporate_invited_users_list_groups.go new file mode 100644 index 0000000..9a235d1 --- /dev/null +++ b/lib/model_get_corporate_invited_users_list_groups.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Admin user groups list +type GetCorporateInvitedUsersListGroups struct { + // group id + Id string `json:"id,omitempty"` + // group name + Name string `json:"name,omitempty"` +} diff --git a/lib/model_get_corporate_invited_users_list_users.go b/lib/model_get_corporate_invited_users_list_users.go new file mode 100644 index 0000000..a92565b --- /dev/null +++ b/lib/model_get_corporate_invited_users_list_users.go @@ -0,0 +1,22 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetCorporateInvitedUsersListUsers struct { + Groups *GetCorporateInvitedUsersListGroups `json:"groups"` + // Email address of the user. + Email string `json:"email"` + // Flag for indicating is user owner of the organization. + IsOwner string `json:"is_owner"` + // Status of the invited user. + Status string `json:"status"` + FeatureAccess *GetCorporateInvitedUsersListFeatureAccess `json:"feature_access"` +} diff --git a/lib/model_get_corporate_user_permission.go b/lib/model_get_corporate_user_permission.go new file mode 100644 index 0000000..a88c804 --- /dev/null +++ b/lib/model_get_corporate_user_permission.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Check admin user permissions +type GetCorporateUserPermission struct { + // Email address of the user. + Email string `json:"email"` + // Status of the invited user. + Status string `json:"status"` + Groups []GetCorporateUserPermissionGroups `json:"groups"` + FeatureAccess *GetCorporateUserPermissionFeatureAccess `json:"feature_access"` +} diff --git a/lib/model_get_corporate_user_permission_feature_access.go b/lib/model_get_corporate_user_permission_feature_access.go new file mode 100644 index 0000000..425a9dd --- /dev/null +++ b/lib/model_get_corporate_user_permission_feature_access.go @@ -0,0 +1,23 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Granular feature permissions given to the user. +type GetCorporateUserPermissionFeatureAccess struct { + // Permission on api keys + ApiKeys []string `json:"api_keys,omitempty"` + // Permission on my plan + MyPlan []string `json:"my_plan,omitempty"` + // Permission on user management + UserManagement []string `json:"user_management,omitempty"` + // Permission on apps management + AppsManagement []string `json:"apps_management,omitempty"` +} diff --git a/lib/model_get_corporate_user_permission_groups.go b/lib/model_get_corporate_user_permission_groups.go new file mode 100644 index 0000000..1fac6ce --- /dev/null +++ b/lib/model_get_corporate_user_permission_groups.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Groups details +type GetCorporateUserPermissionGroups struct { + // group identifier + Id string `json:"id,omitempty"` + // Group name + Name string `json:"name,omitempty"` +} diff --git a/lib/model_get_coupon_collection.go b/lib/model_get_coupon_collection.go new file mode 100644 index 0000000..958bbe2 --- /dev/null +++ b/lib/model_get_coupon_collection.go @@ -0,0 +1,36 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "time" +) + +type GetCouponCollection struct { + // The id of the collection. + Id string `json:"id"` + // The name of the collection. + Name string `json:"name"` + // The default coupon of the collection. + DefaultCoupon string `json:"defaultCoupon"` + // Datetime on which the collection was created. + CreatedAt time.Time `json:"createdAt"` + // Total number of coupons in the collection. + TotalCoupons int64 `json:"totalCoupons"` + // Number of coupons that have not been sent yet. + RemainingCoupons int64 `json:"remainingCoupons"` + // Expiration date for the coupon collection in RFC3339 format. + ExpirationDate time.Time `json:"expirationDate,omitempty"` + // If present, an email notification is going to be sent the defined amount of days before the expiration date. + RemainingDaysAlert int32 `json:"remainingDaysAlert,omitempty"` + // If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold. + RemainingCouponsAlert int32 `json:"remainingCouponsAlert,omitempty"` +} diff --git a/lib/model_get_device_browser_stats.go b/lib/model_get_device_browser_stats.go index 08a395c..5b12aee 100644 --- a/lib/model_get_device_browser_stats.go +++ b/lib/model_get_device_browser_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetDeviceBrowserStats struct { // Number of total clicks for the campaign using the particular browser diff --git a/lib/model_get_domainonfiguration_model.go b/lib/model_get_domain_configuration_model.go similarity index 81% rename from lib/model_get_domainonfiguration_model.go rename to lib/model_get_domain_configuration_model.go index 0b1ca53..694b250 100644 --- a/lib/model_get_domainonfiguration_model.go +++ b/lib/model_get_domain_configuration_model.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -type GetDomainonfigurationModel struct { +type GetDomainConfigurationModel struct { // Domain Domain string `json:"domain"` // Status of domain verification (true=verified, false=non verified) Verified bool `json:"verified"` // Status of domain authentication (true=authenticated, false=non authenticated) - Authenticated bool `json:"authenticated"` - DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"` + Authenticated bool `json:"authenticated"` + DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"` } diff --git a/lib/model_get_domains_list.go b/lib/model_get_domains_list.go index 1e31b85..fc9a615 100644 --- a/lib/model_get_domains_list.go +++ b/lib/model_get_domains_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetDomainsList struct { // List of the domains available in your account diff --git a/lib/model_get_domains_list_domains.go b/lib/model_get_domains_list_domains.go index c4c840e..04dd5bb 100644 --- a/lib/model_get_domains_list_domains.go +++ b/lib/model_get_domains_list_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetDomainsListDomains struct { // Id of the domain diff --git a/lib/model_get_email_campaign.go b/lib/model_get_email_campaign.go index 2b96a66..12af4a4 100644 --- a/lib/model_get_email_campaign.go +++ b/lib/model_get_email_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetEmailCampaign struct { // ID of the campaign @@ -17,6 +17,8 @@ type GetEmailCampaign struct { Name string `json:"name"` // Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` Subject string `json:"subject,omitempty"` + // Preview text or preheader of the email campaign + PreviewText string `json:"previewText,omitempty"` // Type of campaign Type_ string `json:"type"` // Status of the campaign @@ -37,6 +39,14 @@ type GetEmailCampaign struct { WinnerDelay int32 `json:"winnerDelay,omitempty"` // It is true if you have chosen to send your campaign at best time, otherwise it is false SendAtBestTime bool `json:"sendAtBestTime,omitempty"` + // utm parameter associated with campaign + UtmCampaignValue string `json:"utmCampaignValue,omitempty"` + // source of utm parameter + UtmSource string `json:"utmSource,omitempty"` + // medium parameter + UtmMedium string `json:"utmMedium,omitempty"` + // utm id + UtmID int32 `json:"utmID,omitempty"` // Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) TestSent bool `json:"testSent"` // Header of the campaign diff --git a/lib/model_get_email_campaigns.go b/lib/model_get_email_campaigns.go index d82503a..1116f36 100644 --- a/lib/model_get_email_campaigns.go +++ b/lib/model_get_email_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetEmailCampaigns struct { Campaigns []interface{} `json:"campaigns,omitempty"` diff --git a/lib/model_get_email_event_report.go b/lib/model_get_email_event_report.go index 94c9b1d..5dd9b1f 100644 --- a/lib/model_get_email_event_report.go +++ b/lib/model_get_email_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetEmailEventReport struct { Events []GetEmailEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_email_event_report_events.go b/lib/model_get_email_event_report_events.go index e4e3f4f..b0b5945 100644 --- a/lib/model_get_email_event_report_events.go +++ b/lib/model_get_email_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetEmailEventReportEvents struct { // Email address which generates the event diff --git a/lib/model_get_extended_campaign_overview.go b/lib/model_get_extended_campaign_overview.go index 6171244..b0f1527 100644 --- a/lib/model_get_extended_campaign_overview.go +++ b/lib/model_get_extended_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedCampaignOverview struct { // ID of the campaign @@ -17,6 +17,8 @@ type GetExtendedCampaignOverview struct { Name string `json:"name"` // Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` Subject string `json:"subject,omitempty"` + // Preview text or preheader of the email campaign + PreviewText string `json:"previewText,omitempty"` // Type of campaign Type_ string `json:"type"` // Status of the campaign @@ -37,12 +39,20 @@ type GetExtendedCampaignOverview struct { WinnerDelay int32 `json:"winnerDelay,omitempty"` // It is true if you have chosen to send your campaign at best time, otherwise it is false SendAtBestTime bool `json:"sendAtBestTime,omitempty"` + // utm parameter associated with campaign + UtmCampaignValue string `json:"utmCampaignValue,omitempty"` + // source of utm parameter + UtmSource string `json:"utmSource,omitempty"` + // medium parameter + UtmMedium string `json:"utmMedium,omitempty"` + // utm id + UtmID int32 `json:"utmID,omitempty"` // Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) TestSent bool `json:"testSent"` // Header of the campaign Header string `json:"header"` // Footer of the campaign - Footer string `json:"footer"` + Footer string `json:"footer"` Sender *GetExtendedCampaignOverviewSender `json:"sender"` // Email defined as the \"Reply to\" of the campaign ReplyTo string `json:"replyTo"` diff --git a/lib/model_get_extended_campaign_overview_sender.go b/lib/model_get_extended_campaign_overview_sender.go index a183471..1eb74f8 100644 --- a/lib/model_get_extended_campaign_overview_sender.go +++ b/lib/model_get_extended_campaign_overview_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedCampaignOverviewSender struct { // Sender name of the campaign @@ -16,5 +16,5 @@ type GetExtendedCampaignOverviewSender struct { // Sender email of the campaign Email string `json:"email,omitempty"` // Sender id of the campaign - Id string `json:"id,omitempty"` + Id int64 `json:"id,omitempty"` } diff --git a/lib/model_get_extended_campaign_stats.go b/lib/model_get_extended_campaign_stats.go index c04752c..75415c4 100644 --- a/lib/model_get_extended_campaign_stats.go +++ b/lib/model_get_extended_campaign_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedCampaignStats struct { // Overall statistics of the campaign diff --git a/lib/model_get_extended_client.go b/lib/model_get_extended_client.go index 0a23e95..56a54e9 100644 --- a/lib/model_get_extended_client.go +++ b/lib/model_get_extended_client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedClient struct { // Login Email @@ -18,6 +18,6 @@ type GetExtendedClient struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Address *GetExtendedClientAddress `json:"address"` + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` } diff --git a/lib/model_get_extended_client_address.go b/lib/model_get_extended_client_address.go index b85d6f0..84c734c 100644 --- a/lib/model_get_extended_client_address.go +++ b/lib/model_get_extended_client_address.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Address informations type GetExtendedClientAddress struct { diff --git a/lib/model_get_extended_contact_details.go b/lib/model_get_extended_contact_details.go index 8a56b4b..8a28171 100644 --- a/lib/model_get_extended_contact_details.go +++ b/lib/model_get_extended_contact_details.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetails struct { // Email address of the contact for which you requested the details - Email string `json:"email"` + Email string `json:"email,omitempty"` // ID of the contact for which you requested the details Id int64 `json:"id"` // Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) diff --git a/lib/model_get_extended_contact_details_statistics.go b/lib/model_get_extended_contact_details_statistics.go index a92eb4c..0dcc253 100644 --- a/lib/model_get_extended_contact_details_statistics.go +++ b/lib/model_get_extended_contact_details_statistics.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Campaign statistics of the contact type GetExtendedContactDetailsStatistics struct { @@ -19,7 +19,7 @@ type GetExtendedContactDetailsStatistics struct { // Listing of the softbounes generated by the contact SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` // Listing of the complaints generated by the contact - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` Unsubscriptions *GetExtendedContactDetailsStatisticsUnsubscriptions `json:"unsubscriptions,omitempty"` // Listing of the openings generated by the contact Opened []GetExtendedContactDetailsStatisticsOpened `json:"opened,omitempty"` diff --git a/lib/model_get_extended_contact_details_statistics_clicked.go b/lib/model_get_extended_contact_details_statistics_clicked.go index 0504c85..4b9be39 100644 --- a/lib/model_get_extended_contact_details_statistics_clicked.go +++ b/lib/model_get_extended_contact_details_statistics_clicked.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsClicked struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_delivered.go b/lib/model_get_extended_contact_details_statistics_delivered.go index 6390194..4e9ec16 100644 --- a/lib/model_get_extended_contact_details_statistics_delivered.go +++ b/lib/model_get_extended_contact_details_statistics_delivered.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsDelivered struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_links.go b/lib/model_get_extended_contact_details_statistics_links.go index affc667..69b46af 100644 --- a/lib/model_get_extended_contact_details_statistics_links.go +++ b/lib/model_get_extended_contact_details_statistics_links.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsLinks struct { // Number of clicks on this link for the campaign diff --git a/lib/model_get_extended_contact_details_statistics_messages_sent.go b/lib/model_get_extended_contact_details_statistics_messages_sent.go index 0ec5b1d..a742d81 100644 --- a/lib/model_get_extended_contact_details_statistics_messages_sent.go +++ b/lib/model_get_extended_contact_details_statistics_messages_sent.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsMessagesSent struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_opened.go b/lib/model_get_extended_contact_details_statistics_opened.go index 96c8c11..315fd43 100644 --- a/lib/model_get_extended_contact_details_statistics_opened.go +++ b/lib/model_get_extended_contact_details_statistics_opened.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsOpened struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go index 52c209c..6682be7 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Listing of the unsubscription for the contact type GetExtendedContactDetailsStatisticsUnsubscriptions struct { diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go index f216617..e7cc382 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription struct { // UTC date-time of the event diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go index 2b66869..002d910 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_list.go b/lib/model_get_extended_list.go index 25d3b90..93096b6 100644 --- a/lib/model_get_extended_list.go +++ b/lib/model_get_extended_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedList struct { // ID of the list @@ -24,7 +24,7 @@ type GetExtendedList struct { // ID of the folder FolderId int64 `json:"folderId"` // Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` + CreatedAt string `json:"createdAt"` CampaignStats []GetExtendedListCampaignStats `json:"campaignStats,omitempty"` // Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) DynamicList bool `json:"dynamicList,omitempty"` diff --git a/lib/model_get_extended_list_campaign_stats.go b/lib/model_get_extended_list_campaign_stats.go index 2289560..1f11612 100644 --- a/lib/model_get_extended_list_campaign_stats.go +++ b/lib/model_get_extended_list_campaign_stats.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExtendedListCampaignStats struct { // ID of the campaign - CampaignId int64 `json:"campaignId"` - Stats *GetCampaignStats `json:"stats"` + CampaignId int64 `json:"campaignId"` + Stats *GetCampaignStats `json:"stats"` } diff --git a/lib/model_get_external_feed_by_uuid.go b/lib/model_get_external_feed_by_uuid.go index ecf1e77..a1e75b8 100644 --- a/lib/model_get_external_feed_by_uuid.go +++ b/lib/model_get_external_feed_by_uuid.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" @@ -21,7 +21,7 @@ type GetExternalFeedByUuid struct { Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_get_external_feed_by_uuid_headers.go b/lib/model_get_external_feed_by_uuid_headers.go index 46791c8..2b51a49 100644 --- a/lib/model_get_external_feed_by_uuid_headers.go +++ b/lib/model_get_external_feed_by_uuid_headers.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetExternalFeedByUuidHeaders struct { // Name of the header diff --git a/lib/model_get_folder.go b/lib/model_get_folder.go index f4298e8..f5e9fc5 100644 --- a/lib/model_get_folder.go +++ b/lib/model_get_folder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetFolder struct { // ID of the folder diff --git a/lib/model_get_folder_lists.go b/lib/model_get_folder_lists.go index 5939648..c3e55bf 100644 --- a/lib/model_get_folder_lists.go +++ b/lib/model_get_folder_lists.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetFolderLists struct { Lists []interface{} `json:"lists,omitempty"` diff --git a/lib/model_get_folders.go b/lib/model_get_folders.go index df3ef59..79320f7 100644 --- a/lib/model_get_folders.go +++ b/lib/model_get_folders.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetFolders struct { Folders []interface{} `json:"folders,omitempty"` diff --git a/lib/model_get_inbound_email_events.go b/lib/model_get_inbound_email_events.go index c58e2d8..b001115 100644 --- a/lib/model_get_inbound_email_events.go +++ b/lib/model_get_inbound_email_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetInboundEmailEvents struct { Events []GetInboundEmailEventsEvents `json:"events,omitempty"` diff --git a/lib/model_get_inbound_email_events_by_uuid.go b/lib/model_get_inbound_email_events_by_uuid.go index 2426c17..c0f2f2a 100644 --- a/lib/model_get_inbound_email_events_by_uuid.go +++ b/lib/model_get_inbound_email_events_by_uuid.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" @@ -25,7 +25,7 @@ type GetInboundEmailEventsByUuid struct { Sender string `json:"sender,omitempty"` // Value of the Message-ID header. This will be present only after the processing is done. MessageId string `json:"messageId,omitempty"` - // Value of the Subject header. This will be present only after the processing is done. + // Value of the Subject header. This will be present only after the processing is done. Subject string `json:"subject,omitempty"` // List of attachments of the email. This will be present only after the processing is done. Attachments []GetInboundEmailEventsByUuidAttachments `json:"attachments,omitempty"` diff --git a/lib/model_get_inbound_email_events_by_uuid_attachments.go b/lib/model_get_inbound_email_events_by_uuid_attachments.go index bb8b3b1..a0ad759 100644 --- a/lib/model_get_inbound_email_events_by_uuid_attachments.go +++ b/lib/model_get_inbound_email_events_by_uuid_attachments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetInboundEmailEventsByUuidAttachments struct { // filename specified in the Content-Disposition header of the attachment diff --git a/lib/model_get_inbound_email_events_by_uuid_logs.go b/lib/model_get_inbound_email_events_by_uuid_logs.go index b8dbe82..0ae0469 100644 --- a/lib/model_get_inbound_email_events_by_uuid_logs.go +++ b/lib/model_get_inbound_email_events_by_uuid_logs.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_get_inbound_email_events_events.go b/lib/model_get_inbound_email_events_events.go index 1d24d8b..eecfc5a 100644 --- a/lib/model_get_inbound_email_events_events.go +++ b/lib/model_get_inbound_email_events_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_get_invited_users_list.go b/lib/model_get_invited_users_list.go new file mode 100644 index 0000000..eb9367f --- /dev/null +++ b/lib/model_get_invited_users_list.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetInvitedUsersList struct { + // Get invited users list + Users []GetInvitedUsersListUsers `json:"users,omitempty"` +} diff --git a/lib/model_get_invited_users_list_feature_access.go b/lib/model_get_invited_users_list_feature_access.go new file mode 100644 index 0000000..a3ce540 --- /dev/null +++ b/lib/model_get_invited_users_list_feature_access.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Feature accessiblity given to the user. +type GetInvitedUsersListFeatureAccess struct { + // Marketing features accessiblity. + Marketing map[string]interface{} `json:"marketing,omitempty"` + // Conversations features accessiblity. + Conversations map[string]interface{} `json:"conversations,omitempty"` + // CRM features accessiblity. + Crm map[string]interface{} `json:"crm,omitempty"` +} diff --git a/lib/model_get_invited_users_list_users.go b/lib/model_get_invited_users_list_users.go new file mode 100644 index 0000000..95f40d3 --- /dev/null +++ b/lib/model_get_invited_users_list_users.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetInvitedUsersListUsers struct { + // Email address of the user. + Email string `json:"email"` + // Flag for indicating is user owner of the organization. + IsOwner string `json:"is_owner"` + // Status of the invited user. + Status string `json:"status"` + FeatureAccess *GetInvitedUsersListFeatureAccess `json:"feature_access"` +} diff --git a/lib/model_get_ip.go b/lib/model_get_ip.go index 10564ce..b74311f 100644 --- a/lib/model_get_ip.go +++ b/lib/model_get_ip.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetIp struct { // ID of the dedicated IP diff --git a/lib/model_get_ip_from_sender.go b/lib/model_get_ip_from_sender.go index 907a1ae..4be45a0 100644 --- a/lib/model_get_ip_from_sender.go +++ b/lib/model_get_ip_from_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetIpFromSender struct { // ID of the dedicated IP diff --git a/lib/model_get_ips.go b/lib/model_get_ips.go index db79d3b..29a9175 100644 --- a/lib/model_get_ips.go +++ b/lib/model_get_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetIps struct { // Dedicated IP(s) available on your account diff --git a/lib/model_get_ips_from_sender.go b/lib/model_get_ips_from_sender.go index 2384afa..fc8a518 100644 --- a/lib/model_get_ips_from_sender.go +++ b/lib/model_get_ips_from_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetIpsFromSender struct { // Dedicated IP(s) linked to a sender diff --git a/lib/model_get_list.go b/lib/model_get_list.go index ca8710a..7e0249c 100644 --- a/lib/model_get_list.go +++ b/lib/model_get_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetList struct { // ID of the list diff --git a/lib/model_get_lists.go b/lib/model_get_lists.go index 6c8eaaf..c40a61a 100644 --- a/lib/model_get_lists.go +++ b/lib/model_get_lists.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetLists struct { // Listing of all the lists available in your account diff --git a/lib/model_get_orders.go b/lib/model_get_orders.go new file mode 100644 index 0000000..ce778fa --- /dev/null +++ b/lib/model_get_orders.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetOrders struct { + Orders []interface{} `json:"orders,omitempty"` + // Number of orders + Count int64 `json:"count,omitempty"` +} diff --git a/lib/model_get_payment_request.go b/lib/model_get_payment_request.go new file mode 100644 index 0000000..32ce7b5 --- /dev/null +++ b/lib/model_get_payment_request.go @@ -0,0 +1,25 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetPaymentRequest struct { + // Reference of the payment request, it will appear on the payment page. + Reference string `json:"reference"` + // Status of the payment request. + Status string `json:"status"` + Configuration *Configuration `json:"configuration,omitempty"` + // Brevo ID of the contact requested to pay. + ContactId int64 `json:"contactId,omitempty"` + // number of reminders sent. + NumberOfRemindersSent int64 `json:"numberOfRemindersSent,omitempty"` + Cart *Cart `json:"cart"` + Notification *Notification `json:"notification"` +} diff --git a/lib/model_get_process.go b/lib/model_get_process.go index 89b2513..b101c78 100644 --- a/lib/model_get_process.go +++ b/lib/model_get_process.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetProcess struct { // Id of the process diff --git a/lib/model_get_processes.go b/lib/model_get_processes.go index 146a5a5..82cca3e 100644 --- a/lib/model_get_processes.go +++ b/lib/model_get_processes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetProcesses struct { // List of processes available on your account diff --git a/lib/model_get_product_details.go b/lib/model_get_product_details.go index 11b1fa2..0b51ebe 100644 --- a/lib/model_get_product_details.go +++ b/lib/model_get_product_details.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetProductDetails struct { // Product ID for which you requested the details diff --git a/lib/model_get_products.go b/lib/model_get_products.go index 8fa80d5..5a6f206 100644 --- a/lib/model_get_products.go +++ b/lib/model_get_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetProducts struct { Products []interface{} `json:"products"` diff --git a/lib/model_get_reports.go b/lib/model_get_reports.go index e977878..0949d14 100644 --- a/lib/model_get_reports.go +++ b/lib/model_get_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetReports struct { Reports []GetReportsReports `json:"reports,omitempty"` diff --git a/lib/model_get_reports_reports.go b/lib/model_get_reports_reports.go index 276c649..5d690b9 100644 --- a/lib/model_get_reports_reports.go +++ b/lib/model_get_reports_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetReportsReports struct { // Date of the statistics diff --git a/lib/model_get_scheduled_email_by_batch_id.go b/lib/model_get_scheduled_email_by_batch_id.go index b335f15..4482949 100644 --- a/lib/model_get_scheduled_email_by_batch_id.go +++ b/lib/model_get_scheduled_email_by_batch_id.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetScheduledEmailByBatchId struct { // Total number of batches - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` Batches []GetScheduledEmailByBatchIdBatches `json:"batches,omitempty"` } diff --git a/lib/model_get_scheduled_email_by_batch_id_batches.go b/lib/model_get_scheduled_email_by_batch_id_batches.go index d68e08f..321231f 100644 --- a/lib/model_get_scheduled_email_by_batch_id_batches.go +++ b/lib/model_get_scheduled_email_by_batch_id_batches.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_get_scheduled_email_by_message_id.go b/lib/model_get_scheduled_email_by_message_id.go index 1a40ca5..96ce619 100644 --- a/lib/model_get_scheduled_email_by_message_id.go +++ b/lib/model_get_scheduled_email_by_message_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_get_segments.go b/lib/model_get_segments.go index 6bc6184..ca2c1e3 100644 --- a/lib/model_get_segments.go +++ b/lib/model_get_segments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSegments struct { Segments *GetSegmentsSegments `json:"segments,omitempty"` diff --git a/lib/model_get_segments_segments.go b/lib/model_get_segments_segments.go index 48ab5fb..1505410 100644 --- a/lib/model_get_segments_segments.go +++ b/lib/model_get_segments_segments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSegmentsSegments struct { // ID of the list diff --git a/lib/model_get_senders_list.go b/lib/model_get_senders_list.go index 73231c2..803e50a 100644 --- a/lib/model_get_senders_list.go +++ b/lib/model_get_senders_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSendersList struct { // List of the senders available in your account diff --git a/lib/model_get_senders_list_ips.go b/lib/model_get_senders_list_ips.go index aebd3e1..927b31d 100644 --- a/lib/model_get_senders_list_ips.go +++ b/lib/model_get_senders_list_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSendersListIps struct { // Dedicated IP available in your account diff --git a/lib/model_get_senders_list_senders.go b/lib/model_get_senders_list_senders.go index 8037998..0728a54 100644 --- a/lib/model_get_senders_list_senders.go +++ b/lib/model_get_senders_list_senders.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSendersListSenders struct { // Id of the sender diff --git a/lib/model_get_shared_template_url.go b/lib/model_get_shared_template_url.go index b8f4f08..f039899 100644 --- a/lib/model_get_shared_template_url.go +++ b/lib/model_get_shared_template_url.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSharedTemplateUrl struct { // A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. diff --git a/lib/model_get_sms_campaign.go b/lib/model_get_sms_campaign.go index d42101d..7b691bf 100644 --- a/lib/model_get_sms_campaign.go +++ b/lib/model_get_sms_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsCampaign struct { // ID of the SMS Campaign diff --git a/lib/model_get_sms_campaign_overview.go b/lib/model_get_sms_campaign_overview.go index 5e6d395..30ae7ee 100644 --- a/lib/model_get_sms_campaign_overview.go +++ b/lib/model_get_sms_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsCampaignOverview struct { // ID of the SMS Campaign diff --git a/lib/model_get_sms_campaign_stats.go b/lib/model_get_sms_campaign_stats.go index 8fd638e..63369ca 100644 --- a/lib/model_get_sms_campaign_stats.go +++ b/lib/model_get_sms_campaign_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsCampaignStats struct { // Number of delivered SMS diff --git a/lib/model_get_sms_campaigns.go b/lib/model_get_sms_campaigns.go index 0a4accd..85bf3f3 100644 --- a/lib/model_get_sms_campaigns.go +++ b/lib/model_get_sms_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsCampaigns struct { Campaigns []interface{} `json:"campaigns,omitempty"` diff --git a/lib/model_get_sms_event_report.go b/lib/model_get_sms_event_report.go index 775fc60..825b4df 100644 --- a/lib/model_get_sms_event_report.go +++ b/lib/model_get_sms_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsEventReport struct { Events []GetSmsEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_sms_event_report_events.go b/lib/model_get_sms_event_report_events.go index e120b2f..d31404b 100644 --- a/lib/model_get_sms_event_report_events.go +++ b/lib/model_get_sms_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmsEventReportEvents struct { // Phone number which has generated the event @@ -21,7 +21,7 @@ type GetSmsEventReportEvents struct { Event string `json:"event,omitempty"` // Reason of bounce (only available if the event is hardbounce or softbounce) Reason string `json:"reason,omitempty"` - Reply string `json:"reply,omitempty"` + Reply string `json:"reply,omitempty"` // Tag of the SMS which generated the event Tag string `json:"tag,omitempty"` } diff --git a/lib/model_get_smtp_template_overview.go b/lib/model_get_smtp_template_overview.go index da3bc5a..a6f548a 100644 --- a/lib/model_get_smtp_template_overview.go +++ b/lib/model_get_smtp_template_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmtpTemplateOverview struct { // ID of the template @@ -20,8 +20,8 @@ type GetSmtpTemplateOverview struct { // Status of template (true=active, false=inactive) IsActive bool `json:"isActive"` // Status of test sending for the template (true=test email has been sent, false=test email has not been sent) - TestSent bool `json:"testSent"` - Sender *GetSmtpTemplateOverviewSender `json:"sender"` + TestSent bool `json:"testSent"` + Sender *GetSmtpTemplateOverviewSender `json:"sender"` // Email defined as the \"Reply to\" for the template ReplyTo string `json:"replyTo"` // Customisation of the \"to\" field for the template diff --git a/lib/model_get_smtp_template_overview_sender.go b/lib/model_get_smtp_template_overview_sender.go index 494a38c..b6e2049 100644 --- a/lib/model_get_smtp_template_overview_sender.go +++ b/lib/model_get_smtp_template_overview_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmtpTemplateOverviewSender struct { // From email for the template diff --git a/lib/model_get_smtp_templates.go b/lib/model_get_smtp_templates.go index 8027dd5..718c846 100644 --- a/lib/model_get_smtp_templates.go +++ b/lib/model_get_smtp_templates.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSmtpTemplates struct { // Count of transactional email templates - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Templates []GetSmtpTemplateOverview `json:"templates,omitempty"` } diff --git a/lib/model_get_sso_token.go b/lib/model_get_sso_token.go index ab59976..b91f6ff 100644 --- a/lib/model_get_sso_token.go +++ b/lib/model_get_sso_token.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetSsoToken struct { // Session token, it will remain valid for 15 days. diff --git a/lib/model_get_stats_by_browser.go b/lib/model_get_stats_by_browser.go index b4e411b..81882b1 100644 --- a/lib/model_get_stats_by_browser.go +++ b/lib/model_get_stats_by_browser.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetStatsByBrowser struct { } diff --git a/lib/model_get_stats_by_device.go b/lib/model_get_stats_by_device.go index c982854..a9f07bd 100644 --- a/lib/model_get_stats_by_device.go +++ b/lib/model_get_stats_by_device.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetStatsByDevice struct { // Statistics of the campaign on the basis of desktop devices diff --git a/lib/model_get_stats_by_domain.go b/lib/model_get_stats_by_domain.go index 6741b18..029e8e5 100644 --- a/lib/model_get_stats_by_domain.go +++ b/lib/model_get_stats_by_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetStatsByDomain struct { } diff --git a/lib/model_get_transac_aggregated_sms_report.go b/lib/model_get_transac_aggregated_sms_report.go index cfc75de..ab40dba 100644 --- a/lib/model_get_transac_aggregated_sms_report.go +++ b/lib/model_get_transac_aggregated_sms_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacAggregatedSmsReport struct { // Time frame of the report @@ -27,8 +27,10 @@ type GetTransacAggregatedSmsReport struct { Unsubscribed int64 `json:"unsubscribed,omitempty"` // Number of answered SMS for the timeframe Replied int64 `json:"replied,omitempty"` - // Number of accepted for the timeframe + // Number of accepted SMS for the timeframe Accepted int64 `json:"accepted,omitempty"` - // Number of rejected for the timeframe + // Number of rejected SMS for the timeframe Rejected int64 `json:"rejected,omitempty"` + // Number of skipped SMS for the timeframe + Skipped int64 `json:"skipped,omitempty"` } diff --git a/lib/model_get_transac_blocked_contacts.go b/lib/model_get_transac_blocked_contacts.go index b3b109e..aa3d250 100644 --- a/lib/model_get_transac_blocked_contacts.go +++ b/lib/model_get_transac_blocked_contacts.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacBlockedContacts struct { // Count of blocked or unsubscribed contact - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Contacts []GetTransacBlockedContactsContacts `json:"contacts,omitempty"` } diff --git a/lib/model_get_transac_blocked_contacts_contacts.go b/lib/model_get_transac_blocked_contacts_contacts.go index 8a1c0f6..29aacc1 100644 --- a/lib/model_get_transac_blocked_contacts_contacts.go +++ b/lib/model_get_transac_blocked_contacts_contacts.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacBlockedContactsContacts struct { // Email address of the blocked or unsubscribed contact Email string `json:"email"` // Sender email address of the blocked or unsubscribed contact - SenderEmail string `json:"senderEmail"` - Reason *GetTransacBlockedContactsReason `json:"reason"` + SenderEmail string `json:"senderEmail"` + Reason *GetTransacBlockedContactsReason `json:"reason"` // Date when the contact was blocked or unsubscribed on BlockedAt string `json:"blockedAt"` } diff --git a/lib/model_get_transac_blocked_contacts_reason.go b/lib/model_get_transac_blocked_contacts_reason.go index db61c91..d054287 100644 --- a/lib/model_get_transac_blocked_contacts_reason.go +++ b/lib/model_get_transac_blocked_contacts_reason.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Reason for blocking / unsubscribing type GetTransacBlockedContactsReason struct { diff --git a/lib/model_get_transac_email_content.go b/lib/model_get_transac_email_content.go index 5985a26..7d1a5bc 100644 --- a/lib/model_get_transac_email_content.go +++ b/lib/model_get_transac_email_content.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacEmailContent struct { // Email address to which transactional email has been sent diff --git a/lib/model_get_transac_email_content_events.go b/lib/model_get_transac_email_content_events.go index 8b362ef..273b493 100644 --- a/lib/model_get_transac_email_content_events.go +++ b/lib/model_get_transac_email_content_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacEmailContentEvents struct { // Name of the event that occurred on the sent email diff --git a/lib/model_get_transac_emails_list.go b/lib/model_get_transac_emails_list.go index 51b99c2..b69ff28 100644 --- a/lib/model_get_transac_emails_list.go +++ b/lib/model_get_transac_emails_list.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacEmailsList struct { // Total number of transactional emails available on your account according to the passed filter - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` TransactionalEmails []GetTransacEmailsListTransactionalEmails `json:"transactionalEmails,omitempty"` } diff --git a/lib/model_get_transac_emails_list_transactional_emails.go b/lib/model_get_transac_emails_list_transactional_emails.go index 7fea846..46b08b6 100644 --- a/lib/model_get_transac_emails_list_transactional_emails.go +++ b/lib/model_get_transac_emails_list_transactional_emails.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacEmailsListTransactionalEmails struct { // Email address to which transactional email has been sent diff --git a/lib/model_get_transac_sms_report.go b/lib/model_get_transac_sms_report.go index 8499d22..6159a19 100644 --- a/lib/model_get_transac_sms_report.go +++ b/lib/model_get_transac_sms_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacSmsReport struct { Reports []GetTransacSmsReportReports `json:"reports,omitempty"` diff --git a/lib/model_get_transac_sms_report_reports.go b/lib/model_get_transac_sms_report_reports.go index ccb9f33..3debb83 100644 --- a/lib/model_get_transac_sms_report_reports.go +++ b/lib/model_get_transac_sms_report_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetTransacSmsReportReports struct { // Date for which statistics are retrieved @@ -27,8 +27,10 @@ type GetTransacSmsReportReports struct { Unsubscribed int64 `json:"unsubscribed,omitempty"` // Number of answered SMS for the date Replied int64 `json:"replied,omitempty"` - // Number of accepted for the date + // Number of accepted SMS for the date Accepted int64 `json:"accepted,omitempty"` - // Number of rejected for the date + // Number of rejected SMS for the date Rejected int64 `json:"rejected,omitempty"` + // Number of skipped SMS for the date + Skipped int64 `json:"skipped,omitempty"` } diff --git a/lib/model_get_user_permission.go b/lib/model_get_user_permission.go new file mode 100644 index 0000000..5eb9082 --- /dev/null +++ b/lib/model_get_user_permission.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Check user permission +type GetUserPermission struct { + // Email address of the user. + Email string `json:"email"` + // Status of the invited user. + Status string `json:"status"` + // Granular feature permissions given to the user. + Privileges []GetUserPermissionPrivileges `json:"privileges"` +} diff --git a/lib/model_get_user_permission_privileges.go b/lib/model_get_user_permission_privileges.go new file mode 100644 index 0000000..c69a200 --- /dev/null +++ b/lib/model_get_user_permission_privileges.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetUserPermissionPrivileges struct { + Feature string `json:"feature"` + Permissions []string `json:"permissions"` +} diff --git a/lib/model_get_wa_templates.go b/lib/model_get_wa_templates.go index c2b2a88..7c70bf1 100644 --- a/lib/model_get_wa_templates.go +++ b/lib/model_get_wa_templates.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWaTemplates struct { Templates []GetWaTemplatesTemplates `json:"templates"` diff --git a/lib/model_get_wa_templates_templates.go b/lib/model_get_wa_templates_templates.go index 789c4e2..c075be9 100644 --- a/lib/model_get_wa_templates_templates.go +++ b/lib/model_get_wa_templates_templates.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWaTemplatesTemplates struct { // id of the template diff --git a/lib/model_get_webhook.go b/lib/model_get_webhook.go index 031ce25..836f469 100644 --- a/lib/model_get_webhook.go +++ b/lib/model_get_webhook.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWebhook struct { // URL of the webhook @@ -16,12 +16,17 @@ type GetWebhook struct { // ID of the webhook Id int64 `json:"id"` // Description of the webhook - Description string `json:"description"` - Events []string `json:"events"` + Description string `json:"description"` + Events []string `json:"events"` // Type of webhook (marketing or transactional) Type_ string `json:"type"` // Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) ModifiedAt string `json:"modifiedAt"` + // To send batched webhooks + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` + // Custom headers to be send with webhooks + Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_get_webhook_auth.go b/lib/model_get_webhook_auth.go new file mode 100644 index 0000000..9f5b717 --- /dev/null +++ b/lib/model_get_webhook_auth.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Add authentication on webhook url +type GetWebhookAuth struct { + // Type of authentication + Type_ string `json:"type,omitempty"` + // Webhook authentication token + Token string `json:"token,omitempty"` +} diff --git a/lib/model_get_webhook_headers.go b/lib/model_get_webhook_headers.go new file mode 100644 index 0000000..d99d56d --- /dev/null +++ b/lib/model_get_webhook_headers.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type GetWebhookHeaders struct { + // Header key name + Key string `json:"key,omitempty"` + // Header value + Value string `json:"value,omitempty"` +} diff --git a/lib/model_get_webhooks.go b/lib/model_get_webhooks.go index 5076851..4e92d54 100644 --- a/lib/model_get_webhooks.go +++ b/lib/model_get_webhooks.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWebhooks struct { Webhooks []interface{} `json:"webhooks"` diff --git a/lib/model_get_whats_app_config.go b/lib/model_get_whats_app_config.go index f760dbc..989faab 100644 --- a/lib/model_get_whats_app_config.go +++ b/lib/model_get_whats_app_config.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsAppConfig struct { // Id of the WhatsApp business account diff --git a/lib/model_get_whatsapp_campaign_overview.go b/lib/model_get_whatsapp_campaign_overview.go index 61b8543..4f6d8ba 100644 --- a/lib/model_get_whatsapp_campaign_overview.go +++ b/lib/model_get_whatsapp_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsappCampaignOverview struct { // ID of the WhatsApp Campaign @@ -20,9 +20,9 @@ type GetWhatsappCampaignOverview struct { // UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format ScheduledAt string `json:"scheduledAt,omitempty"` // Sender of the WhatsApp Campaign - SenderNumber string `json:"senderNumber"` - Stats *WhatsappCampStats `json:"stats,omitempty"` - Template *WhatsappCampTemplate `json:"template"` + SenderNumber string `json:"senderNumber"` + Stats *WhatsappCampStats `json:"stats,omitempty"` + Template *WhatsappCampTemplate `json:"template"` // Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) diff --git a/lib/model_get_whatsapp_campaigns.go b/lib/model_get_whatsapp_campaigns.go index 6badc1a..900eb0f 100644 --- a/lib/model_get_whatsapp_campaigns.go +++ b/lib/model_get_whatsapp_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsappCampaigns struct { Campaigns []GetWhatsappCampaignsCampaigns `json:"campaigns,omitempty"` diff --git a/lib/model_get_whatsapp_campaigns_campaigns.go b/lib/model_get_whatsapp_campaigns_campaigns.go index 77f37d2..bf10f3c 100644 --- a/lib/model_get_whatsapp_campaigns_campaigns.go +++ b/lib/model_get_whatsapp_campaigns_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsappCampaignsCampaigns struct { // ID of the WhatsApp Campaign @@ -26,8 +26,8 @@ type GetWhatsappCampaignsCampaigns struct { // Count of invalidated contacts InvalidatedContacts int64 `json:"invalidatedContacts,omitempty"` // Read percentage of the the WhatsApp campaign created - ReadPercentage float32 `json:"readPercentage,omitempty"` - Stats *WhatsappCampStats `json:"stats,omitempty"` + ReadPercentage float32 `json:"readPercentage,omitempty"` + Stats *WhatsappCampStats `json:"stats,omitempty"` // Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ) diff --git a/lib/model_get_whatsapp_event_report.go b/lib/model_get_whatsapp_event_report.go index 5b6ba52..1fd4e24 100644 --- a/lib/model_get_whatsapp_event_report.go +++ b/lib/model_get_whatsapp_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsappEventReport struct { Events []GetWhatsappEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_whatsapp_event_report_events.go b/lib/model_get_whatsapp_event_report_events.go index 04e8d50..e226927 100644 --- a/lib/model_get_whatsapp_event_report_events.go +++ b/lib/model_get_whatsapp_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type GetWhatsappEventReportEvents struct { // WhatsApp Number with country code. Example, 85264318721 diff --git a/lib/model_inline_response_200.go b/lib/model_inline_response_200.go index e2e58b8..c0c7d9a 100644 --- a/lib/model_inline_response_200.go +++ b/lib/model_inline_response_200.go @@ -1,17 +1,15 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -// Created company id type InlineResponse200 struct { - // Unique company id - Id string `json:"id"` + Message string `json:"message,omitempty"` } diff --git a/lib/model_inline_response_200_1.go b/lib/model_inline_response_200_1.go new file mode 100644 index 0000000..002c099 --- /dev/null +++ b/lib/model_inline_response_200_1.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2001 struct { + // Unique id of the group + Id string `json:"id,omitempty"` + // The name of the group of sub-accounts + GroupName string `json:"groupName,omitempty"` +} diff --git a/lib/model_inline_response_200_2.go b/lib/model_inline_response_200_2.go new file mode 100644 index 0000000..b0ea723 --- /dev/null +++ b/lib/model_inline_response_200_2.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Created company id +type InlineResponse2002 struct { + // Unique company id + Id string `json:"id"` +} diff --git a/lib/model_inline_response_200_3.go b/lib/model_inline_response_200_3.go new file mode 100644 index 0000000..940939a --- /dev/null +++ b/lib/model_inline_response_200_3.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2003 struct { + // The ID of the import process + ProcessId int32 `json:"processId,omitempty"` +} diff --git a/lib/model_inline_response_200_4.go b/lib/model_inline_response_200_4.go new file mode 100644 index 0000000..f8519cc --- /dev/null +++ b/lib/model_inline_response_200_4.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2004 struct { + // ISO 4217 compliant display currency code + Code string `json:"code"` +} diff --git a/lib/model_inline_response_200_5.go b/lib/model_inline_response_200_5.go new file mode 100644 index 0000000..d386e43 --- /dev/null +++ b/lib/model_inline_response_200_5.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2005 struct { + // List of conversion attribution metrics + Results []ConversionSourceMetrics `json:"results"` + Totals *InlineResponse2005Totals `json:"totals"` +} diff --git a/lib/model_inline_response_200_5_totals.go b/lib/model_inline_response_200_5_totals.go new file mode 100644 index 0000000..c80987d --- /dev/null +++ b/lib/model_inline_response_200_5_totals.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Attribution list aggregated totals +type InlineResponse2005Totals struct { + OrdersCount float32 `json:"ordersCount"` + Revenue float32 `json:"revenue"` + AverageBasket float32 `json:"averageBasket"` +} diff --git a/lib/model_inline_response_200_6.go b/lib/model_inline_response_200_6.go new file mode 100644 index 0000000..bc81359 --- /dev/null +++ b/lib/model_inline_response_200_6.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2006 struct { + ConversionSourceMetrics *ConversionSourceMetrics `json:"ConversionSourceMetrics,omitempty"` + NewCustomersCount float32 `json:"newCustomersCount"` +} diff --git a/lib/model_inline_response_200_7.go b/lib/model_inline_response_200_7.go new file mode 100644 index 0000000..aa21df5 --- /dev/null +++ b/lib/model_inline_response_200_7.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2007 struct { + // List of attributed products + Products []ConversionSourceProduct `json:"products"` +} diff --git a/lib/model_inline_response_200_8.go b/lib/model_inline_response_200_8.go new file mode 100644 index 0000000..eb0ca7f --- /dev/null +++ b/lib/model_inline_response_200_8.go @@ -0,0 +1,20 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2008 struct { + // The id of the collection + Id string `json:"id"` + // The name of the collection + Name string `json:"name"` + // The default coupon of the collection + DefaultCoupon string `json:"defaultCoupon,omitempty"` +} diff --git a/lib/model_inline_response_201.go b/lib/model_inline_response_201.go index c52a5fa..fd228ea 100644 --- a/lib/model_inline_response_201.go +++ b/lib/model_inline_response_201.go @@ -1,17 +1,15 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -// Created deal id type InlineResponse201 struct { - // Unique deal id - Id string `json:"id"` + Id string `json:"id,omitempty"` } diff --git a/lib/model_inline_response_201_1.go b/lib/model_inline_response_201_1.go index ae9c395..d4ea1de 100644 --- a/lib/model_inline_response_201_1.go +++ b/lib/model_inline_response_201_1.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -// Task Details +// Created deal id type InlineResponse2011 struct { - // Unique task id + // Unique deal id Id string `json:"id"` } diff --git a/lib/model_inline_response_201_2.go b/lib/model_inline_response_201_2.go index 8c38522..0716696 100644 --- a/lib/model_inline_response_201_2.go +++ b/lib/model_inline_response_201_2.go @@ -1,16 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger +// Task Details type InlineResponse2012 struct { - // messageId of sent message - MessageId string `json:"messageId"` + // Unique task id + Id string `json:"id"` } diff --git a/lib/model_inline_response_201_3.go b/lib/model_inline_response_201_3.go index 3ef05fe..8b1ad48 100644 --- a/lib/model_inline_response_201_3.go +++ b/lib/model_inline_response_201_3.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type InlineResponse2013 struct { - // ID of the object created + // The id of the created collection Id string `json:"id"` } diff --git a/lib/model_inline_response_201_4.go b/lib/model_inline_response_201_4.go new file mode 100644 index 0000000..99b1a08 --- /dev/null +++ b/lib/model_inline_response_201_4.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2014 struct { + // messageId of sent message + MessageId string `json:"messageId"` +} diff --git a/lib/model_inline_response_201_5.go b/lib/model_inline_response_201_5.go new file mode 100644 index 0000000..51aa964 --- /dev/null +++ b/lib/model_inline_response_201_5.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse2015 struct { + // ID of the object created + Id string `json:"id"` +} diff --git a/lib/model_inline_response_400.go b/lib/model_inline_response_400.go new file mode 100644 index 0000000..3332ad8 --- /dev/null +++ b/lib/model_inline_response_400.go @@ -0,0 +1,15 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InlineResponse400 struct { + Message string `json:"message,omitempty"` +} diff --git a/lib/model_invite_admin_user.go b/lib/model_invite_admin_user.go new file mode 100644 index 0000000..c1b88c8 --- /dev/null +++ b/lib/model_invite_admin_user.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type InviteAdminUser struct { + // Email address for the organization + Email string `json:"email"` + // All access to the features + AllFeaturesAccess bool `json:"all_features_access"` + // Ids of Group + GroupIds []string `json:"groupIds,omitempty"` + Privileges []InviteAdminUserPrivileges `json:"privileges"` +} diff --git a/lib/model_invite_admin_user_privileges.go b/lib/model_invite_admin_user_privileges.go new file mode 100644 index 0000000..49b592b --- /dev/null +++ b/lib/model_invite_admin_user_privileges.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Privileges given to the user +type InviteAdminUserPrivileges struct { + // Feature name + Feature string `json:"feature,omitempty"` + // Permissions for a given feature + Permissions []string `json:"permissions,omitempty"` +} diff --git a/lib/model_inviteuser.go b/lib/model_inviteuser.go new file mode 100644 index 0000000..011b405 --- /dev/null +++ b/lib/model_inviteuser.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type Inviteuser struct { + // Email address for the organization + Email string `json:"email"` + // All access to the features + AllFeaturesAccess bool `json:"all_features_access"` + Privileges []InviteuserPrivileges `json:"privileges"` +} diff --git a/lib/model_inviteuser_privileges.go b/lib/model_inviteuser_privileges.go new file mode 100644 index 0000000..e3748d8 --- /dev/null +++ b/lib/model_inviteuser_privileges.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Privileges given to the user +type InviteuserPrivileges struct { + // Feature name + Feature string `json:"feature,omitempty"` + // Permissions for a given feature + Permissions []string `json:"permissions,omitempty"` +} diff --git a/lib/model_manage_ip.go b/lib/model_manage_ip.go index 1fff4e9..67e3b29 100644 --- a/lib/model_manage_ip.go +++ b/lib/model_manage_ip.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ManageIp struct { // Dedicated ID diff --git a/lib/model_master_details_response.go b/lib/model_master_details_response.go index c514de9..6576675 100644 --- a/lib/model_master_details_response.go +++ b/lib/model_master_details_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type MasterDetailsResponse struct { // Email id of master account @@ -20,7 +20,7 @@ type MasterDetailsResponse struct { // Currency code of the master account organization CurrencyCode string `json:"currencyCode,omitempty"` // Timezone of the master account organization - Timezone string `json:"timezone,omitempty"` + Timezone string `json:"timezone,omitempty"` BillingInfo *MasterDetailsResponseBillingInfo `json:"billingInfo,omitempty"` - PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"` + PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"` } diff --git a/lib/model_master_details_response_billing_info.go b/lib/model_master_details_response_billing_info.go index 614daba..246039b 100644 --- a/lib/model_master_details_response_billing_info.go +++ b/lib/model_master_details_response_billing_info.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Billing details of the master account organization type MasterDetailsResponseBillingInfo struct { // Billing email id of master account Email string `json:"email,omitempty"` // Company name of master account - CompanyName string `json:"companyName,omitempty"` - Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"` - Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"` + CompanyName string `json:"companyName,omitempty"` + Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"` + Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"` } diff --git a/lib/model_master_details_response_billing_info_address.go b/lib/model_master_details_response_billing_info_address.go index 3b04094..1568c09 100644 --- a/lib/model_master_details_response_billing_info_address.go +++ b/lib/model_master_details_response_billing_info_address.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Billing address of master account type MasterDetailsResponseBillingInfoAddress struct { diff --git a/lib/model_master_details_response_billing_info_name.go b/lib/model_master_details_response_billing_info_name.go index e6a8575..1bc9228 100644 --- a/lib/model_master_details_response_billing_info_name.go +++ b/lib/model_master_details_response_billing_info_name.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Billing name of master account holder type MasterDetailsResponseBillingInfoName struct { diff --git a/lib/model_master_details_response_plan_info.go b/lib/model_master_details_response_plan_info.go index f1dada1..a12f4b2 100644 --- a/lib/model_master_details_response_plan_info.go +++ b/lib/model_master_details_response_plan_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Plan details type MasterDetailsResponsePlanInfo struct { diff --git a/lib/model_master_details_response_plan_info_features.go b/lib/model_master_details_response_plan_info_features.go index 69bf823..58e495a 100644 --- a/lib/model_master_details_response_plan_info_features.go +++ b/lib/model_master_details_response_plan_info_features.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type MasterDetailsResponsePlanInfoFeatures struct { // Name of the feature @@ -17,8 +17,12 @@ type MasterDetailsResponsePlanInfoFeatures struct { UnitValue string `json:"unitValue,omitempty"` // Quantity provided in the plan Quantity int64 `json:"quantity,omitempty"` + // Quantity with overages provided in the plan (only applicable on ENTv2) + QuantityWithOverages int64 `json:"quantityWithOverages,omitempty"` // Quantity consumed by master Used int64 `json:"used,omitempty"` + // Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) + UsedOverages int64 `json:"usedOverages,omitempty"` // Quantity remaining in the plan Remaining int64 `json:"remaining,omitempty"` } diff --git a/lib/model_note.go b/lib/model_note.go index ff61b4b..9c449b8 100644 --- a/lib/model_note.go +++ b/lib/model_note.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "time" diff --git a/lib/model_note_data.go b/lib/model_note_data.go index 2c1c088..34a28b4 100644 --- a/lib/model_note_data.go +++ b/lib/model_note_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Note data to be saved type NoteData struct { diff --git a/lib/model_note_id.go b/lib/model_note_id.go index 9a6bacb..97708cb 100644 --- a/lib/model_note_id.go +++ b/lib/model_note_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Updated Note ID type NoteId struct { diff --git a/lib/model_note_list.go b/lib/model_note_list.go index d38b086..f377e37 100644 --- a/lib/model_note_list.go +++ b/lib/model_note_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of notes type NoteList struct { diff --git a/lib/model_notification.go b/lib/model_notification.go new file mode 100644 index 0000000..3f77b10 --- /dev/null +++ b/lib/model_notification.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. +type Notification struct { + // Channel used to send the notifications. + Channel string `json:"channel"` + // Use this field if you want to give more context to your contact about the payment request. + Text string `json:"text"` +} diff --git a/lib/model_order.go b/lib/model_order.go index 44b2949..d4083e1 100644 --- a/lib/model_order.go +++ b/lib/model_order.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Order struct { // Unique ID of the order. @@ -20,10 +20,12 @@ type Order struct { // State of the order. Status string `json:"status"` // Total amount of the order, including all shipping expenses, tax and the price of items. - Amount float32 `json:"amount"` + Amount float32 `json:"amount"` + // ID of store where the order is placed + StoreId string `json:"storeId,omitempty"` Products []OrderProducts `json:"products"` // Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. - Email string `json:"email,omitempty"` + Email string `json:"email,omitempty"` Billing *OrderBilling `json:"billing,omitempty"` // Coupons applied to the order. Stored case insensitive. Coupons []string `json:"coupons,omitempty"` diff --git a/lib/model_order_batch.go b/lib/model_order_batch.go index 9663e59..ac5dd95 100644 --- a/lib/model_order_batch.go +++ b/lib/model_order_batch.go @@ -1,18 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type OrderBatch struct { // array of order objects Orders []Order `json:"orders"` // Notify Url provided by client to get the status of batch request NotifyUrl string `json:"notifyUrl,omitempty"` + // 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. + Historical bool `json:"historical,omitempty"` } diff --git a/lib/model_order_billing.go b/lib/model_order_billing.go index 69e0b46..3a8dd9b 100644 --- a/lib/model_order_billing.go +++ b/lib/model_order_billing.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Billing details of an order. type OrderBilling struct { @@ -18,6 +18,8 @@ type OrderBilling struct { City string `json:"city,omitempty"` // Billing country 2-letter ISO code. CountryCode string `json:"countryCode,omitempty"` + // Billing country name. + Country string `json:"country,omitempty"` // Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. Phone string `json:"phone,omitempty"` // Postcode for delivery and billing. diff --git a/lib/model_order_products.go b/lib/model_order_products.go index 96353e5..e42049c 100644 --- a/lib/model_order_products.go +++ b/lib/model_order_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Details for the Products in an order. type OrderProducts struct { diff --git a/lib/model_otp.go b/lib/model_otp.go index 133a8f2..e5dfca1 100644 --- a/lib/model_otp.go +++ b/lib/model_otp.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type Otp struct { // 6 digit OTP received on email diff --git a/lib/model_pipeline.go b/lib/model_pipeline.go index 6112a2a..e970895 100644 --- a/lib/model_pipeline.go +++ b/lib/model_pipeline.go @@ -1,17 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of stages type Pipeline struct { + // Pipeline id + Pipeline string `json:"pipeline,omitempty"` + // Pipeline Name + PipelineName string `json:"pipeline_name,omitempty"` // List of stages Stages []PipelineStage `json:"stages,omitempty"` } diff --git a/lib/model_pipeline_stage.go b/lib/model_pipeline_stage.go index e3555b0..b9c62c5 100644 --- a/lib/model_pipeline_stage.go +++ b/lib/model_pipeline_stage.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of stages type PipelineStage struct { diff --git a/lib/model_pipelines.go b/lib/model_pipelines.go new file mode 100644 index 0000000..b607a08 --- /dev/null +++ b/lib/model_pipelines.go @@ -0,0 +1,15 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// List of pipeline +type Pipelines struct { +} diff --git a/lib/model_post_contact_info.go b/lib/model_post_contact_info.go index d316fb3..532bc8e 100644 --- a/lib/model_post_contact_info.go +++ b/lib/model_post_contact_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type PostContactInfo struct { Contacts *PostContactInfoContacts `json:"contacts"` diff --git a/lib/model_post_contact_info_contacts.go b/lib/model_post_contact_info_contacts.go index 732dccd..823c9a6 100644 --- a/lib/model_post_contact_info_contacts.go +++ b/lib/model_post_contact_info_contacts.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type PostContactInfoContacts struct { - Success []interface{} `json:"success,omitempty"` - Failure []interface{} `json:"failure,omitempty"` + Success []string `json:"success,omitempty"` + Failure []string `json:"failure,omitempty"` // Displays the count of total number of contacts removed from list when user opts for \"all\" option. Total int64 `json:"total,omitempty"` // Id of the process created to remove contacts from list when user opts for \"all\" option. diff --git a/lib/model_post_send_failed.go b/lib/model_post_send_failed.go index eaafbb6..b398814 100644 --- a/lib/model_post_send_failed.go +++ b/lib/model_post_send_failed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type PostSendFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingEmails []string `json:"unexistingEmails,omitempty"` + Message string `json:"message"` + UnexistingEmails []string `json:"unexistingEmails,omitempty"` WithoutListEmails []string `json:"withoutListEmails,omitempty"` BlackListedEmails []string `json:"blackListedEmails,omitempty"` } diff --git a/lib/model_post_send_sms_test_failed.go b/lib/model_post_send_sms_test_failed.go index 2a6bafe..53a0031 100644 --- a/lib/model_post_send_sms_test_failed.go +++ b/lib/model_post_send_sms_test_failed.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type PostSendSmsTestFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingSms []string `json:"unexistingSms,omitempty"` + Message string `json:"message"` + UnexistingSms []string `json:"unexistingSms,omitempty"` WithoutListSms []string `json:"withoutListSms,omitempty"` } diff --git a/lib/model_put_revoke_user_permission.go b/lib/model_put_revoke_user_permission.go new file mode 100644 index 0000000..d067755 --- /dev/null +++ b/lib/model_put_revoke_user_permission.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Revoke user permission +type PutRevokeUserPermission struct { + // Email address of the user. + Email string `json:"email"` +} diff --git a/lib/model_putresendcancelinvitation.go b/lib/model_putresendcancelinvitation.go new file mode 100644 index 0000000..996acd4 --- /dev/null +++ b/lib/model_putresendcancelinvitation.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Revoke user permission +type Putresendcancelinvitation struct { + // Email address of the user. + Email string `json:"email"` +} diff --git a/lib/model_remaining_credit_model.go b/lib/model_remaining_credit_model.go index d9e7cc9..c1cfa37 100644 --- a/lib/model_remaining_credit_model.go +++ b/lib/model_remaining_credit_model.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RemainingCreditModel struct { - Child *RemainingCreditModelChild `json:"child"` + Child *RemainingCreditModelChild `json:"child"` Reseller *RemainingCreditModelReseller `json:"reseller"` } diff --git a/lib/model_remaining_credit_model_child.go b/lib/model_remaining_credit_model_child.go index ef1947f..cdba385 100644 --- a/lib/model_remaining_credit_model_child.go +++ b/lib/model_remaining_credit_model_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Credits remaining for child account type RemainingCreditModelChild struct { diff --git a/lib/model_remaining_credit_model_reseller.go b/lib/model_remaining_credit_model_reseller.go index 18d47e2..7104545 100644 --- a/lib/model_remaining_credit_model_reseller.go +++ b/lib/model_remaining_credit_model_reseller.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RemainingCreditModelReseller struct { // SMS Credits remaining for reseller account diff --git a/lib/model_remove_contact_from_list.go b/lib/model_remove_contact_from_list.go index 17a26b0..0800bb2 100644 --- a/lib/model_remove_contact_from_list.go +++ b/lib/model_remove_contact_from_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RemoveContactFromList struct { // Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. diff --git a/lib/model_remove_credits.go b/lib/model_remove_credits.go index d849de3..ce5f14e 100644 --- a/lib/model_remove_credits.go +++ b/lib/model_remove_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RemoveCredits struct { // Required if email credits are empty. SMS credits to be removed from the child account diff --git a/lib/model_request_contact_export.go b/lib/model_request_contact_export.go index a7b6206..0d99042 100644 --- a/lib/model_request_contact_export.go +++ b/lib/model_request_contact_export.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RequestContactExport struct { // List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. - ExportAttributes []string `json:"exportAttributes,omitempty"` + ExportAttributes []string `json:"exportAttributes,omitempty"` CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter"` // Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 NotifyUrl string `json:"notifyUrl,omitempty"` diff --git a/lib/model_request_contact_export_custom_contact_filter.go b/lib/model_request_contact_export_custom_contact_filter.go index a79b7d6..0d83c2d 100644 --- a/lib/model_request_contact_export_custom_contact_filter.go +++ b/lib/model_request_contact_export_custom_contact_filter.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Set the filter for the contacts to be exported. type RequestContactExportCustomContactFilter struct { - // 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. + // 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. ActionForContacts string `json:"actionForContacts,omitempty"` - // 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). + // 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). ActionForEmailCampaigns string `json:"actionForEmailCampaigns,omitempty"` - // 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. + // 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. ActionForSmsCampaigns string `json:"actionForSmsCampaigns,omitempty"` // Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. ListId int64 `json:"listId,omitempty"` diff --git a/lib/model_request_contact_import.go b/lib/model_request_contact_import.go index 6ce7d5a..0ac0c9c 100644 --- a/lib/model_request_contact_import.go +++ b/lib/model_request_contact_import.go @@ -1,35 +1,35 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RequestContactImport struct { // Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json FileUrl string `json:"fileUrl,omitempty"` // 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. FileBody string `json:"fileBody,omitempty"` - // **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. - JsonBody []map[string]interface{} `json:"jsonBody,omitempty"` + // **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. + JsonBody []RequestContactImportJsonBody `json:"jsonBody,omitempty"` // Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. ListIds []int64 `json:"listIds,omitempty"` // URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - NotifyUrl string `json:"notifyUrl,omitempty"` - NewList *RequestContactImportNewList `json:"newList,omitempty"` + NotifyUrl string `json:"notifyUrl,omitempty"` + NewList *RequestContactImportNewList `json:"newList,omitempty"` // To blacklist all the contacts for email EmailBlacklist bool `json:"emailBlacklist,omitempty"` + // To disable email notification + DisableNotification bool `json:"disableNotification,omitempty"` // To blacklist all the contacts for sms SmsBlacklist bool `json:"smsBlacklist,omitempty"` // To facilitate the choice to update the existing contacts UpdateExistingContacts bool `json:"updateExistingContacts,omitempty"` // 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 ) EmptyContactsAttributes bool `json:"emptyContactsAttributes,omitempty"` - // To disable email notification - DisableNotification bool `json:"disableNotification,omitempty"` } diff --git a/lib/model_request_contact_import_json_body.go b/lib/model_request_contact_import_json_body.go new file mode 100644 index 0000000..e617c3a --- /dev/null +++ b/lib/model_request_contact_import_json_body.go @@ -0,0 +1,17 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type RequestContactImportJsonBody struct { + Email string `json:"email,omitempty"` + // List of attributes to be imported + Attributes map[string]interface{} `json:"attributes,omitempty"` +} diff --git a/lib/model_request_contact_import_new_list.go b/lib/model_request_contact_import_new_list.go index 2bd86aa..148756f 100644 --- a/lib/model_request_contact_import_new_list.go +++ b/lib/model_request_contact_import_new_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // To create a new list and import the contacts into it, pass the listName and an optional folderId. type RequestContactImportNewList struct { diff --git a/lib/model_request_sms_recipient_export.go b/lib/model_request_sms_recipient_export.go index 2698b1c..3c69b50 100644 --- a/lib/model_request_sms_recipient_export.go +++ b/lib/model_request_sms_recipient_export.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type RequestSmsRecipientExport struct { // URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 diff --git a/lib/model_schedule_smtp_email.go b/lib/model_schedule_smtp_email.go index 7c616a8..d0f5e7c 100644 --- a/lib/model_schedule_smtp_email.go +++ b/lib/model_schedule_smtp_email.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type ScheduleSmtpEmail struct { // Message ID of the transactional email scheduled - MessageId string `json:"messageId,omitempty"` + MessageId string `json:"messageId,omitempty"` MessageIds []string `json:"messageIds,omitempty"` // Batch ID of the batch transactional email scheduled BatchId string `json:"batchId,omitempty"` diff --git a/lib/model_send_report.go b/lib/model_send_report.go index ae915f9..f7e0a3f 100644 --- a/lib/model_send_report.go +++ b/lib/model_send_report.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendReport struct { // Language of email content for campaign report sending. - Language string `json:"language,omitempty"` - Email *SendReportEmail `json:"email"` + Language string `json:"language,omitempty"` + Email *SendReportEmail `json:"email"` } diff --git a/lib/model_send_report_email.go b/lib/model_send_report_email.go index e87e61f..af5e286 100644 --- a/lib/model_send_report_email.go +++ b/lib/model_send_report_email.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Custom attributes for the report email. type SendReportEmail struct { diff --git a/lib/model_send_sms.go b/lib/model_send_sms.go index 45e02b9..3622762 100644 --- a/lib/model_send_sms.go +++ b/lib/model_send_sms.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSms struct { Reference string `json:"reference"` - MessageId int64 `json:"messageId"` + MessageId int64 `json:"messageId"` // Count of SMS's to send multiple text messages SmsCount int64 `json:"smsCount,omitempty"` // SMS credits used per text message diff --git a/lib/model_send_smtp_email.go b/lib/model_send_smtp_email.go index fe6177c..7d0578f 100644 --- a/lib/model_send_smtp_email.go +++ b/lib/model_send_smtp_email.go @@ -1,14 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger + +import ( + "time" +) type SendSmtpEmail struct { Sender *SendSmtpEmailSender `json:"sender,omitempty"` @@ -38,7 +42,7 @@ type SendSmtpEmail struct { // Tag your emails to find them more easily Tags []string `json:"tags,omitempty"` // 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**. - ScheduledAt string `json:"scheduledAt,omitempty"` + ScheduledAt time.Time `json:"scheduledAt,omitempty"` // 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. BatchId string `json:"batchId,omitempty"` } diff --git a/lib/model_send_smtp_email_attachment.go b/lib/model_send_smtp_email_attachment.go index a0f4af2..74dd39c 100644 --- a/lib/model_send_smtp_email_attachment.go +++ b/lib/model_send_smtp_email_attachment.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailAttachment struct { // Absolute url of the attachment (no local file). diff --git a/lib/model_send_smtp_email_bcc.go b/lib/model_send_smtp_email_bcc.go index 9df3b5a..2403769 100644 --- a/lib/model_send_smtp_email_bcc.go +++ b/lib/model_send_smtp_email_bcc.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailBcc struct { // Email address of the recipient in bcc diff --git a/lib/model_send_smtp_email_cc.go b/lib/model_send_smtp_email_cc.go index 61c1e01..da957e7 100644 --- a/lib/model_send_smtp_email_cc.go +++ b/lib/model_send_smtp_email_cc.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailCc struct { // Email address of the recipient in cc diff --git a/lib/model_send_smtp_email_message_versions.go b/lib/model_send_smtp_email_message_versions.go index cec8794..d35aa17 100644 --- a/lib/model_send_smtp_email_message_versions.go +++ b/lib/model_send_smtp_email_message_versions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailMessageVersions struct { // List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] @@ -18,8 +18,12 @@ type SendSmtpEmailMessageVersions struct { // List of email addresses and names (optional) of the recipients in bcc Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"` // List of email addresses and names (optional) of the recipients in cc - Cc []SendSmtpEmailCc `json:"cc,omitempty"` + Cc []SendSmtpEmailCc `json:"cc,omitempty"` ReplyTo *SendSmtpEmailReplyTo1 `json:"replyTo,omitempty"` - // Custom subject specific to message version + // Custom subject specific to message version Subject string `json:"subject,omitempty"` + // HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** + HtmlContent string `json:"htmlContent,omitempty"` + // Plain Text body of the message. **Ignored if 'templateId' is passed** + TextContent string `json:"textContent,omitempty"` } diff --git a/lib/model_send_smtp_email_reply_to.go b/lib/model_send_smtp_email_reply_to.go index 8719912..5cf211e 100644 --- a/lib/model_send_smtp_email_reply_to.go +++ b/lib/model_send_smtp_email_reply_to.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. type SendSmtpEmailReplyTo struct { diff --git a/lib/model_send_smtp_email_reply_to_1.go b/lib/model_send_smtp_email_reply_to_1.go index 2703727..59da7c9 100644 --- a/lib/model_send_smtp_email_reply_to_1.go +++ b/lib/model_send_smtp_email_reply_to_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"} type SendSmtpEmailReplyTo1 struct { diff --git a/lib/model_send_smtp_email_sender.go b/lib/model_send_smtp_email_sender.go index 5e7e7e6..86ff659 100644 --- a/lib/model_send_smtp_email_sender.go +++ b/lib/model_send_smtp_email_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2} type SendSmtpEmailSender struct { diff --git a/lib/model_send_smtp_email_to.go b/lib/model_send_smtp_email_to.go index 961d188..68b1b29 100644 --- a/lib/model_send_smtp_email_to.go +++ b/lib/model_send_smtp_email_to.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailTo struct { // Email address of the recipient diff --git a/lib/model_send_smtp_email_to_1.go b/lib/model_send_smtp_email_to_1.go index bc90951..02d9761 100644 --- a/lib/model_send_smtp_email_to_1.go +++ b/lib/model_send_smtp_email_to_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendSmtpEmailTo1 struct { // Email address of the recipient diff --git a/lib/model_send_test_email.go b/lib/model_send_test_email.go index 69c0739..447d967 100644 --- a/lib/model_send_test_email.go +++ b/lib/model_send_test_email.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendTestEmail struct { // 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. diff --git a/lib/model_send_test_sms.go b/lib/model_send_test_sms.go index 1cd872b..5a68431 100644 --- a/lib/model_send_test_sms.go +++ b/lib/model_send_test_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendTestSms struct { // 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 diff --git a/lib/model_send_transac_sms.go b/lib/model_send_transac_sms.go index 39ca986..86186cc 100644 --- a/lib/model_send_transac_sms.go +++ b/lib/model_send_transac_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendTransacSms struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** diff --git a/lib/model_send_whatsapp_message.go b/lib/model_send_whatsapp_message.go index fe1e5f0..96d98e9 100644 --- a/lib/model_send_whatsapp_message.go +++ b/lib/model_send_whatsapp_message.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SendWhatsappMessage struct { // ID of the template to send @@ -17,6 +17,8 @@ type SendWhatsappMessage struct { Text string `json:"text,omitempty"` // WhatsApp Number with country code. Example, 85264318721 SenderNumber string `json:"senderNumber"` + // Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. + Params map[string]interface{} `json:"params,omitempty"` // List of phone numbers of the contacts ContactNumbers []string `json:"contactNumbers"` } diff --git a/lib/model_set_config_display_currency.go b/lib/model_set_config_display_currency.go new file mode 100644 index 0000000..bb1924b --- /dev/null +++ b/lib/model_set_config_display_currency.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type SetConfigDisplayCurrency struct { + // ISO 4217 compliant display currency code + Code string `json:"code"` +} diff --git a/lib/model_sso_token_request.go b/lib/model_sso_token_request.go index d53db44..d1fa0ac 100644 --- a/lib/model_sso_token_request.go +++ b/lib/model_sso_token_request.go @@ -1,20 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SsoTokenRequest struct { // Id of the sub-account organization Id int64 `json:"id"` // User email of sub-account organization Email string `json:"email,omitempty"` - // 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 + // 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 Target string `json:"target,omitempty"` + // Set the full target URL after login success. The user will land directly on this target URL after login + Url string `json:"url,omitempty"` } diff --git a/lib/model_sso_token_request_corporate.go b/lib/model_sso_token_request_corporate.go new file mode 100644 index 0000000..3fae21b --- /dev/null +++ b/lib/model_sso_token_request_corporate.go @@ -0,0 +1,16 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type SsoTokenRequestCorporate struct { + // User email of sub-account organization + Email string `json:"email"` +} diff --git a/lib/model_sub_account_apps_toggle_request.go b/lib/model_sub_account_apps_toggle_request.go new file mode 100644 index 0000000..383ffd9 --- /dev/null +++ b/lib/model_sub_account_apps_toggle_request.go @@ -0,0 +1,41 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// List of enable/disable applications on the sub-account +type SubAccountAppsToggleRequest struct { + // Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2 + Inbox bool `json:"inbox,omitempty"` + // Set this field to enable or disable Whatsapp campaigns on the sub-account + Whatsapp bool `json:"whatsapp,omitempty"` + // Set this field to enable or disable Automation on the sub-account + Automation bool `json:"automation,omitempty"` + // Set this field to enable or disable Email Campaigns on the sub-account + EmailCampaigns bool `json:"email-campaigns,omitempty"` + // Set this field to enable or disable SMS Marketing on the sub-account + SmsCampaigns bool `json:"sms-campaigns,omitempty"` + // Set this field to enable or disable Landing pages on the sub-account + LandingPages bool `json:"landing-pages,omitempty"` + // Set this field to enable or disable Transactional Email on the sub-account + TransactionalEmails bool `json:"transactional-emails,omitempty"` + // Set this field to enable or disable Transactional SMS on the sub-account + TransactionalSms bool `json:"transactional-sms,omitempty"` + // Set this field to enable or disable Facebook ads on the sub-account + FacebookAds bool `json:"facebook-ads,omitempty"` + // Set this field to enable or disable Web Push on the sub-account + WebPush bool `json:"web-push,omitempty"` + // Set this field to enable or disable Meetings on the sub-account + Meetings bool `json:"meetings,omitempty"` + // Set this field to enable or disable Conversations on the sub-account + Conversations bool `json:"conversations,omitempty"` + // Set this field to enable or disable Sales CRM on the sub-account + Crm bool `json:"crm,omitempty"` +} diff --git a/lib/model_sub_account_details_response.go b/lib/model_sub_account_details_response.go index a1488f1..e0bc355 100644 --- a/lib/model_sub_account_details_response.go +++ b/lib/model_sub_account_details_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SubAccountDetailsResponse struct { // Name of the sub-account user @@ -16,6 +16,8 @@ type SubAccountDetailsResponse struct { // Email id of the sub-account organization Email string `json:"email,omitempty"` // Sub-account company name - CompanyName string `json:"companyName,omitempty"` - PlanInfo *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"` + CompanyName string `json:"companyName,omitempty"` + // List of group(s) associated with the sub-account + Groups []SubAccountDetailsResponseGroups `json:"groups,omitempty"` + PlanInfo *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"` } diff --git a/lib/model_sub_account_details_response_groups.go b/lib/model_sub_account_details_response_groups.go new file mode 100644 index 0000000..fc57349 --- /dev/null +++ b/lib/model_sub_account_details_response_groups.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type SubAccountDetailsResponseGroups struct { + // Group id + Id string `json:"id,omitempty"` + // Name of the group + Name string `json:"name,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info.go b/lib/model_sub_account_details_response_plan_info.go index db594ae..ca86578 100644 --- a/lib/model_sub_account_details_response_plan_info.go +++ b/lib/model_sub_account_details_response_plan_info.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Sub-account plan details type SubAccountDetailsResponsePlanInfo struct { - Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"` + Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"` Features *SubAccountDetailsResponsePlanInfoFeatures `json:"features,omitempty"` // type of the plan PlanType string `json:"planType,omitempty"` diff --git a/lib/model_sub_account_details_response_plan_info_credits.go b/lib/model_sub_account_details_response_plan_info_credits.go index 120b753..3524d88 100644 --- a/lib/model_sub_account_details_response_plan_info_credits.go +++ b/lib/model_sub_account_details_response_plan_info_credits.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Credits quota and remaining credits on the sub-account type SubAccountDetailsResponsePlanInfoCredits struct { - // SMS credits remaining on the sub-account - Sms int64 `json:"sms,omitempty"` Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"` + Sms *SubAccountDetailsResponsePlanInfoCreditsSms `json:"sms,omitempty"` + WpSubscribers *SubAccountDetailsResponsePlanInfoCreditsWpSubscribers `json:"wpSubscribers,omitempty"` } diff --git a/lib/model_sub_account_details_response_plan_info_credits_emails.go b/lib/model_sub_account_details_response_plan_info_credits_emails.go index 8bec6bd..30a61cd 100644 --- a/lib/model_sub_account_details_response_plan_info_credits_emails.go +++ b/lib/model_sub_account_details_response_plan_info_credits_emails.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Email credits remaining on the sub-account type SubAccountDetailsResponsePlanInfoCreditsEmails struct { diff --git a/lib/model_sub_account_details_response_plan_info_credits_sms.go b/lib/model_sub_account_details_response_plan_info_credits_sms.go new file mode 100644 index 0000000..04f9ba1 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_credits_sms.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// SMS credits remaining on the sub-account +type SubAccountDetailsResponsePlanInfoCreditsSms struct { + // Quantity of SMS messaging limits provided + Quantity int64 `json:"quantity,omitempty"` + // Available SMS messaging limits for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go new file mode 100644 index 0000000..8c604da --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go @@ -0,0 +1,19 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +// Push credits remaining on the sub-account +type SubAccountDetailsResponsePlanInfoCreditsWpSubscribers struct { + // Quantity of Push sending limits provided + Quantity int64 `json:"quantity,omitempty"` + // Available Push sending limits for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_features.go b/lib/model_sub_account_details_response_plan_info_features.go index 8b21b79..07982b9 100644 --- a/lib/model_sub_account_details_response_plan_info_features.go +++ b/lib/model_sub_account_details_response_plan_info_features.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Features available on the sub-account type SubAccountDetailsResponsePlanInfoFeatures struct { - Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"` + Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"` LandingPage *SubAccountDetailsResponsePlanInfoFeaturesLandingPage `json:"landingPage,omitempty"` - Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"` + Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"` } diff --git a/lib/model_sub_account_details_response_plan_info_features_inbox.go b/lib/model_sub_account_details_response_plan_info_features_inbox.go index 0ca3b67..2df6257 100644 --- a/lib/model_sub_account_details_response_plan_info_features_inbox.go +++ b/lib/model_sub_account_details_response_plan_info_features_inbox.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -// Inbox details +// Inbox details / Not available on ENTv2 type SubAccountDetailsResponsePlanInfoFeaturesInbox struct { // Quantity of inbox provided Quantity int64 `json:"quantity,omitempty"` diff --git a/lib/model_sub_account_details_response_plan_info_features_landing_page.go b/lib/model_sub_account_details_response_plan_info_features_landing_page.go index 389a3a4..598a249 100644 --- a/lib/model_sub_account_details_response_plan_info_features_landing_page.go +++ b/lib/model_sub_account_details_response_plan_info_features_landing_page.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger -// Landing page details +// Landing page details / Not available on ENTv2 type SubAccountDetailsResponsePlanInfoFeaturesLandingPage struct { // Quantity of landing pages provided Quantity int64 `json:"quantity,omitempty"` diff --git a/lib/model_sub_account_details_response_plan_info_features_users.go b/lib/model_sub_account_details_response_plan_info_features_users.go index e63ee78..fd1924a 100644 --- a/lib/model_sub_account_details_response_plan_info_features_users.go +++ b/lib/model_sub_account_details_response_plan_info_features_users.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Multi-account details type SubAccountDetailsResponsePlanInfoFeaturesUsers struct { diff --git a/lib/model_sub_account_update_plan_request.go b/lib/model_sub_account_update_plan_request.go index a085ff4..fb4668b 100644 --- a/lib/model_sub_account_update_plan_request.go +++ b/lib/model_sub_account_update_plan_request.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Details of the plan to be changed type SubAccountUpdatePlanRequest struct { - Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"` + Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"` Features *SubAccountUpdatePlanRequestFeatures `json:"features,omitempty"` } diff --git a/lib/model_sub_account_update_plan_request_credits.go b/lib/model_sub_account_update_plan_request_credits.go index c9e1650..982e352 100644 --- a/lib/model_sub_account_update_plan_request_credits.go +++ b/lib/model_sub_account_update_plan_request_credits.go @@ -1,17 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Credit details to update type SubAccountUpdatePlanRequestCredits struct { // Number of email credits Email int64 `json:"email,omitempty"` + // Number of SMS credits | available in ENT-v2 only + Sms float32 `json:"sms,omitempty"` + // Number of Push credits, possible value is 0 and -1 | available in ENT-v2 only + WpSubscribers int64 `json:"wpSubscribers,omitempty"` } diff --git a/lib/model_sub_account_update_plan_request_features.go b/lib/model_sub_account_update_plan_request_features.go index 6087079..361a28e 100644 --- a/lib/model_sub_account_update_plan_request_features.go +++ b/lib/model_sub_account_update_plan_request_features.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Features details to update type SubAccountUpdatePlanRequestFeatures struct { // Number of multi-users Users int64 `json:"users,omitempty"` - // Number of landing pages + // Number of landing pages / Not required on ENTv2 LandingPage int64 `json:"landingPage,omitempty"` - // Number of inboxes + // Number of inboxes / Not required on ENTv2 Inbox int64 `json:"inbox,omitempty"` } diff --git a/lib/model_sub_accounts_response.go b/lib/model_sub_accounts_response.go index d86beb3..1491c90 100644 --- a/lib/model_sub_accounts_response.go +++ b/lib/model_sub_accounts_response.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SubAccountsResponse struct { // Total number of subaccounts - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` SubAccounts []SubAccountsResponseSubAccounts `json:"subAccounts,omitempty"` } diff --git a/lib/model_sub_accounts_response_groups.go b/lib/model_sub_accounts_response_groups.go new file mode 100644 index 0000000..636519f --- /dev/null +++ b/lib/model_sub_accounts_response_groups.go @@ -0,0 +1,18 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type SubAccountsResponseGroups struct { + // Group identifier + Id string `json:"id,omitempty"` + // Name of the group + Name string `json:"name,omitempty"` +} diff --git a/lib/model_sub_accounts_response_sub_accounts.go b/lib/model_sub_accounts_response_sub_accounts.go index 24a48ca..9468b7e 100644 --- a/lib/model_sub_accounts_response_sub_accounts.go +++ b/lib/model_sub_accounts_response_sub_accounts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type SubAccountsResponseSubAccounts struct { // id of the sub-account @@ -19,4 +19,6 @@ type SubAccountsResponseSubAccounts struct { Active bool `json:"active"` // Timestamp when the sub-account was created CreatedAt int64 `json:"createdAt"` + // Group details + Groups []SubAccountsResponseGroups `json:"groups"` } diff --git a/lib/model_task.go b/lib/model_task.go index 43d3b6d..f751885 100644 --- a/lib/model_task.go +++ b/lib/model_task.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Task Details type Task struct { diff --git a/lib/model_task_list.go b/lib/model_task_list.go index cdec7bc..5a71b86 100644 --- a/lib/model_task_list.go +++ b/lib/model_task_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // List of tasks type TaskList struct { diff --git a/lib/model_task_reminder.go b/lib/model_task_reminder.go index 32ca0c3..5cb28fb 100644 --- a/lib/model_task_reminder.go +++ b/lib/model_task_reminder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Task reminder date/time for a task type TaskReminder struct { diff --git a/lib/model_task_types.go b/lib/model_task_types.go index 3f82df0..ecfe48c 100644 --- a/lib/model_task_types.go +++ b/lib/model_task_types.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Task types details type TaskTypes struct { diff --git a/lib/model_update_attribute.go b/lib/model_update_attribute.go index 5cee252..34e7cba 100644 --- a/lib/model_update_attribute.go +++ b/lib/model_update_attribute.go @@ -1,18 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateAttribute struct { // Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' Value string `json:"value,omitempty"` // 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\"}] Enumeration []UpdateAttributeEnumeration `json:"enumeration,omitempty"` + // Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** + MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"` } diff --git a/lib/model_update_attribute_enumeration.go b/lib/model_update_attribute_enumeration.go index e7448c1..dffd1d1 100644 --- a/lib/model_update_attribute_enumeration.go +++ b/lib/model_update_attribute_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateAttributeEnumeration struct { // Id of the value diff --git a/lib/model_update_batch_contacts.go b/lib/model_update_batch_contacts.go index eba3b3f..39299f1 100644 --- a/lib/model_update_batch_contacts.go +++ b/lib/model_update_batch_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateBatchContacts struct { // List of contacts to be updated diff --git a/lib/model_update_batch_contacts_contacts.go b/lib/model_update_batch_contacts_contacts.go index 0994c36..4105c2d 100644 --- a/lib/model_update_batch_contacts_contacts.go +++ b/lib/model_update_batch_contacts_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateBatchContactsContacts struct { // Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) @@ -22,9 +22,9 @@ type UpdateBatchContactsContacts struct { // 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\"}** Attributes map[string]interface{} `json:"attributes,omitempty"` // Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) - EmailBlacklisted bool `json:"emailBlacklisted,omitempty"` + EmailBlacklisted bool `json:"emailBlacklisted"` // Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) - SmsBlacklisted bool `json:"smsBlacklisted,omitempty"` + SmsBlacklisted bool `json:"smsBlacklisted"` // Ids of the lists to add the contact to ListIds []int64 `json:"listIds,omitempty"` // Ids of the lists to remove the contact from diff --git a/lib/model_update_batch_contacts_model.go b/lib/model_update_batch_contacts_model.go index 548f211..dc6aea0 100644 --- a/lib/model_update_batch_contacts_model.go +++ b/lib/model_update_batch_contacts_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateBatchContactsModel struct { SuccessIds []int64 `json:"successIds,omitempty"` diff --git a/lib/model_update_campaign_status.go b/lib/model_update_campaign_status.go index 37a41fc..c58f6e6 100644 --- a/lib/model_update_campaign_status.go +++ b/lib/model_update_campaign_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Status of the campaign type UpdateCampaignStatus struct { diff --git a/lib/model_update_child.go b/lib/model_update_child.go index dbab372..cb37e29 100644 --- a/lib/model_update_child.go +++ b/lib/model_update_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateChild struct { // New Email address to update the child account diff --git a/lib/model_update_child_account_status.go b/lib/model_update_child_account_status.go index 967a108..b7337f0 100644 --- a/lib/model_update_child_account_status.go +++ b/lib/model_update_child_account_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateChildAccountStatus struct { // Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) diff --git a/lib/model_update_child_domain.go b/lib/model_update_child_domain.go index 77311a9..06d48e5 100644 --- a/lib/model_update_child_domain.go +++ b/lib/model_update_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateChildDomain struct { // Value for the sender domain that will replace the existing domain diff --git a/lib/model_update_contact.go b/lib/model_update_contact.go index dcae9f7..c02781b 100644 --- a/lib/model_update_contact.go +++ b/lib/model_update_contact.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateContact struct { - // Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + // 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\"} Attributes map[string]interface{} `json:"attributes,omitempty"` // Pass your own Id to update ext_id of a contact. ExtId string `json:"ext_id,omitempty"` diff --git a/lib/model_update_coupon_collection.go b/lib/model_update_coupon_collection.go new file mode 100644 index 0000000..9c727dd --- /dev/null +++ b/lib/model_update_coupon_collection.go @@ -0,0 +1,26 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +import ( + "time" +) + +type UpdateCouponCollection struct { + // A default coupon to be used in case there are no coupons left + DefaultCoupon string `json:"defaultCoupon,omitempty"` + // Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date. + ExpirationDate time.Time `json:"expirationDate,omitempty"` + // Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts. + RemainingDaysAlert int32 `json:"remainingDaysAlert,omitempty"` + // Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts. + RemainingCouponsAlert int32 `json:"remainingCouponsAlert,omitempty"` +} diff --git a/lib/model_update_email_campaign.go b/lib/model_update_email_campaign.go index 6eaf0f5..b6b2228 100644 --- a/lib/model_update_email_campaign.go +++ b/lib/model_update_email_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateEmailCampaign struct { // Tag of the campaign @@ -24,6 +24,8 @@ type UpdateEmailCampaign struct { ScheduledAt string `json:"scheduledAt,omitempty"` // Subject of the campaign Subject string `json:"subject,omitempty"` + // Preview text or preheader of the email campaign + PreviewText string `json:"previewText,omitempty"` // Email on which campaign recipients will be able to reply to ReplyTo string `json:"replyTo,omitempty"` // 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 diff --git a/lib/model_update_email_campaign_recipients.go b/lib/model_update_email_campaign_recipients.go index c3ff97f..e7a075f 100644 --- a/lib/model_update_email_campaign_recipients.go +++ b/lib/model_update_email_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Segment ids and List ids to include/exclude from campaign type UpdateEmailCampaignRecipients struct { diff --git a/lib/model_update_email_campaign_sender.go b/lib/model_update_email_campaign_sender.go index e71f62f..89ed165 100644 --- a/lib/model_update_email_campaign_sender.go +++ b/lib/model_update_email_campaign_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type UpdateEmailCampaignSender struct { diff --git a/lib/model_update_external_feed.go b/lib/model_update_external_feed.go index 569e5c4..67f8680 100644 --- a/lib/model_update_external_feed.go +++ b/lib/model_update_external_feed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateExternalFeed struct { // Name of the feed Name string `json:"name,omitempty"` // URL of the feed Url string `json:"url,omitempty"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType,omitempty"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_update_list.go b/lib/model_update_list.go index cd41979..db2899a 100644 --- a/lib/model_update_list.go +++ b/lib/model_update_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateList struct { // Name of the list. Either of the two parameters (name, folderId) can be updated at a time. diff --git a/lib/model_update_sender.go b/lib/model_update_sender.go index f1d02d2..212f06e 100644 --- a/lib/model_update_sender.go +++ b/lib/model_update_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateSender struct { // From Name to update the sender diff --git a/lib/model_update_sms_campaign.go b/lib/model_update_sms_campaign.go index e065b32..aa8315a 100644 --- a/lib/model_update_sms_campaign.go +++ b/lib/model_update_sms_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateSmsCampaign struct { // Name of the campaign @@ -16,7 +16,7 @@ type UpdateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender,omitempty"` // 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 - Content string `json:"content,omitempty"` + Content string `json:"content,omitempty"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // 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. ScheduledAt string `json:"scheduledAt,omitempty"` diff --git a/lib/model_update_smtp_template.go b/lib/model_update_smtp_template.go index edd8175..70b7b19 100644 --- a/lib/model_update_smtp_template.go +++ b/lib/model_update_smtp_template.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *UpdateSmtpTemplateSender `json:"sender,omitempty"` // Name of the template TemplateName string `json:"templateName,omitempty"` diff --git a/lib/model_update_smtp_template_sender.go b/lib/model_update_smtp_template_sender.go index 8f5eff9..23c406e 100644 --- a/lib/model_update_smtp_template_sender.go +++ b/lib/model_update_smtp_template_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type UpdateSmtpTemplateSender struct { diff --git a/lib/model_update_webhook.go b/lib/model_update_webhook.go index ad2cb43..edf8f15 100644 --- a/lib/model_update_webhook.go +++ b/lib/model_update_webhook.go @@ -1,22 +1,27 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UpdateWebhook struct { // URL of the webhook Url string `json:"url,omitempty"` // Description of the webhook Description string `json:"description,omitempty"` - // - 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` + // - 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` Events []string `json:"events,omitempty"` // Inbound domain of webhook, used in case of event type `inbound` Domain string `json:"domain,omitempty"` + // To send batched webhooks + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` + // Custom headers to be send with webhooks + Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_update_whats_app_campaign.go b/lib/model_update_whats_app_campaign.go new file mode 100644 index 0000000..140581f --- /dev/null +++ b/lib/model_update_whats_app_campaign.go @@ -0,0 +1,21 @@ +/* + * Brevo API + * + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * + * API version: 3.0.0 + * Contact: contact@brevo.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package swagger + +type UpdateWhatsAppCampaign struct { + // Name of the campaign + CampaignName string `json:"campaignName,omitempty"` + // Status of the campaign + CampaignStatus string `json:"campaignStatus,omitempty"` + // 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. + RescheduleFor string `json:"rescheduleFor,omitempty"` + Recipients *CreateWhatsAppCampaignRecipients `json:"recipients,omitempty"` +} diff --git a/lib/model_upload_image_model.go b/lib/model_upload_image_model.go index a2ecf9a..adaf280 100644 --- a/lib/model_upload_image_model.go +++ b/lib/model_upload_image_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UploadImageModel struct { // URL of the image uploaded diff --git a/lib/model_upload_image_to_gallery.go b/lib/model_upload_image_to_gallery.go index 9dd8037..d6e2ac1 100644 --- a/lib/model_upload_image_to_gallery.go +++ b/lib/model_upload_image_to_gallery.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type UploadImageToGallery struct { // 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. diff --git a/lib/model_variables_items.go b/lib/model_variables_items.go index 992905a..02d8229 100644 --- a/lib/model_variables_items.go +++ b/lib/model_variables_items.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type VariablesItems struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` Default_ string `json:"default,omitempty"` Datatype string `json:"datatype,omitempty"` } diff --git a/lib/model_whatsapp_camp_stats.go b/lib/model_whatsapp_camp_stats.go index e60a947..46c7517 100644 --- a/lib/model_whatsapp_camp_stats.go +++ b/lib/model_whatsapp_camp_stats.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type WhatsappCampStats struct { - Sent int32 `json:"sent"` - Delivered int32 `json:"delivered"` - Read int32 `json:"read"` + Sent int32 `json:"sent"` + Delivered int32 `json:"delivered"` + Read int32 `json:"read"` Unsubscribe int32 `json:"unsubscribe"` - NotSent int32 `json:"not_sent"` + NotSent int32 `json:"not_sent"` } diff --git a/lib/model_whatsapp_camp_template.go b/lib/model_whatsapp_camp_template.go index d3727af..39b7834 100644 --- a/lib/model_whatsapp_camp_template.go +++ b/lib/model_whatsapp_camp_template.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger type WhatsappCampTemplate struct { // name of the template @@ -16,9 +16,9 @@ type WhatsappCampTemplate struct { // description of the template Category string `json:"category,omitempty"` // language of the template - Language string `json:"language,omitempty"` - ContainsButton bool `json:"contains_button,omitempty"` - DisplayHeader bool `json:"display_header,omitempty"` + Language string `json:"language,omitempty"` + ContainsButton bool `json:"contains_button,omitempty"` + DisplayHeader bool `json:"display_header,omitempty"` // type of header HeaderType string `json:"header_type,omitempty"` // array of component item objects @@ -27,6 +27,6 @@ type WhatsappCampTemplate struct { HeaderVariables []VariablesItems `json:"header_variables,omitempty"` // array of variables item variables BodyVariables []VariablesItems `json:"body_variables,omitempty"` - ButtonType string `json:"button_type,omitempty"` - HideFooter bool `json:"hide_footer,omitempty"` + ButtonType string `json:"button_type,omitempty"` + HideFooter bool `json:"hide_footer,omitempty"` } diff --git a/lib/response.go b/lib/response.go index 3815c2d..3d2adb2 100644 --- a/lib/response.go +++ b/lib/response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package lib +package swagger import ( "net/http" diff --git a/test.go b/test.go new file mode 100644 index 0000000..b59c02d --- /dev/null +++ b/test.go @@ -0,0 +1,33 @@ +package main + +import ( + "context" + "fmt" + + brevo "github.com/getbrevo/brevo-go/lib" +) + +func main() { + var ctx context.Context + cfg := brevo.NewConfiguration() + //Configure API key authorization: api-key + cfg.AddDefaultHeader("api-key", "{api-key}") + //Configure API key authorization: partner-key + //cfg.AddDefaultHeader("partner-key", "YOUR_API_KEY") + + br := brevo.NewAPIClient(cfg) + + resp, err := br.ContactsApi.UpdateContact(ctx, "697", brevo.UpdateContact{ + Attributes: map[string]interface{}{ + "Email": "test-brevo@test.com", + }, + }) + if err != nil { + fmt.Println("Error ", err.Error()) + return + } + fmt.Println("resp:", resp) + //fmt.Printf("%+v", result.Contacts) + //fmt.Println("=============\n\n\n", result.Contacts, result.Contacts.Failure, result.Contacts.Success) + return +} From e63deb2b85f059521759c8f0073ba15f21790cbe Mon Sep 17 00:00:00 2001 From: jain-raunak Date: Thu, 11 Jul 2024 12:57:04 +0530 Subject: [PATCH 2/4] linking correctiion --- README.md | 50 +++++++++++++++---- docs/AbTestCampaignResult.md | 4 +- docs/AbTestCampaignResultClickedLinks.md | 4 +- docs/AbTestCampaignResultStatistics.md | 12 ++--- docs/AccountApi.md | 4 +- docs/Body5.md | 2 +- docs/Body6.md | 2 +- docs/Body8.md | 2 +- docs/Body9.md | 2 +- docs/Company.md | 2 +- docs/CompanyAttributesInner.md | 2 +- docs/ContactsApi.md | 34 ++++++------- docs/ConversationsMessage.md | 2 +- docs/ConversationsMessageFile.md | 2 +- docs/CorporateGroupDetailsResponse.md | 6 +-- docs/CouponsApi.md | 8 +-- docs/CreateAttribute.md | 2 +- docs/CreateContact.md | 2 +- docs/CreateDoiContact.md | 2 +- docs/CreateDomainModel.md | 2 +- docs/CreateDomainModelDnsRecords.md | 6 +-- docs/CreateEmailCampaign.md | 6 +-- docs/CreateExternalFeed.md | 2 +- docs/CreatePaymentRequest.md | 6 +-- docs/CreateSender.md | 2 +- docs/CreateSmsCampaign.md | 2 +- docs/CreateSmtpTemplate.md | 2 +- docs/CreateUpdateBatchCategory.md | 2 +- docs/CreateUpdateBatchProducts.md | 2 +- docs/CreateWebhook.md | 4 +- docs/Deal.md | 2 +- docs/DealAttributesInner.md | 2 +- docs/DealsApi.md | 4 +- docs/DomainsApi.md | 8 +-- docs/EcommerceApi.md | 26 +++++----- docs/EmailCampaignsApi.md | 14 +++--- docs/Event.md | 6 +-- docs/ExternalFeedsApi.md | 6 +-- docs/GetAccount.md | 8 +-- docs/GetAccountActivity.md | 2 +- docs/GetAccountRelay.md | 2 +- docs/GetAllExternalFeeds.md | 2 +- docs/GetAllExternalFeedsFeeds.md | 2 +- docs/GetAttributes.md | 2 +- docs/GetAttributesAttributes.md | 2 +- docs/GetCategories.md | 2 +- docs/GetChildInfo.md | 6 +-- docs/GetChildInfoApiKeys.md | 4 +- docs/GetChildrenList.md | 2 +- docs/GetContactCampaignStats.md | 18 +++---- docs/GetContactCampaignStatsClicked.md | 2 +- .../GetContactCampaignStatsUnsubscriptions.md | 4 +- docs/GetContactDetails.md | 2 +- docs/GetContacts.md | 2 +- docs/GetCorporateInvitedUsersList.md | 2 +- docs/GetCorporateInvitedUsersListUsers.md | 4 +- docs/GetCorporateUserPermission.md | 4 +- docs/GetDomainConfigurationModel.md | 2 +- docs/GetDomainsList.md | 2 +- docs/GetEmailCampaign.md | 6 +-- docs/GetEmailCampaigns.md | 2 +- docs/GetEmailEventReport.md | 2 +- docs/GetExtendedCampaignOverview.md | 2 +- docs/GetExtendedCampaignStats.md | 12 ++--- docs/GetExtendedClient.md | 2 +- docs/GetExtendedContactDetails.md | 4 +- docs/GetExtendedContactDetailsStatistics.md | 18 +++---- ...ExtendedContactDetailsStatisticsClicked.md | 2 +- ...ContactDetailsStatisticsUnsubscriptions.md | 4 +- docs/GetExtendedList.md | 2 +- docs/GetExtendedListCampaignStats.md | 2 +- docs/GetExternalFeedByUuid.md | 2 +- docs/GetFolders.md | 2 +- docs/GetInboundEmailEvents.md | 2 +- docs/GetInboundEmailEventsByUuid.md | 4 +- docs/GetInvitedUsersList.md | 2 +- docs/GetInvitedUsersListFeatureAccess.md | 6 +-- docs/GetInvitedUsersListUsers.md | 2 +- docs/GetIpsFromSender.md | 2 +- docs/GetOrders.md | 2 +- docs/GetPaymentRequest.md | 4 +- docs/GetProcesses.md | 2 +- docs/GetProductDetails.md | 2 +- docs/GetProducts.md | 2 +- docs/GetReports.md | 2 +- docs/GetScheduledEmailByBatchId.md | 2 +- docs/GetSegments.md | 2 +- docs/GetSendersList.md | 2 +- docs/GetSendersListSenders.md | 2 +- docs/GetSmsCampaign.md | 4 +- docs/GetSmsCampaigns.md | 2 +- docs/GetSmsEventReport.md | 2 +- docs/GetSmtpTemplateOverview.md | 2 +- docs/GetSmtpTemplates.md | 2 +- docs/GetStatsByDevice.md | 8 +-- docs/GetTransacBlockedContacts.md | 2 +- docs/GetTransacBlockedContactsContacts.md | 2 +- docs/GetTransacEmailContent.md | 2 +- docs/GetTransacEmailsList.md | 2 +- docs/GetTransacSmsReport.md | 2 +- docs/GetUserPermission.md | 2 +- docs/GetWaTemplates.md | 2 +- docs/GetWebhook.md | 4 +- docs/GetWebhooks.md | 2 +- docs/GetWhatsappCampaigns.md | 2 +- docs/GetWhatsappEventReport.md | 2 +- docs/InboundParsingApi.md | 4 +- docs/InviteAdminUser.md | 2 +- docs/Inviteuser.md | 2 +- docs/MasterAccountApi.md | 32 ++++++------ docs/MasterDetailsResponse.md | 4 +- docs/MasterDetailsResponseBillingInfo.md | 4 +- docs/MasterDetailsResponsePlanInfo.md | 2 +- docs/Note.md | 2 +- docs/Order.md | 4 +- docs/OrderBatch.md | 2 +- docs/PaymentsApi.md | 4 +- docs/PostContactInfo.md | 2 +- docs/ProcessApi.md | 4 +- docs/RemainingCreditModel.md | 4 +- docs/RequestContactExport.md | 2 +- docs/RequestContactImport.md | 4 +- docs/ResellerApi.md | 16 +++--- docs/SMSCampaignsApi.md | 8 +-- docs/SendReport.md | 2 +- docs/SendSmtpEmail.md | 14 +++--- docs/SendSmtpEmailMessageVersions.md | 8 +-- docs/SendersApi.md | 8 +-- docs/SubAccountDetailsResponse.md | 4 +- docs/SubAccountDetailsResponsePlanInfo.md | 4 +- ...ubAccountDetailsResponsePlanInfoCredits.md | 6 +-- ...bAccountDetailsResponsePlanInfoFeatures.md | 6 +-- docs/SubAccountUpdatePlanRequest.md | 4 +- docs/SubAccountsResponse.md | 2 +- docs/SubAccountsResponseSubAccounts.md | 2 +- docs/TransactionalEmailsApi.md | 26 +++++----- docs/TransactionalSMSApi.md | 6 +-- docs/TransactionalWhatsAppApi.md | 2 +- docs/UpdateAttribute.md | 2 +- docs/UpdateBatchContacts.md | 2 +- docs/UpdateEmailCampaign.md | 4 +- docs/UpdateExternalFeed.md | 2 +- docs/UpdateSender.md | 2 +- docs/UpdateSmsCampaign.md | 2 +- docs/UpdateSmtpTemplate.md | 2 +- docs/UpdateWebhook.md | 4 +- docs/UpdateWhatsAppCampaign.md | 2 +- docs/UserApi.md | 10 ++-- docs/WebhooksApi.md | 8 +-- docs/WhatsAppCampaignsApi.md | 12 ++--- docs/WhatsappCampTemplate.md | 6 +-- 151 files changed, 378 insertions(+), 346 deletions(-) diff --git a/README.md b/README.md index b806951..32dbc12 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,51 @@ -# Go API client for swagger +# Brevo's API v3 Go Library -Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | +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. -## Overview -This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. +This is the wrapper for the API. It implements all the features of the API v3. -- API version: 3.0.0 +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 Golang 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.x.x - Package version: 1.0.0 -- Build package: io.swagger.codegen.languages.GoClientCodegen +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen For more information, please visit [https://account.brevo.com/support](https://account.brevo.com/support) -## Installation -Put the package under your project folder and add the following in import: +## Installation & Usage +Install the package to your GoLang project. ```golang -import "./swagger" +go get github.com/getbrevo/brevo-go +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: +```golang +package main +import ( + "fmt" + "context" + brevo "github.com/getbrevo/brevo-go/lib" +) + +func main() { + var ctx context.Context + cfg := brevo.NewConfiguration() + //Configure API key authorization: api-key + cfg.AddDefaultHeader("api-key", "YOUR_API_KEY") + //Configure API key authorization: partner-key + cfg.AddDefaultHeader("partner-key","YOUR_API_KEY") + + br := brevo.NewAPIClient(cfg) + result, resp, err := br.AccountApi.GetAccount(ctx) + if err != nil { + fmt.Println("Error when calling AccountApi->get_account: ",err.Error()) + return + } + fmt.Println("GetAccount Object:",result," GetAccount Response: ",resp) + return +} ``` ## Documentation for API Endpoints diff --git a/docs/AbTestCampaignResult.md b/docs/AbTestCampaignResult.md index ced5613..7147589 100644 --- a/docs/AbTestCampaignResult.md +++ b/docs/AbTestCampaignResult.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **OpenRate** | **string** | Open rate for current winning version | [optional] [default to null] **ClickRate** | **string** | Click rate for current winning version | [optional] [default to null] **WinningVersionRate** | **string** | Open/Click rate for the winner version | [optional] [default to null] -**Statistics** | [***AbTestCampaignResultStatistics**](abTestCampaignResult_statistics.md) | | [optional] [default to null] -**ClickedLinks** | [***AbTestCampaignResultClickedLinks**](abTestCampaignResult_clickedLinks.md) | | [optional] [default to null] +**Statistics** | [***AbTestCampaignResultStatistics**](AbTestCampaignResultStatistics.md) | | [optional] [default to null] +**ClickedLinks** | [***AbTestCampaignResultClickedLinks**](AbTestCampaignResultClickedLinks.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AbTestCampaignResultClickedLinks.md b/docs/AbTestCampaignResultClickedLinks.md index 9e8ab8b..6a41612 100644 --- a/docs/AbTestCampaignResultClickedLinks.md +++ b/docs/AbTestCampaignResultClickedLinks.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VersionA** | [***AbTestVersionClicks**](abTestVersionClicks.md) | | [default to null] -**VersionB** | [***AbTestVersionClicks**](abTestVersionClicks.md) | | [default to null] +**VersionA** | [***AbTestVersionClicks**](AbTestVersionClicks.md) | | [default to null] +**VersionB** | [***AbTestVersionClicks**](AbTestVersionClicks.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AbTestCampaignResultStatistics.md b/docs/AbTestCampaignResultStatistics.md index d1564a1..197b69a 100644 --- a/docs/AbTestCampaignResultStatistics.md +++ b/docs/AbTestCampaignResultStatistics.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Openers** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] -**Clicks** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] -**Unsubscribed** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] -**HardBounces** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] -**SoftBounces** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] -**Complaints** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] +**Openers** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] +**Clicks** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] +**Unsubscribed** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] +**HardBounces** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] +**SoftBounces** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] +**Complaints** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountApi.md b/docs/AccountApi.md index d7feb69..01589de 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -17,7 +17,7 @@ This endpoint does not need any parameter. ### Return type -[**GetAccount**](getAccount.md) +[**GetAccount**](GetAccount.md) ### Authorization @@ -53,7 +53,7 @@ Name | Type | Description | Notes ### Return type -[**GetAccountActivity**](getAccountActivity.md) +[**GetAccountActivity**](GetAccountActivity.md) ### Authorization diff --git a/docs/Body5.md b/docs/Body5.md index da73b96..560c7cd 100644 --- a/docs/Body5.md +++ b/docs/Body5.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Name of company | [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company creation | [optional] [default to null] +**Attributes** | [**map[string]interface{}**]| Attributes for company creation | [optional] [default to null] **CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] **LinkedContactsIds** | **[]int64** | Contact ids to be linked with company | [optional] [default to null] **LinkedDealsIds** | **[]string** | Deal ids to be linked with company | [optional] [default to null] diff --git a/docs/Body6.md b/docs/Body6.md index f1d5097..53c4936 100644 --- a/docs/Body6.md +++ b/docs/Body6.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Name of company | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company update | [optional] [default to null] +**Attributes** | [**map[string]interface{}**] | Attributes for company update | [optional] [default to null] **CountryCode** | **int64** | Country code if phone_number is passed in attributes. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Body8.md b/docs/Body8.md index 7d1bc24..0d9edb4 100644 --- a/docs/Body8.md +++ b/docs/Body8.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Name of deal | [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] +**Attributes** | [**map[string]interface{}**]| Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] **LinkedContactsIds** | **[]int64** | Contact ids to be linked with deal | [optional] [default to null] **LinkedCompaniesIds** | **[]string** | Company ids to be linked with deal | [optional] [default to null] diff --git a/docs/Body9.md b/docs/Body9.md index 00eb1e9..b66d7cb 100644 --- a/docs/Body9.md +++ b/docs/Body9.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Name of deal | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] +**Attributes** | [**map[string]interface{}**]| Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. 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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Company.md b/docs/Company.md index f7c4248..795319b 100644 --- a/docs/Company.md +++ b/docs/Company.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | Unique company id | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Company attributes with values | [optional] [default to null] +**Attributes** | [**map[string]interface{}**] | Company attributes with values | [optional] [default to null] **LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this company | [optional] [default to null] **LinkedDealsIds** | **[]string** | Deals ids for companies linked to this company | [optional] [default to null] diff --git a/docs/CompanyAttributesInner.md b/docs/CompanyAttributesInner.md index 8c3282a..0d79358 100644 --- a/docs/CompanyAttributesInner.md +++ b/docs/CompanyAttributesInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **InternalName** | **string** | | [optional] [default to null] **Label** | **string** | | [optional] [default to null] **AttributeTypeName** | **string** | | [optional] [default to null] -**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**]| | [optional] [default to null] **IsRequired** | **bool** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index 7744ec2..30b58de 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -49,7 +49,7 @@ Name | Type | Description | Notes ### Return type -[**PostContactInfo**](postContactInfo.md) +[**PostContactInfo**](PostContactInfo.md) ### Authorization @@ -103,7 +103,7 @@ Name | Type | Description | Notes ### Return type -[**CreateUpdateContactModel**](createUpdateContactModel.md) +[**CreateUpdateContactModel**](CreateUpdateContactModel.md) ### Authorization @@ -155,7 +155,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -308,7 +308,7 @@ This endpoint does not need any parameter. ### Return type -[**GetAttributes**](getAttributes.md) +[**GetAttributes**](GetAttributes.md) ### Authorization @@ -346,7 +346,7 @@ Name | Type | Description | Notes ### Return type -[**GetExtendedContactDetails**](getExtendedContactDetails.md) +[**GetExtendedContactDetails**](GetExtendedContactDetails.md) ### Authorization @@ -382,7 +382,7 @@ Name | Type | Description | Notes ### Return type -[**GetContactCampaignStats**](getContactCampaignStats.md) +[**GetContactCampaignStats**](GetContactCampaignStats.md) ### Authorization @@ -422,7 +422,7 @@ Name | Type | Description | Notes ### Return type -[**GetContacts**](getContacts.md) +[**GetContacts**](GetContacts.md) ### Authorization @@ -460,7 +460,7 @@ Name | Type | Description | Notes ### Return type -[**GetContacts**](getContacts.md) +[**GetContacts**](GetContacts.md) ### Authorization @@ -486,7 +486,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolder**](getFolder.md) +[**GetFolder**](GetFolder.md) ### Authorization @@ -523,7 +523,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolderLists**](getFolderLists.md) +[**GetFolderLists**](GetFolderLists.md) ### Authorization @@ -560,7 +560,7 @@ Name | Type | Description | Notes ### Return type -[**GetFolders**](getFolders.md) +[**GetFolders**](GetFolders.md) ### Authorization @@ -596,7 +596,7 @@ Name | Type | Description | Notes ### Return type -[**GetExtendedList**](getExtendedList.md) +[**GetExtendedList**](GetExtendedList.md) ### Authorization @@ -631,7 +631,7 @@ Name | Type | Description | Notes ### Return type -[**GetLists**](getLists.md) +[**GetLists**](GetLists.md) ### Authorization @@ -668,7 +668,7 @@ Name | Type | Description | Notes ### Return type -[**GetSegments**](getSegments.md) +[**GetSegments**](GetSegments.md) ### Authorization @@ -696,7 +696,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](createdProcessId.md) +[**CreatedProcessId**](CreatedProcessId.md) ### Authorization @@ -723,7 +723,7 @@ Name | Type | Description | Notes ### Return type -[**PostContactInfo**](postContactInfo.md) +[**PostContactInfo**](PostContactInfo.md) ### Authorization @@ -751,7 +751,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](createdProcessId.md) +[**CreatedProcessId**](CreatedProcessId.md) ### Authorization diff --git a/docs/ConversationsMessage.md b/docs/ConversationsMessage.md index 72ed4cd..312c52c 100644 --- a/docs/ConversationsMessage.md +++ b/docs/ConversationsMessage.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **CreatedAt** | **int64** | Timestamp in milliseconds. | [optional] [default to null] **IsPushed** | **bool** | `true` for pushed messages | [optional] [default to null] **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] [default to null] -**File** | [***ConversationsMessageFile**](ConversationsMessage_file.md) | | [optional] [default to null] +**File** | [***ConversationsMessageFile**](ConversationsMessageFile.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConversationsMessageFile.md b/docs/ConversationsMessageFile.md index b45731b..6ac18bb 100644 --- a/docs/ConversationsMessageFile.md +++ b/docs/ConversationsMessageFile.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Size** | **int64** | Size in bytes | [optional] [default to null] **IsImage** | **bool** | Whether the file is an image | [optional] [default to null] **Url** | **string** | URL of the file | [optional] [default to null] -**ImageInfo** | [***ConversationsMessageFileImageInfo**](ConversationsMessage_file_imageInfo.md) | | [optional] [default to null] +**ImageInfo** | [***ConversationsMessageFileImageInfo**](ConversationsMessageFileImageInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CorporateGroupDetailsResponse.md b/docs/CorporateGroupDetailsResponse.md index 8449016..5baba57 100644 --- a/docs/CorporateGroupDetailsResponse.md +++ b/docs/CorporateGroupDetailsResponse.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Group** | [***CorporateGroupDetailsResponseGroup**](corporateGroupDetailsResponse_group.md) | | [optional] [default to null] -**SubAccounts** | [**[]CorporateGroupDetailsResponseSubaccounts**](corporateGroupDetailsResponse_subaccounts.md) | | [optional] [default to null] -**Users** | [**[]CorporateGroupDetailsResponseUsers**](corporateGroupDetailsResponse_users.md) | | [optional] [default to null] +**Group** | [***CorporateGroupDetailsResponseGroup**](CorporateGroupDetailsResponseGroup.md) | | [optional] [default to null] +**SubAccounts** | [**[]CorporateGroupDetailsResponseSubaccounts**](CorporateGroupDetailsResponseSubaccounts.md) | | [optional] [default to null] +**Users** | [**[]CorporateGroupDetailsResponseUsers**](CorporateGroupDetailsResponseUsers.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CouponsApi.md b/docs/CouponsApi.md index 353101e..79a94ab 100644 --- a/docs/CouponsApi.md +++ b/docs/CouponsApi.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2013**](inline_response_201_3.md) +[**InlineResponse2013**](InlineResponse2013.md) ### Authorization @@ -76,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**GetCouponCollection**](getCouponCollection.md) +[**GetCouponCollection**](GetCouponCollection.md) ### Authorization @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### Return type -[**GetCouponCollection**](getCouponCollection.md) +[**GetCouponCollection**](GetCouponCollection.md) ### Authorization @@ -147,7 +147,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2008**](inline_response_200_8.md) +[**InlineResponse2008**](InlineResponse2008.md) ### Authorization diff --git a/docs/CreateAttribute.md b/docs/CreateAttribute.md index 0a9db15..df8e5b0 100644 --- a/docs/CreateAttribute.md +++ b/docs/CreateAttribute.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] **IsRecurring** | **bool** | Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]CreateAttributeEnumeration**](createAttribute_enumeration.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] [default to null] +**Enumeration** | [**[]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] [default to null] **MultiCategoryOptions** | **[]string** | List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** | [optional] [default to null] **Type_** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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] [default to null] diff --git a/docs/CreateContact.md b/docs/CreateContact.md index 47b127d..cebc1ba 100644 --- a/docs/CreateContact.md +++ b/docs/CreateContact.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] **ExtId** | **string** | Pass your own Id to create a contact. | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**Attributes** | [**map[string]interface{}**]| 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] [default to null] **EmailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] [default to null] **ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] diff --git a/docs/CreateDoiContact.md b/docs/CreateDoiContact.md index 82c7602..320193b 100644 --- a/docs/CreateDoiContact.md +++ b/docs/CreateDoiContact.md @@ -4,7 +4,7 @@ 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. | [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES':['India','China']} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**] | Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES':['India','China']} | [optional] [default to null] **IncludeListIds** | **[]int64** | Lists under user account where contact should be added | [default to null] **ExcludeListIds** | **[]int64** | Lists under user account where contact should not be added | [optional] [default to null] **TemplateId** | **int64** | Id of the Double opt-in (DOI) template | [default to null] diff --git a/docs/CreateDomainModel.md b/docs/CreateDomainModel.md index f3889dc..363e519 100644 --- a/docs/CreateDomainModel.md +++ b/docs/CreateDomainModel.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **DomainName** | **string** | Domain | [optional] [default to null] **DomainProvider** | **string** | Domain Provider | [optional] [default to null] **Message** | **string** | Success message | [optional] [default to null] -**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModel_dns_records.md) | | [optional] [default to null] +**DnsRecords** | [***CreateDomainModelDnsRecords**](CreateDomainModelDnsRecords.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateDomainModelDnsRecords.md b/docs/CreateDomainModelDnsRecords.md index 6169b6b..07fceaf 100644 --- a/docs/CreateDomainModelDnsRecords.md +++ b/docs/CreateDomainModelDnsRecords.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DkimRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] -**BrevoCode** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] -**DmarcRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](createDomainModel_dns_records_dkim_record.md) | | [optional] [default to null] +**DkimRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](CreateDomainModelDnsRecordsDkimRecord.md) | | [optional] [default to null] +**BrevoCode** | [***CreateDomainModelDnsRecordsDkimRecord**](CreateDomainModelDnsRecordsDkimRecord.md) | | [optional] [default to null] +**DmarcRecord** | [***CreateDomainModelDnsRecordsDkimRecord**](CreateDomainModelDnsRecordsDkimRecord.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md index 9ef9082..4b6121b 100644 --- a/docs/CreateEmailCampaign.md +++ b/docs/CreateEmailCampaign.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the campaign | [optional] [default to null] -**Sender** | [***CreateEmailCampaignSender**](createEmailCampaign_sender.md) | | [default to null] +**Sender** | [***CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | | [default to null] **Name** | **string** | Name of the campaign | [default to null] **HtmlContent** | **string** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional] [default to null] **HtmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] [default to null] @@ -14,14 +14,14 @@ Name | Type | Description | Notes **PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **ReplyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] [default to null] **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] [default to null] -**Recipients** | [***CreateEmailCampaignRecipients**](createEmailCampaign_recipients.md) | | [optional] [default to null] +**Recipients** | [***CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional] [default to null] **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] [default to null] **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 null] **MirrorActive** | **bool** | Use true to enable the mirror link | [optional] [default to null] **Footer** | **string** | Footer of the email campaign | [optional] [default to null] **Header** | **string** | Header of the email campaign | [optional] [default to null] **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] [default to null] -**Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**Params** | [**map[string]interface{}**] | 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] [default to null] **SendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to null] **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 null] **SubjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] diff --git a/docs/CreateExternalFeed.md b/docs/CreateExternalFeed.md index 9e84785..ba956f3 100644 --- a/docs/CreateExternalFeed.md +++ b/docs/CreateExternalFeed.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [optional] [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [optional] [default to null] **Cache** | **bool** | Toggle caching of feed url response | [optional] [default to null] diff --git a/docs/CreatePaymentRequest.md b/docs/CreatePaymentRequest.md index c4c6a09..fc031e5 100644 --- a/docs/CreatePaymentRequest.md +++ b/docs/CreatePaymentRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Reference** | **string** | Reference of the payment request, it will appear on the payment page. | [default to null] -**Cart** | [***Cart**](cart.md) | | [default to null] +**Cart** | [***Cart**](Cart.md) | | [default to null] **ContactId** | **int64** | Brevo ID of the contact requested to pay. | [default to null] **Description** | **string** | description of payment request. | [optional] [default to null] -**Notification** | [***Notification**](notification.md) | | [optional] [default to null] -**Configuration** | [***Configuration**](configuration.md) | | [optional] [default to null] +**Notification** | [***Notification**](Notification.md) | | [optional] [default to null] +**Configuration** | [***Configuration**](Configuration.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateSender.md b/docs/CreateSender.md index e0b13e0..33119d3 100644 --- a/docs/CreateSender.md +++ b/docs/CreateSender.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | From Name to use for the sender | [default to null] **Email** | **string** | From email to use for the sender. A verification email will be sent to this address. | [default to null] -**Ips** | [**[]CreateSenderIps**](createSender_ips.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] [default to null] +**Ips** | [**[]CreateSenderIps**](CreateSenderIps.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateSmsCampaign.md b/docs/CreateSmsCampaign.md index 59fe42d..f7b190b 100644 --- a/docs/CreateSmsCampaign.md +++ b/docs/CreateSmsCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the campaign | [default to null] **Sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [default to null] **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 | [default to null] -**Recipients** | [***CreateSmsCampaignRecipients**](createSmsCampaign_recipients.md) | | [optional] [default to null] +**Recipients** | [***CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] [default to null] **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] [default to null] **UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] **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] [default to null] diff --git a/docs/CreateSmtpTemplate.md b/docs/CreateSmtpTemplate.md index 635387a..05f43f7 100644 --- a/docs/CreateSmtpTemplate.md +++ b/docs/CreateSmtpTemplate.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the template | [optional] [default to null] -**Sender** | [***CreateSmtpTemplateSender**](createSmtpTemplate_sender.md) | | [default to null] +**Sender** | [***CreateSmtpTemplateSender**](CreateSmtpTemplateSender.md) | | [default to null] **TemplateName** | **string** | Name of the template | [default to null] **HtmlContent** | **string** | Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty | [optional] [default to null] **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] diff --git a/docs/CreateUpdateBatchCategory.md b/docs/CreateUpdateBatchCategory.md index 5b6bf53..c22afc9 100644 --- a/docs/CreateUpdateBatchCategory.md +++ b/docs/CreateUpdateBatchCategory.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Categories** | [**[]CreateUpdateCategories**](createUpdateCategories.md) | array of categories objects | [default to null] +**Categories** | [**[]CreateUpdateCategories**](CreateUpdateCategories.md) | array of categories objects | [default to null] **UpdateEnabled** | **bool** | Facilitate to update the existing categories in the same request (updateEnabled = true) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUpdateBatchProducts.md b/docs/CreateUpdateBatchProducts.md index b878205..8b8db62 100644 --- a/docs/CreateUpdateBatchProducts.md +++ b/docs/CreateUpdateBatchProducts.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Products** | [**[]CreateUpdateProducts**](createUpdateProducts.md) | array of products objects | [default to null] +**Products** | [**[]CreateUpdateProducts**](CreateUpdateProducts.md) | array of products objects | [default to null] **UpdateEnabled** | **bool** | Facilitate to update the existing categories in the same request (updateEnabled = true) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateWebhook.md b/docs/CreateWebhook.md index b73e32e..f7b9519 100644 --- a/docs/CreateWebhook.md +++ b/docs/CreateWebhook.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **Type_** | **string** | Type of the webhook | [optional] [default to null] **Domain** | **string** | Inbound domain of webhook, required in case of event type `inbound` | [optional] [default to null] **Batched** | **bool** | To send batched webhooks | [optional] [default to null] -**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] -**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](GetWebhookAuth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Deal.md b/docs/Deal.md index c763752..ce350e6 100644 --- a/docs/Deal.md +++ b/docs/Deal.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | Unique deal id | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Deal attributes with values | [optional] [default to null] +**Attributes** | [**map[string]interface{}**] | Deal attributes with values | [optional] [default to null] **LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this deal | [optional] [default to null] **LinkedCompaniesIds** | **[]string** | Companies ids for companies linked to this deal | [optional] [default to null] diff --git a/docs/DealAttributesInner.md b/docs/DealAttributesInner.md index 3638ed4..1adea35 100644 --- a/docs/DealAttributesInner.md +++ b/docs/DealAttributesInner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **InternalName** | **string** | | [optional] [default to null] **Label** | **string** | | [optional] [default to null] **AttributeTypeName** | **string** | | [optional] [default to null] -**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**]| | [optional] [default to null] **IsRequired** | **bool** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DealsApi.md b/docs/DealsApi.md index eb34957..52aa54c 100644 --- a/docs/DealsApi.md +++ b/docs/DealsApi.md @@ -173,7 +173,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2003**](inline_response_200_3.md) +[**InlineResponse2003**](InlineResponse2003.md) ### Authorization @@ -226,7 +226,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2011**](inline_response_201_1.md) +[**InlineResponse2011**](InlineResponse2011.md) ### Authorization diff --git a/docs/DomainsApi.md b/docs/DomainsApi.md index 341063a..7c33c47 100644 --- a/docs/DomainsApi.md +++ b/docs/DomainsApi.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes ### Return type -[**AuthenticateDomainModel**](authenticateDomainModel.md) +[**AuthenticateDomainModel**](AuthenticateDomainModel.md) ### Authorization @@ -57,7 +57,7 @@ Name | Type | Description | Notes ### Return type -[**CreateDomainModel**](createDomainModel.md) +[**CreateDomainModel**](CreateDomainModel.md) ### Authorization @@ -109,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**GetDomainConfigurationModel**](getDomainConfigurationModel.md) +[**GetDomainConfigurationModel**](GetDomainConfigurationModel.md) ### Authorization @@ -131,7 +131,7 @@ This endpoint does not need any parameter. ### Return type -[**GetDomainsList**](getDomainsList.md) +[**GetDomainsList**](GetDomainsList.md) ### Authorization diff --git a/docs/EcommerceApi.md b/docs/EcommerceApi.md index b03b6df..a106a15 100644 --- a/docs/EcommerceApi.md +++ b/docs/EcommerceApi.md @@ -118,7 +118,7 @@ Name | Type | Description | Notes ### Return type -[**CreateUpdateBatchProductsModel**](createUpdateBatchProductsModel.md) +[**CreateUpdateBatchProductsModel**](CreateUpdateBatchProductsModel.md) ### Authorization @@ -144,7 +144,7 @@ Name | Type | Description | Notes ### Return type -[**CreateCategoryModel**](createCategoryModel.md) +[**CreateCategoryModel**](CreateCategoryModel.md) ### Authorization @@ -170,7 +170,7 @@ Name | Type | Description | Notes ### Return type -[**CreateProductModel**](createProductModel.md) +[**CreateProductModel**](CreateProductModel.md) ### Authorization @@ -221,7 +221,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2006**](inline_response_200_6.md) +[**InlineResponse2006**](InlineResponse2006.md) ### Authorization @@ -256,7 +256,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2005**](inline_response_200_5.md) +[**InlineResponse2005**](InlineResponse2005.md) ### Authorization @@ -283,7 +283,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](inline_response_200_7.md) +[**InlineResponse2007**](InlineResponse2007.md) ### Authorization @@ -305,7 +305,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2004**](inline_response_200_4.md) +[**InlineResponse2004**](InlineResponse2004.md) ### Authorization @@ -344,7 +344,7 @@ Name | Type | Description | Notes ### Return type -[**GetCategories**](getCategories.md) +[**GetCategories**](GetCategories.md) ### Authorization @@ -370,7 +370,7 @@ Name | Type | Description | Notes ### Return type -[**GetCategoryDetails**](getCategoryDetails.md) +[**GetCategoryDetails**](GetCategoryDetails.md) ### Authorization @@ -409,7 +409,7 @@ Name | Type | Description | Notes ### Return type -[**GetOrders**](getOrders.md) +[**GetOrders**](GetOrders.md) ### Authorization @@ -435,7 +435,7 @@ Name | Type | Description | Notes ### Return type -[**GetProductDetails**](getProductDetails.md) +[**GetProductDetails**](GetProductDetails.md) ### Authorization @@ -481,7 +481,7 @@ Name | Type | Description | Notes ### Return type -[**GetProducts**](getProducts.md) +[**GetProducts**](GetProducts.md) ### Authorization @@ -507,7 +507,7 @@ Name | Type | Description | Notes ### Return type -[**SetConfigDisplayCurrency**](setConfigDisplayCurrency.md) +[**SetConfigDisplayCurrency**](SetConfigDisplayCurrency.md) ### Authorization diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md index 3e13217..fb26bc3 100644 --- a/docs/EmailCampaignsApi.md +++ b/docs/EmailCampaignsApi.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](createdProcessId.md) +[**CreatedProcessId**](CreatedProcessId.md) ### Authorization @@ -121,7 +121,7 @@ Name | Type | Description | Notes ### Return type -[**AbTestCampaignResult**](abTestCampaignResult.md) +[**AbTestCampaignResult**](AbTestCampaignResult.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailCampaign**](getEmailCampaign.md) +[**GetEmailCampaign**](GetEmailCampaign.md) ### Authorization @@ -197,7 +197,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailCampaigns**](getEmailCampaigns.md) +[**GetEmailCampaigns**](GetEmailCampaigns.md) ### Authorization @@ -225,7 +225,7 @@ Name | Type | Description | Notes ### Return type -[**GetSharedTemplateUrl**](getSharedTemplateUrl.md) +[**GetSharedTemplateUrl**](GetSharedTemplateUrl.md) ### Authorization @@ -387,7 +387,7 @@ Name | Type | Description | Notes ### Return type -[**UploadImageModel**](uploadImageModel.md) +[**UploadImageModel**](UploadImageModel.md) ### Authorization diff --git a/docs/Event.md b/docs/Event.md index 77e2c99..6df3841 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -5,9 +5,9 @@ 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. | [default to null] **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] [default to null] -**Identifiers** | [***EventIdentifiers**](event_identifiers.md) | | [default to null] -**ContactProperties** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] -**EventProperties** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] +**Identifiers** | [***EventIdentifiers**](EventIdentifiers.md) | | [default to null] +**ContactProperties** | [**map[string]interface{}**] | 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] [default to null] +**EventProperties** | [**map[string]interface{}**]| 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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExternalFeedsApi.md b/docs/ExternalFeedsApi.md index f436cce..cb457b8 100644 --- a/docs/ExternalFeedsApi.md +++ b/docs/ExternalFeedsApi.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2015**](inline_response_201_5.md) +[**InlineResponse2015**](InlineResponse2015.md) ### Authorization @@ -95,7 +95,7 @@ Name | Type | Description | Notes ### Return type -[**GetAllExternalFeeds**](getAllExternalFeeds.md) +[**GetAllExternalFeeds**](GetAllExternalFeeds.md) ### Authorization @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**GetExternalFeedByUuid**](getExternalFeedByUUID.md) +[**GetExternalFeedByUuid**](GetExternalFeedByUUID.md) ### Authorization diff --git a/docs/GetAccount.md b/docs/GetAccount.md index 5c91253..0014a89 100644 --- a/docs/GetAccount.md +++ b/docs/GetAccount.md @@ -7,10 +7,10 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Address** | [***GetExtendedClientAddress**](getExtendedClient_address.md) | | [default to null] -**Plan** | [**[]GetAccountPlan**](getAccount_plan.md) | Information about your plans and credits | [default to null] -**Relay** | [***GetAccountRelay**](getAccount_relay.md) | | [default to null] -**MarketingAutomation** | [***GetAccountMarketingAutomation**](getAccount_marketingAutomation.md) | | [optional] [default to null] +**Address** | [***GetExtendedClientAddress**](GetExtendedClientAddress.md) | | [default to null] +**Plan** | [**[]GetAccountPlan**](GetAccountPlan.md) | Information about your plans and credits | [default to null] +**Relay** | [***GetAccountRelay**](GetAccountRelay.md) | | [default to null] +**MarketingAutomation** | [***GetAccountMarketingAutomation**](GetAccountMarketingAutomation.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAccountActivity.md b/docs/GetAccountActivity.md index b3c32fb..282ac52 100644 --- a/docs/GetAccountActivity.md +++ b/docs/GetAccountActivity.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Logs** | [**[]GetAccountActivityLogs**](getAccountActivity_logs.md) | Get user activity logs | [optional] [default to null] +**Logs** | [**[]GetAccountActivityLogs**](GetAccountActivityLogs.md) | Get user activity logs | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAccountRelay.md b/docs/GetAccountRelay.md index 1a0a23e..4325cf6 100644 --- a/docs/GetAccountRelay.md +++ b/docs/GetAccountRelay.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Enabled** | **bool** | Status of your transactional email Account (true=Enabled, false=Disabled) | [default to null] -**Data** | [***GetAccountRelayData**](getAccount_relay_data.md) | | [default to null] +**Data** | [***GetAccountRelayData**](GetAccountRelayData.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAllExternalFeeds.md b/docs/GetAllExternalFeeds.md index 81f2fa5..0f73633 100644 --- a/docs/GetAllExternalFeeds.md +++ b/docs/GetAllExternalFeeds.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of batches | [optional] [default to null] -**Feeds** | [**[]GetAllExternalFeedsFeeds**](getAllExternalFeeds_feeds.md) | | [optional] [default to null] +**Feeds** | [**[]GetAllExternalFeedsFeeds**](GetAllExternalFeedsFeeds.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAllExternalFeedsFeeds.md b/docs/GetAllExternalFeedsFeeds.md index 6b96add..6d66568 100644 --- a/docs/GetAllExternalFeedsFeeds.md +++ b/docs/GetAllExternalFeedsFeeds.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [default to null] **Cache** | **bool** | Toggle caching of feed url response | [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the feed was created | [default to null] diff --git a/docs/GetAttributes.md b/docs/GetAttributes.md index 2b3ecbb..3d4923b 100644 --- a/docs/GetAttributes.md +++ b/docs/GetAttributes.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Attributes** | [**[]GetAttributesAttributes**](getAttributes_attributes.md) | Listing of available contact attributes in your account | [default to null] +**Attributes** | [**[]GetAttributesAttributes**](GetAttributesAttributes.md) | Listing of available contact attributes in your account | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAttributesAttributes.md b/docs/GetAttributesAttributes.md index 169d3c5..c332726 100644 --- a/docs/GetAttributesAttributes.md +++ b/docs/GetAttributesAttributes.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the attribute | [default to null] **Category** | **string** | Category of the attribute | [default to null] **Type_** | **string** | Type of the attribute | [optional] [default to null] -**Enumeration** | [**[]GetAttributesEnumeration**](getAttributes_enumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] +**Enumeration** | [**[]GetAttributesEnumeration**](GetAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] **CalculatedValue** | **string** | Calculated value formula | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCategories.md b/docs/GetCategories.md index b3e2974..bee711d 100644 --- a/docs/GetCategories.md +++ b/docs/GetCategories.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Categories** | [**[]interface{}**](interface{}.md) | | [default to null] +**Categories** | [**[]interface{}**] | | [default to null] **Count** | **int64** | Number of categories | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md index f4ae620..36f19f6 100644 --- a/docs/GetChildInfo.md +++ b/docs/GetChildInfo.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Credits** | [***GetChildInfoCredits**](getChildInfo_credits.md) | | [optional] [default to null] -**Statistics** | [***GetChildInfoStatistics**](getChildInfo_statistics.md) | | [optional] [default to null] +**Credits** | [***GetChildInfoCredits**](GetChildInfoCredits.md) | | [optional] [default to null] +**Statistics** | [***GetChildInfoStatistics**](GetChildInfoStatistics.md) | | [optional] [default to null] **Password** | **string** | The encrypted password of child account | [default to null] **Ips** | **[]string** | IP(s) associated to a child account user | [optional] [default to null] -**ApiKeys** | [***GetChildInfoApiKeys**](getChildInfo_apiKeys.md) | | [optional] [default to null] +**ApiKeys** | [***GetChildInfoApiKeys**](GetChildInfoApiKeys.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md index 0844639..e0367ef 100644 --- a/docs/GetChildInfoApiKeys.md +++ b/docs/GetChildInfoApiKeys.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**V2** | [**[]GetChildInfoApiKeysV2**](getChildInfo_apiKeys_v2.md) | | [default to null] -**V3** | [**[]GetChildInfoApiKeysV3**](getChildInfo_apiKeys_v3.md) | | [optional] [default to null] +**V2** | [**[]GetChildInfoApiKeysV2**](GetChildInfoApiKeys_v2.md) | | [default to null] +**V3** | [**[]GetChildInfoApiKeysV3**](GetChildInfoApiKeys_v3.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetChildrenList.md b/docs/GetChildrenList.md index 2a5d46b..670bfaf 100644 --- a/docs/GetChildrenList.md +++ b/docs/GetChildrenList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Children** | [**[]interface{}**](interface{}.md) | Your children's account information | [optional] [default to null] +**Children** | [**[]interface{}**] | Your children's account information | [optional] [default to null] **Count** | **int64** | Number of child accounts | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStats.md b/docs/GetContactCampaignStats.md index 818fa9a..4988628 100644 --- a/docs/GetContactCampaignStats.md +++ b/docs/GetContactCampaignStats.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] -**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] -**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] -**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] -**Unsubscriptions** | [***GetContactCampaignStatsUnsubscriptions**](getContactCampaignStats_unsubscriptions.md) | | [optional] [default to null] -**Opened** | [**[]GetContactCampaignStatsOpened**](getContactCampaignStats_opened.md) | | [optional] [default to null] -**Clicked** | [**[]GetContactCampaignStatsClicked**](getContactCampaignStats_clicked.md) | | [optional] [default to null] -**TransacAttributes** | [**[]GetContactCampaignStatsTransacAttributes**](getContactCampaignStats_transacAttributes.md) | | [optional] [default to null] -**Delivered** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | | [optional] [default to null] +**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] +**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] +**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] +**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] +**Unsubscriptions** | [***GetContactCampaignStatsUnsubscriptions**](GetContactCampaignStatsUnsubscriptions.md) | | [optional] [default to null] +**Opened** | [**[]GetContactCampaignStatsOpened**](GetContactCampaignStatsOpened.md) | | [optional] [default to null] +**Clicked** | [**[]GetContactCampaignStatsClicked**](GetContactCampaignStatsClicked.md) | | [optional] [default to null] +**TransacAttributes** | [**[]GetContactCampaignStatsTransacAttributes**](GetContactCampaignStatsTransacAttributes.md) | | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStatsClicked.md b/docs/GetContactCampaignStatsClicked.md index de2395e..82cdc32 100644 --- a/docs/GetContactCampaignStatsClicked.md +++ b/docs/GetContactCampaignStatsClicked.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **int64** | ID of the campaign which generated the event | [default to null] -**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetails_statistics_links.md) | | [default to null] +**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](GetExtendedContactDetailsStatisticsLinks.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactCampaignStatsUnsubscriptions.md b/docs/GetContactCampaignStatsUnsubscriptions.md index 1bf2c12..2c61ffc 100644 --- a/docs/GetContactCampaignStatsUnsubscriptions.md +++ b/docs/GetContactCampaignStatsUnsubscriptions.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | [default to null] -**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] +**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | [default to null] +**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContactDetails.md b/docs/GetContactDetails.md index 67dd153..f1acda1 100644 --- a/docs/GetContactDetails.md +++ b/docs/GetContactDetails.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] +**Attributes** | [**map[string]interface{}**]| Set of attributes of the contact | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetContacts.md b/docs/GetContacts.md index dca1db1..a57f25e 100644 --- a/docs/GetContacts.md +++ b/docs/GetContacts.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [**[]interface{}**](interface{}.md) | | [default to null] +**Contacts** | [**map[string]interface{}**] | | [default to null] **Count** | **int64** | Number of contacts | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCorporateInvitedUsersList.md b/docs/GetCorporateInvitedUsersList.md index da7534f..4314d8e 100644 --- a/docs/GetCorporateInvitedUsersList.md +++ b/docs/GetCorporateInvitedUsersList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Users** | [**[]GetCorporateInvitedUsersListUsers**](getCorporateInvitedUsersList_users.md) | Get invited users list | [optional] [default to null] +**Users** | [**[]GetCorporateInvitedUsersListUsers**](GetCorporateInvitedUsersListUsers.md) | Get invited users list | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCorporateInvitedUsersListUsers.md b/docs/GetCorporateInvitedUsersListUsers.md index 9af2d4d..5a5a08c 100644 --- a/docs/GetCorporateInvitedUsersListUsers.md +++ b/docs/GetCorporateInvitedUsersListUsers.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Groups** | [***GetCorporateInvitedUsersListGroups**](getCorporateInvitedUsersList_groups.md) | | [default to null] +**Groups** | [***GetCorporateInvitedUsersListGroups**](GetCorporateInvitedUsersListGroups.md) | | [default to null] **Email** | **string** | Email address of the user. | [default to null] **IsOwner** | **string** | Flag for indicating is user owner of the organization. | [default to null] **Status** | **string** | Status of the invited user. | [default to null] -**FeatureAccess** | [***GetCorporateInvitedUsersListFeatureAccess**](getCorporateInvitedUsersList_feature_access.md) | | [default to null] +**FeatureAccess** | [***GetCorporateInvitedUsersListFeatureAccess**](GetCorporateInvitedUsersListFeatureAccess.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCorporateUserPermission.md b/docs/GetCorporateUserPermission.md index b2f1f50..af09507 100644 --- a/docs/GetCorporateUserPermission.md +++ b/docs/GetCorporateUserPermission.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the user. | [default to null] **Status** | **string** | Status of the invited user. | [default to null] -**Groups** | [**[]GetCorporateUserPermissionGroups**](getCorporateUserPermission_groups.md) | | [default to null] -**FeatureAccess** | [***GetCorporateUserPermissionFeatureAccess**](getCorporateUserPermission_feature_access.md) | | [default to null] +**Groups** | [**[]GetCorporateUserPermissionGroups**](GetCorporateUserPermissionGroups.md) | | [default to null] +**FeatureAccess** | [***GetCorporateUserPermissionFeatureAccess**](GetCorporateUserPermissionFeatureAccess.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetDomainConfigurationModel.md b/docs/GetDomainConfigurationModel.md index 758372b..289db94 100644 --- a/docs/GetDomainConfigurationModel.md +++ b/docs/GetDomainConfigurationModel.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Domain** | **string** | Domain | [default to null] **Verified** | **bool** | Status of domain verification (true=verified, false=non verified) | [default to null] **Authenticated** | **bool** | Status of domain authentication (true=authenticated, false=non authenticated) | [default to null] -**DnsRecords** | [***CreateDomainModelDnsRecords**](createDomainModel_dns_records.md) | | [default to null] +**DnsRecords** | [***CreateDomainModelDnsRecords**](CreateDomainModelDnsRecords.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetDomainsList.md b/docs/GetDomainsList.md index 11dae1f..97e5c82 100644 --- a/docs/GetDomainsList.md +++ b/docs/GetDomainsList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Domains** | [**[]GetDomainsListDomains**](getDomainsList_domains.md) | List of the domains available in your account | [optional] [default to null] +**Domains** | [**[]GetDomainsListDomains**](GetDomainsListDomains.md) | List of the domains available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md index 91d8073..9eca112 100644 --- a/docs/GetEmailCampaign.md +++ b/docs/GetEmailCampaign.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] **Header** | **string** | Header of the campaign | [default to null] **Footer** | **string** | Footer of the campaign | [default to null] -**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverview_sender.md) | | [default to null] +**Sender** | [***GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" of the campaign | [default to null] **ToField** | **string** | Customisation of the \"to\" field of the campaign | [optional] [default to null] **HtmlContent** | **string** | HTML content of the campaign | [default to null] @@ -37,8 +37,8 @@ Name | Type | Description | Notes **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 null] **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] [default to null] **ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] -**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] -**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Recipients** | [**map[string]interface{}**] | | [default to null] +**Statistics** | [**map[string]interface{}**] | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEmailCampaigns.md b/docs/GetEmailCampaigns.md index 33bf0f6..e0148a7 100644 --- a/docs/GetEmailCampaigns.md +++ b/docs/GetEmailCampaigns.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Campaigns** | [**map[string]interface{}**] | | [optional] [default to null] **Count** | **int64** | Number of Email campaigns retrieved | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEmailEventReport.md b/docs/GetEmailEventReport.md index 6a07bff..36f131e 100644 --- a/docs/GetEmailEventReport.md +++ b/docs/GetEmailEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetEmailEventReportEvents**](getEmailEventReport_events.md) | | [optional] [default to null] +**Events** | [**[]GetEmailEventReportEvents**](GetEmailEventReportEvents.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedCampaignOverview.md b/docs/GetExtendedCampaignOverview.md index c2bc0ea..254de50 100644 --- a/docs/GetExtendedCampaignOverview.md +++ b/docs/GetExtendedCampaignOverview.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] **Header** | **string** | Header of the campaign | [default to null] **Footer** | **string** | Footer of the campaign | [default to null] -**Sender** | [***GetExtendedCampaignOverviewSender**](getExtendedCampaignOverview_sender.md) | | [default to null] +**Sender** | [***GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" of the campaign | [default to null] **ToField** | **string** | Customisation of the \"to\" field of the campaign | [optional] [default to null] **HtmlContent** | **string** | HTML content of the campaign | [default to null] diff --git a/docs/GetExtendedCampaignStats.md b/docs/GetExtendedCampaignStats.md index 39b73b4..c1d796c 100644 --- a/docs/GetExtendedCampaignStats.md +++ b/docs/GetExtendedCampaignStats.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GlobalStats** | [**map[string]interface{}**](interface{}.md) | Overall statistics of the campaign | [default to null] -**CampaignStats** | [**[]interface{}**](interface{}.md) | List-wise statistics of the campaign. | [default to null] +**GlobalStats** | [**map[string]interface{}**] | Overall statistics of the campaign | [default to null] +**CampaignStats** | [**[]interface{}**] | List-wise statistics of the campaign. | [default to null] **MirrorClick** | **int64** | Number of clicks on mirror link | [default to null] **Remaining** | **int64** | Number of remaning emails to send | [default to null] -**LinksStats** | [**map[string]interface{}**](interface{}.md) | Statistics about the number of clicks for the links | [default to null] -**StatsByDomain** | [***GetStatsByDomain**](getStatsByDomain.md) | | [default to null] -**StatsByDevice** | [***GetStatsByDevice**](getStatsByDevice.md) | Statistics about the campaign on the basis of various devices | [default to null] -**StatsByBrowser** | [***GetStatsByBrowser**](getStatsByBrowser.md) | Statistics about the campaign on the basis of various browsers | [default to null] +**LinksStats** | [**map[string]interface{}**] | Statistics about the number of clicks for the links | [default to null] +**StatsByDomain** | [***GetStatsByDomain**](GetStatsByDomain.md) | | [default to null] +**StatsByDevice** | [***GetStatsByDevice**](GetStatsByDevice.md) | Statistics about the campaign on the basis of various devices | [default to null] +**StatsByBrowser** | [***GetStatsByBrowser**](GetStatsByBrowser.md) | Statistics about the campaign on the basis of various browsers | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedClient.md b/docs/GetExtendedClient.md index 74561dc..3f33da8 100644 --- a/docs/GetExtendedClient.md +++ b/docs/GetExtendedClient.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **FirstName** | **string** | First Name | [default to null] **LastName** | **string** | Last Name | [default to null] **CompanyName** | **string** | Name of the company | [default to null] -**Address** | [***GetExtendedClientAddress**](getExtendedClient_address.md) | | [default to null] +**Address** | [***GetExtendedClientAddress**]GgetExtendedClientAddress.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetails.md b/docs/GetExtendedContactDetails.md index 283ee52..5bc2bea 100644 --- a/docs/GetExtendedContactDetails.md +++ b/docs/GetExtendedContactDetails.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] -**Statistics** | [***GetExtendedContactDetailsStatistics**](getExtendedContactDetails_statistics.md) | | [default to null] +**Attributes** | [**map[string]interface{}**] | Set of attributes of the contact | [default to null] +**Statistics** | [***GetExtendedContactDetailsStatistics**](GetExtendedContactDetailsStatistics.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatistics.md b/docs/GetExtendedContactDetailsStatistics.md index 96f2795..a164de7 100644 --- a/docs/GetExtendedContactDetailsStatistics.md +++ b/docs/GetExtendedContactDetailsStatistics.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the sent campaign for the contact | [optional] [default to null] -**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the hardbounes generated by the contact | [optional] [default to null] -**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the softbounes generated by the contact | [optional] [default to null] -**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](getExtendedContactDetails_statistics_messagesSent.md) | Listing of the complaints generated by the contact | [optional] [default to null] -**Unsubscriptions** | [***GetExtendedContactDetailsStatisticsUnsubscriptions**](getExtendedContactDetails_statistics_unsubscriptions.md) | | [optional] [default to null] -**Opened** | [**[]GetExtendedContactDetailsStatisticsOpened**](getExtendedContactDetails_statistics_opened.md) | Listing of the openings generated by the contact | [optional] [default to null] -**Clicked** | [**[]GetExtendedContactDetailsStatisticsClicked**](getExtendedContactDetails_statistics_clicked.md) | Listing of the clicks generated by the contact | [optional] [default to null] -**TransacAttributes** | [**[]interface{}**](interface{}.md) | Listing of the transactional attributes for the contact | [optional] [default to null] -**Delivered** | [**[]GetExtendedContactDetailsStatisticsDelivered**](getExtendedContactDetails_statistics_delivered.md) | Listing of the delivered campaign for the contact | [optional] [default to null] +**MessagesSent** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the sent campaign for the contact | [optional] [default to null] +**HardBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the hardbounes generated by the contact | [optional] [default to null] +**SoftBounces** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the softbounes generated by the contact | [optional] [default to null] +**Complaints** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the complaints generated by the contact | [optional] [default to null] +**Unsubscriptions** | [***GetExtendedContactDetailsStatisticsUnsubscriptions**](GetExtendedContactDetailsStatisticsUnsubscriptions.md) | | [optional] [default to null] +**Opened** | [**[]GetExtendedContactDetailsStatisticsOpened**](GetExtendedContactDetailsStatisticsOpened.md) | Listing of the openings generated by the contact | [optional] [default to null] +**Clicked** | [**[]GetExtendedContactDetailsStatisticsClicked**](GetExtendedContactDetailsStatisticsClicked.md) | Listing of the clicks generated by the contact | [optional] [default to null] +**TransacAttributes** | [**map[string]interface{}**] | Listing of the transactional attributes for the contact | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsDelivered**](GetExtendedContactDetailsStatisticsDelivered.md) | Listing of the delivered campaign for the contact | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatisticsClicked.md b/docs/GetExtendedContactDetailsStatisticsClicked.md index ba69c8c..4b64a30 100644 --- a/docs/GetExtendedContactDetailsStatisticsClicked.md +++ b/docs/GetExtendedContactDetailsStatisticsClicked.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **int64** | ID of the campaign which generated the event | [default to null] -**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](getExtendedContactDetails_statistics_links.md) | Listing of the clicked links for the campaign | [default to null] +**Links** | [**[]GetExtendedContactDetailsStatisticsLinks**](GetExtendedContactDetailsStatisticsLinks.md) | Listing of the clicked links for the campaign | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md index d510644..ff51c6d 100644 --- a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | [default to null] -**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] +**UserUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | [default to null] +**AdminUnsubscription** | [**[]GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription**](GetExtendedContactDetailsStatisticsUnsubscriptions_AdminUnsubscription.md) | Contact has been unsubscribed from the administrator | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedList.md b/docs/GetExtendedList.md index b43f1d0..da16a36 100644 --- a/docs/GetExtendedList.md +++ b/docs/GetExtendedList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **UniqueSubscribers** | **int64** | Number of unique contacts in the list | [default to null] **FolderId** | **int64** | ID of the folder | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**CampaignStats** | [**[]GetExtendedListCampaignStats**](getExtendedList_campaignStats.md) | | [optional] [default to null] +**CampaignStats** | [**[]GetExtendedListCampaignStats**](GetExtendedListCampaignStats.md) | | [optional] [default to null] **DynamicList** | **bool** | Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExtendedListCampaignStats.md b/docs/GetExtendedListCampaignStats.md index 1a76e9a..f5c2cce 100644 --- a/docs/GetExtendedListCampaignStats.md +++ b/docs/GetExtendedListCampaignStats.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **int64** | ID of the campaign | [default to null] -**Stats** | [***GetCampaignStats**](getCampaignStats.md) | | [default to null] +**Stats** | [***GetCampaignStats**](GetCampaignStats.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetExternalFeedByUuid.md b/docs/GetExternalFeedByUuid.md index 79018ce..d5209de 100644 --- a/docs/GetExternalFeedByUuid.md +++ b/docs/GetExternalFeedByUuid.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [default to null] **Cache** | **bool** | Toggle caching of feed url response | [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the feed was created | [default to null] diff --git a/docs/GetFolders.md b/docs/GetFolders.md index 4597ded..814332f 100644 --- a/docs/GetFolders.md +++ b/docs/GetFolders.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Folders** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Folders** | [**map[string]interface{}**] | | [optional] [default to null] **Count** | **int64** | Number of folders available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInboundEmailEvents.md b/docs/GetInboundEmailEvents.md index 299c907..f7a24d4 100644 --- a/docs/GetInboundEmailEvents.md +++ b/docs/GetInboundEmailEvents.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetInboundEmailEventsEvents**](getInboundEmailEvents_events.md) | | [optional] [default to null] +**Events** | [**[]GetInboundEmailEventsEvents**](GetInboundEmailEventsEvents.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInboundEmailEventsByUuid.md b/docs/GetInboundEmailEventsByUuid.md index 94268e7..88eaa2d 100644 --- a/docs/GetInboundEmailEventsByUuid.md +++ b/docs/GetInboundEmailEventsByUuid.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **Sender** | **string** | Sender’s email address | [optional] [default to null] **MessageId** | **string** | Value of the Message-ID header. This will be present only after the processing is done. | [optional] [default to null] **Subject** | **string** | Value of the Subject header. This will be present only after the processing is done. | [optional] [default to null] -**Attachments** | [**[]GetInboundEmailEventsByUuidAttachments**](getInboundEmailEventsByUuid_attachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] [default to null] -**Logs** | [**[]GetInboundEmailEventsByUuidLogs**](getInboundEmailEventsByUuid_logs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] [default to null] +**Attachments** | [**[]GetInboundEmailEventsByUuidAttachments**](GetInboundEmailEventsByUuidAttachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] [default to null] +**Logs** | [**[]GetInboundEmailEventsByUuidLogs**](GetInboundEmailEventsByUuidLogs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInvitedUsersList.md b/docs/GetInvitedUsersList.md index f851897..d9e0abd 100644 --- a/docs/GetInvitedUsersList.md +++ b/docs/GetInvitedUsersList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Users** | [**[]GetInvitedUsersListUsers**](getInvitedUsersList_users.md) | Get invited users list | [optional] [default to null] +**Users** | [**[]GetInvitedUsersListUsers**](GetInvitedUsersListUsers.md) | Get invited users list | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInvitedUsersListFeatureAccess.md b/docs/GetInvitedUsersListFeatureAccess.md index d5c01bb..77a6a97 100644 --- a/docs/GetInvitedUsersListFeatureAccess.md +++ b/docs/GetInvitedUsersListFeatureAccess.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Marketing** | [**map[string]interface{}**](interface{}.md) | Marketing features accessiblity. | [optional] [default to null] -**Conversations** | [**map[string]interface{}**](interface{}.md) | Conversations features accessiblity. | [optional] [default to null] -**Crm** | [**map[string]interface{}**](interface{}.md) | CRM features accessiblity. | [optional] [default to null] +**Marketing** | [**map[string]interface{}**]| Marketing features accessiblity. | [optional] [default to null] +**Conversations** | [**map[string]interface{}**] | Conversations features accessiblity. | [optional] [default to null] +**Crm** | [**map[string]interface{}**]| CRM features accessiblity. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInvitedUsersListUsers.md b/docs/GetInvitedUsersListUsers.md index e98a5f7..3db230b 100644 --- a/docs/GetInvitedUsersListUsers.md +++ b/docs/GetInvitedUsersListUsers.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Email** | **string** | Email address of the user. | [default to null] **IsOwner** | **string** | Flag for indicating is user owner of the organization. | [default to null] **Status** | **string** | Status of the invited user. | [default to null] -**FeatureAccess** | [***GetInvitedUsersListFeatureAccess**](getInvitedUsersList_feature_access.md) | | [default to null] +**FeatureAccess** | [***GetInvitedUsersListFeatureAccess**](GetInvitedUsersListFeatureAccess.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetIpsFromSender.md b/docs/GetIpsFromSender.md index afd36c7..ca892c4 100644 --- a/docs/GetIpsFromSender.md +++ b/docs/GetIpsFromSender.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Ips** | [**[]GetIpFromSender**](getIpFromSender.md) | Dedicated IP(s) linked to a sender | [default to null] +**Ips** | [**[]GetIpFromSender**](GetIpFromSender.md) | Dedicated IP(s) linked to a sender | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetOrders.md b/docs/GetOrders.md index 2a33c73..9a55492 100644 --- a/docs/GetOrders.md +++ b/docs/GetOrders.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Orders** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Orders** | [**map[string]interface{}**] | | [optional] [default to null] **Count** | **int64** | Number of orders | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetPaymentRequest.md b/docs/GetPaymentRequest.md index 2febacc..1994f9f 100644 --- a/docs/GetPaymentRequest.md +++ b/docs/GetPaymentRequest.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Reference** | **string** | Reference of the payment request, it will appear on the payment page. | [default to null] **Status** | **string** | Status of the payment request. | [default to null] -**Configuration** | [***Configuration**](configuration.md) | | [optional] [default to null] +**Configuration** | [***Configuration**](Configuration.md) | | [optional] [default to null] **ContactId** | **int64** | Brevo ID of the contact requested to pay. | [optional] [default to null] **NumberOfRemindersSent** | **int64** | number of reminders sent. | [optional] [default to null] **Cart** | [***Cart**](cart.md) | | [default to null] -**Notification** | [***Notification**](notification.md) | | [default to null] +**Notification** | [***Notification**](Notification.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetProcesses.md b/docs/GetProcesses.md index 35b00c0..b516f55 100644 --- a/docs/GetProcesses.md +++ b/docs/GetProcesses.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Processes** | [**[]GetProcess**](getProcess.md) | List of processes available on your account | [optional] [default to null] +**Processes** | [**[]GetProcess**](GetProcess.md) | List of processes available on your account | [optional] [default to null] **Count** | **int64** | Number of processes available on your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetProductDetails.md b/docs/GetProductDetails.md index df98024..cde3186 100644 --- a/docs/GetProductDetails.md +++ b/docs/GetProductDetails.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **ParentId** | **string** | Parent product id of the product | [optional] [default to null] **S3Original** | **string** | S3 url of original image | [optional] [default to null] **S3ThumbAnalytics** | **string** | S3 thumbnail url of original image in 120x120 dimension for analytics section | [default to null] -**MetaInfo** | [**map[string]interface{}**](interface{}.md) | Meta data of product such as description, vendor, producer, stock level, etc. | [optional] [default to null] +**MetaInfo** | [**map[string]interface{}**]| Meta data of product such as description, vendor, producer, stock level, etc. | [optional] [default to null] **S3ThumbEditor** | **string** | S3 thumbnail url of original image in 600x400 dimension for editor section | [default to null] **IsDeleted** | **bool** | product deleted from the shop's database | [optional] [default to null] diff --git a/docs/GetProducts.md b/docs/GetProducts.md index e1efc6e..d8252e5 100644 --- a/docs/GetProducts.md +++ b/docs/GetProducts.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Products** | [**[]interface{}**](interface{}.md) | | [default to null] +**Products** | [**map[string]interface{}**] | | [default to null] **Count** | **int64** | Number of products | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetReports.md b/docs/GetReports.md index d95167e..46a3fb7 100644 --- a/docs/GetReports.md +++ b/docs/GetReports.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Reports** | [**[]GetReportsReports**](getReports_reports.md) | | [optional] [default to null] +**Reports** | [**[]GetReportsReports**](GetReportsReports.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetScheduledEmailByBatchId.md b/docs/GetScheduledEmailByBatchId.md index 434e472..ebd5ffb 100644 --- a/docs/GetScheduledEmailByBatchId.md +++ b/docs/GetScheduledEmailByBatchId.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of batches | [optional] [default to null] -**Batches** | [**[]GetScheduledEmailByBatchIdBatches**](getScheduledEmailByBatchId_batches.md) | | [optional] [default to null] +**Batches** | [**[]GetScheduledEmailByBatchIdBatches**](GetScheduledEmailByBatchIdBatches.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSegments.md b/docs/GetSegments.md index 0b7f576..c6078be 100644 --- a/docs/GetSegments.md +++ b/docs/GetSegments.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Segments** | [***GetSegmentsSegments**](getSegments_segments.md) | | [optional] [default to null] +**Segments** | [***GetSegmentsSegments**](GetSegmentsSegments.md) | | [optional] [default to null] **Count** | **int64** | Number of Segments available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSendersList.md b/docs/GetSendersList.md index 4f8e848..661484a 100644 --- a/docs/GetSendersList.md +++ b/docs/GetSendersList.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Senders** | [**[]GetSendersListSenders**](getSendersList_senders.md) | List of the senders available in your account | [optional] [default to null] +**Senders** | [**[]GetSendersListSenders**](GetSendersListSenders.md) | List of the senders available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSendersListSenders.md b/docs/GetSendersListSenders.md index eed3e04..17de519 100644 --- a/docs/GetSendersListSenders.md +++ b/docs/GetSendersListSenders.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | **string** | From Name associated to the sender | [default to null] **Email** | **string** | From Email associated to the sender | [default to null] **Active** | **bool** | Status of sender (true=activated, false=deactivated) | [default to null] -**Ips** | [**[]GetSendersListIps**](getSendersList_ips.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] [default to null] +**Ips** | [**[]GetSendersListIps**](GetSendersListIps.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md index 3a75f38..7ceafa1 100644 --- a/docs/GetSmsCampaign.md +++ b/docs/GetSmsCampaign.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **Sender** | **string** | Sender of the SMS Campaign | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ModifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] -**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Recipients** | [**map[string]interface{}**] | | [default to null] +**Statistics** | [**map[string]interface{}**] | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmsCampaigns.md b/docs/GetSmsCampaigns.md index 997d7ff..ffc03d0 100644 --- a/docs/GetSmsCampaigns.md +++ b/docs/GetSmsCampaigns.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Campaigns** | [**map[string]interface{}**]| | [optional] [default to null] **Count** | **int64** | Number of SMS campaigns retrieved | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmsEventReport.md b/docs/GetSmsEventReport.md index af3cb69..23bf6a1 100644 --- a/docs/GetSmsEventReport.md +++ b/docs/GetSmsEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetSmsEventReportEvents**](getSmsEventReport_events.md) | | [optional] [default to null] +**Events** | [**[]GetSmsEventReportEvents**](GetSmsEventReportEvents.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetSmtpTemplateOverview.md b/docs/GetSmtpTemplateOverview.md index b01318c..c032c21 100644 --- a/docs/GetSmtpTemplateOverview.md +++ b/docs/GetSmtpTemplateOverview.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Subject** | **string** | Subject of the template | [default to null] **IsActive** | **bool** | Status of template (true=active, false=inactive) | [default to null] **TestSent** | **bool** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | [default to null] -**Sender** | [***GetSmtpTemplateOverviewSender**](getSmtpTemplateOverview_sender.md) | | [default to null] +**Sender** | [***GetSmtpTemplateOverviewSender**](GetSmtpTemplateOverviewSender.md) | | [default to null] **ReplyTo** | **string** | Email defined as the \"Reply to\" for the template | [default to null] **ToField** | **string** | Customisation of the \"to\" field for the template | [default to null] **Tag** | **string** | Tag of the template | [default to null] diff --git a/docs/GetSmtpTemplates.md b/docs/GetSmtpTemplates.md index 2495a62..f3b22b3 100644 --- a/docs/GetSmtpTemplates.md +++ b/docs/GetSmtpTemplates.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int64** | Count of transactional email templates | [optional] [default to null] -**Templates** | [**[]GetSmtpTemplateOverview**](getSmtpTemplateOverview.md) | | [optional] [default to null] +**Templates** | [**[]GetSmtpTemplateOverview**](GetSmtpTemplateOverview.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetStatsByDevice.md b/docs/GetStatsByDevice.md index 4cb82f1..a13bc26 100644 --- a/docs/GetStatsByDevice.md +++ b/docs/GetStatsByDevice.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Desktop** | [**map[string]GetDeviceBrowserStats**](getDeviceBrowserStats.md) | Statistics of the campaign on the basis of desktop devices | [optional] [default to null] -**Mobile** | [**map[string]GetDeviceBrowserStats**](getDeviceBrowserStats.md) | Statistics of the campaign on the basis of mobile devices | [optional] [default to null] -**Tablet** | [**map[string]GetDeviceBrowserStats**](getDeviceBrowserStats.md) | Statistics of the campaign on the basis of tablet devices | [optional] [default to null] -**Unknown** | [**map[string]GetDeviceBrowserStats**](getDeviceBrowserStats.md) | Statistics of the campaign on the basis of unknown devices | [optional] [default to null] +**Desktop** | [**map[string]GetDeviceBrowserStats**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of desktop devices | [optional] [default to null] +**Mobile** | [**map[string]GetDeviceBrowserStats**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of mobile devices | [optional] [default to null] +**Tablet** | [**map[string]GetDeviceBrowserStats**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of tablet devices | [optional] [default to null] +**Unknown** | [**map[string]GetDeviceBrowserStats**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of unknown devices | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacBlockedContacts.md b/docs/GetTransacBlockedContacts.md index c9d64a6..b0ffaf4 100644 --- a/docs/GetTransacBlockedContacts.md +++ b/docs/GetTransacBlockedContacts.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int64** | Count of blocked or unsubscribed contact | [optional] [default to null] -**Contacts** | [**[]GetTransacBlockedContactsContacts**](getTransacBlockedContacts_contacts.md) | | [optional] [default to null] +**Contacts** | [**[]GetTransacBlockedContactsContacts**](GetTransacBlockedContacts_contacts.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacBlockedContactsContacts.md b/docs/GetTransacBlockedContactsContacts.md index e9124ba..cff1a58 100644 --- a/docs/GetTransacBlockedContactsContacts.md +++ b/docs/GetTransacBlockedContactsContacts.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the blocked or unsubscribed contact | [default to null] **SenderEmail** | **string** | Sender email address of the blocked or unsubscribed contact | [default to null] -**Reason** | [***GetTransacBlockedContactsReason**](getTransacBlockedContacts_reason.md) | | [default to null] +**Reason** | [***GetTransacBlockedContactsReason**](GetTransacBlockedContactsReason.md) | | [default to null] **BlockedAt** | **string** | Date when the contact was blocked or unsubscribed on | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacEmailContent.md b/docs/GetTransacEmailContent.md index 2a9feb4..59e9ca0 100644 --- a/docs/GetTransacEmailContent.md +++ b/docs/GetTransacEmailContent.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Subject** | **string** | Subject of the sent email | [default to null] **TemplateId** | **int64** | Id of the template | [optional] [default to null] **Date** | **string** | Date on which transactional email was sent | [default to null] -**Events** | [**[]GetTransacEmailContentEvents**](getTransacEmailContent_events.md) | Series of events which occurred on the transactional email | [default to null] +**Events** | [**[]GetTransacEmailContentEvents**](GetTransacEmailContentEvents.md) | Series of events which occurred on the transactional email | [default to null] **Body** | **string** | Actual content of the transactional email that has been sent | [default to null] **AttachmentCount** | **int64** | Count of the attachments that were sent in the email | [default to null] diff --git a/docs/GetTransacEmailsList.md b/docs/GetTransacEmailsList.md index 4bab765..1d43600 100644 --- a/docs/GetTransacEmailsList.md +++ b/docs/GetTransacEmailsList.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int64** | Total number of transactional emails available on your account according to the passed filter | [optional] [default to null] -**TransactionalEmails** | [**[]GetTransacEmailsListTransactionalEmails**](getTransacEmailsList_transactionalEmails.md) | | [optional] [default to null] +**TransactionalEmails** | [**[]GetTransacEmailsListTransactionalEmails**](GetTransacEmailsListTransactionalEmails.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransacSmsReport.md b/docs/GetTransacSmsReport.md index 149846f..b0bb93c 100644 --- a/docs/GetTransacSmsReport.md +++ b/docs/GetTransacSmsReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Reports** | [**[]GetTransacSmsReportReports**](getTransacSmsReport_reports.md) | | [optional] [default to null] +**Reports** | [**[]GetTransacSmsReportReports**](GetTransacSmsReportReports.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetUserPermission.md b/docs/GetUserPermission.md index caad51b..fb5e07f 100644 --- a/docs/GetUserPermission.md +++ b/docs/GetUserPermission.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the user. | [default to null] **Status** | **string** | Status of the invited user. | [default to null] -**Privileges** | [**[]GetUserPermissionPrivileges**](getUserPermission_privileges.md) | Granular feature permissions given to the user. | [default to null] +**Privileges** | [**[]GetUserPermissionPrivileges**](GetUserPermissionPrivileges.md) | Granular feature permissions given to the user. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWaTemplates.md b/docs/GetWaTemplates.md index 0531658..6b76842 100644 --- a/docs/GetWaTemplates.md +++ b/docs/GetWaTemplates.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Templates** | [**[]GetWaTemplatesTemplates**](getWATemplates_templates.md) | | [default to null] +**Templates** | [**[]GetWaTemplatesTemplates**](GetWATemplatesTemplates.md) | | [default to null] **Count** | **int64** | Number of whatsApp templates retrived | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhook.md b/docs/GetWebhook.md index 3f67a95..34cb94b 100644 --- a/docs/GetWebhook.md +++ b/docs/GetWebhook.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **CreatedAt** | **string** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ModifiedAt** | **string** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **Batched** | **bool** | To send batched webhooks | [optional] [default to null] -**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] -**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](GetWebhookAuth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhooks.md b/docs/GetWebhooks.md index e90f98f..9e30727 100644 --- a/docs/GetWebhooks.md +++ b/docs/GetWebhooks.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Webhooks** | [**[]interface{}**](interface{}.md) | | [default to null] +**Webhooks** | [**map[string]interface{}**] | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWhatsappCampaigns.md b/docs/GetWhatsappCampaigns.md index 1b62c19..8139e1e 100644 --- a/docs/GetWhatsappCampaigns.md +++ b/docs/GetWhatsappCampaigns.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]GetWhatsappCampaignsCampaigns**](getWhatsappCampaigns_campaigns.md) | | [optional] [default to null] +**Campaigns** | [**[]GetWhatsappCampaignsCampaigns**](GetWhatsappCampaignsCampaigns.md) | | [optional] [default to null] **Count** | **int64** | Number of WhatsApp campaigns retrived | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWhatsappEventReport.md b/docs/GetWhatsappEventReport.md index 5beea65..9a6b392 100644 --- a/docs/GetWhatsappEventReport.md +++ b/docs/GetWhatsappEventReport.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Events** | [**[]GetWhatsappEventReportEvents**](getWhatsappEventReport_events.md) | | [optional] [default to null] +**Events** | [**[]GetWhatsappEventReportEvents**](GetWhatsappEventReportEvents.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InboundParsingApi.md b/docs/InboundParsingApi.md index 4945913..aed8095 100644 --- a/docs/InboundParsingApi.md +++ b/docs/InboundParsingApi.md @@ -64,7 +64,7 @@ Name | Type | Description | Notes ### Return type -[**GetInboundEmailEvents**](getInboundEmailEvents.md) +[**GetInboundEmailEvents**](GetInboundEmailEvents.md) ### Authorization @@ -92,7 +92,7 @@ Name | Type | Description | Notes ### Return type -[**GetInboundEmailEventsByUuid**](getInboundEmailEventsByUuid.md) +[**GetInboundEmailEventsByUuid**](GetInboundEmailEventsByUuid.md) ### Authorization diff --git a/docs/InviteAdminUser.md b/docs/InviteAdminUser.md index e2629de..8344593 100644 --- a/docs/InviteAdminUser.md +++ b/docs/InviteAdminUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Email** | **string** | Email address for the organization | [default to null] **AllFeaturesAccess** | **bool** | All access to the features | [default to null] **GroupIds** | **[]string** | Ids of Group | [optional] [default to null] -**Privileges** | [**[]InviteAdminUserPrivileges**](inviteAdminUser_privileges.md) | | [default to null] +**Privileges** | [**[]InviteAdminUserPrivileges**](InviteAdminUserPrivileges.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Inviteuser.md b/docs/Inviteuser.md index ff0495c..f53b51b 100644 --- a/docs/Inviteuser.md +++ b/docs/Inviteuser.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address for the organization | [default to null] **AllFeaturesAccess** | **bool** | All access to the features | [default to null] -**Privileges** | [**[]InviteuserPrivileges**](inviteuser_privileges.md) | | [default to null] +**Privileges** | [**[]InviteuserPrivileges**](InviteuserPrivileges.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterAccountApi.md b/docs/MasterAccountApi.md index b479016..76ec135 100644 --- a/docs/MasterAccountApi.md +++ b/docs/MasterAccountApi.md @@ -73,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[**CorporateGroupDetailsResponse**](corporateGroupDetailsResponse.md) +[**CorporateGroupDetailsResponse**](CorporateGroupDetailsResponse.md) ### Authorization @@ -130,7 +130,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse201**](inline_response_201.md) +[**InlineResponse201**](InlineResponse201.md) ### Authorization @@ -183,7 +183,7 @@ This endpoint does not need any parameter. ### Return type -[**MasterDetailsResponse**](masterDetailsResponse.md) +[**MasterDetailsResponse**](MasterDetailsResponse.md) ### Authorization @@ -211,7 +211,7 @@ Name | Type | Description | Notes ### Return type -[**GetSsoToken**](getSsoToken.md) +[**GetSsoToken**](GetSsoToken.md) ### Authorization @@ -240,7 +240,7 @@ Name | Type | Description | Notes ### Return type -[**SubAccountsResponse**](subAccountsResponse.md) +[**SubAccountsResponse**](SubAccountsResponse.md) ### Authorization @@ -323,7 +323,7 @@ Name | Type | Description | Notes ### Return type -[**SubAccountDetailsResponse**](subAccountDetailsResponse.md) +[**SubAccountDetailsResponse**](SubAccountDetailsResponse.md) ### Authorization @@ -380,7 +380,7 @@ Name | Type | Description | Notes ### Return type -[*map[string]interface{}**](interface{}.md) +[*map[string]interface{}**] ### Authorization @@ -436,7 +436,7 @@ Name | Type | Description | Notes ### Return type -[**CreateApiKeyResponse**](createApiKeyResponse.md) +[**CreateApiKeyResponse**](CreateApiKeyResponse.md) ### Authorization @@ -464,7 +464,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSubAccountResponse**](createSubAccountResponse.md) +[**CreateSubAccountResponse**](CreateSubAccountResponse.md) ### Authorization @@ -492,7 +492,7 @@ Name | Type | Description | Notes ### Return type -[**GetSsoToken**](getSsoToken.md) +[**GetSsoToken**](GetSsoToken.md) ### Authorization @@ -521,7 +521,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](inline_response_200.md) +[**InlineResponse200**](InlineResponse200.md) ### Authorization @@ -585,7 +585,7 @@ Name | Type | Description | Notes ### Return type -[**GetAccountActivity**](getAccountActivity.md) +[**GetAccountActivity**](GetAccountActivity.md) ### Authorization @@ -609,7 +609,7 @@ This endpoint does not need any parameter. ### Return type -[**GetCorporateInvitedUsersList**](getCorporateInvitedUsersList.md) +[**GetCorporateInvitedUsersList**](GetCorporateInvitedUsersList.md) ### Authorization @@ -635,7 +635,7 @@ Name | Type | Description | Notes ### Return type -[**GetCorporateUserPermission**](getCorporateUserPermission.md) +[**GetCorporateUserPermission**](GetCorporateUserPermission.md) ### Authorization @@ -659,7 +659,7 @@ This endpoint does not need any parameter. ### Return type -[**[]InlineResponse2001**](inline_response_200_1.md) +[**[]InlineResponse2001**](InlineResponse2001.md) ### Authorization @@ -687,7 +687,7 @@ Name | Type | Description | Notes ### Return type -[**InviteAdminUser**](inviteAdminUser.md) +[**InviteAdminUser**](InviteAdminUser.md) ### Authorization diff --git a/docs/MasterDetailsResponse.md b/docs/MasterDetailsResponse.md index bb876ca..017077e 100644 --- a/docs/MasterDetailsResponse.md +++ b/docs/MasterDetailsResponse.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **Id** | **int64** | Unique identifier of the master account organization | [optional] [default to null] **CurrencyCode** | **string** | Currency code of the master account organization | [optional] [default to null] **Timezone** | **string** | Timezone of the master account organization | [optional] [default to null] -**BillingInfo** | [***MasterDetailsResponseBillingInfo**](masterDetailsResponse_billingInfo.md) | | [optional] [default to null] -**PlanInfo** | [***MasterDetailsResponsePlanInfo**](masterDetailsResponse_planInfo.md) | | [optional] [default to null] +**BillingInfo** | [***MasterDetailsResponseBillingInfo**](MasterDetailsResponseBillingInfo.md) | | [optional] [default to null] +**PlanInfo** | [***MasterDetailsResponsePlanInfo**](MasterDetailsResponsePlanInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterDetailsResponseBillingInfo.md b/docs/MasterDetailsResponseBillingInfo.md index b93e094..3c5f42d 100644 --- a/docs/MasterDetailsResponseBillingInfo.md +++ b/docs/MasterDetailsResponseBillingInfo.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Billing email id of master account | [optional] [default to null] **CompanyName** | **string** | Company name of master account | [optional] [default to null] -**Name** | [***MasterDetailsResponseBillingInfoName**](masterDetailsResponse_billingInfo_name.md) | | [optional] [default to null] -**Address** | [***MasterDetailsResponseBillingInfoAddress**](masterDetailsResponse_billingInfo_address.md) | | [optional] [default to null] +**Name** | [***MasterDetailsResponseBillingInfoName**](MasterDetailsResponseBillingInfo_name.md) | | [optional] [default to null] +**Address** | [***MasterDetailsResponseBillingInfoAddress**](MasterDetailsResponseBillingInfoAddress.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MasterDetailsResponsePlanInfo.md b/docs/MasterDetailsResponsePlanInfo.md index 2f70914..7ad147a 100644 --- a/docs/MasterDetailsResponsePlanInfo.md +++ b/docs/MasterDetailsResponsePlanInfo.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Price** | **float32** | Plan amount | [optional] [default to null] **PlanPeriod** | **string** | Plan period type | [optional] [default to null] **SubAccounts** | **int32** | Number of sub-accounts | [optional] [default to null] -**Features** | [**[]MasterDetailsResponsePlanInfoFeatures**](masterDetailsResponse_planInfo_features.md) | List of provided features in the plan | [optional] [default to null] +**Features** | [**[]MasterDetailsResponsePlanInfoFeatures**](MasterDetailsResponsePlanInfoFeatures.md) | List of provided features in the plan | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Note.md b/docs/Note.md index 7719b19..0f014d5 100644 --- a/docs/Note.md +++ b/docs/Note.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Text** | **string** | Text content of a note | [default to null] **ContactIds** | **[]int32** | Contact ids linked to a note | [optional] [default to null] **DealIds** | **[]string** | Deal ids linked to a note | [optional] [default to null] -**AuthorId** | [**map[string]interface{}**](interface{}.md) | Account details of user which created the note | [optional] [default to null] +**AuthorId** | [**map[string]interface{}**] | Account details of user which created the note | [optional] [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | Note created date/time | [optional] [default to null] **UpdatedAt** | [**time.Time**](time.Time.md) | Note updated date/time | [optional] [default to null] diff --git a/docs/Order.md b/docs/Order.md index 5772b48..565e57a 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -9,9 +9,9 @@ Name | Type | Description | Notes **Status** | **string** | State of the order. | [default to null] **Amount** | **float32** | Total amount of the order, including all shipping expenses, tax and the price of items. | [default to null] **StoreId** | **string** | ID of store where the order is placed | [optional] [default to null] -**Products** | [**[]OrderProducts**](order_products.md) | | [default to null] +**Products** | [**[]OrderProducts**](OrderProducts.md) | | [default to null] **Email** | **string** | Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. | [optional] [default to null] -**Billing** | [***OrderBilling**](order_billing.md) | | [optional] [default to null] +**Billing** | [***OrderBilling**](OrderBilling.md) | | [optional] [default to null] **Coupons** | **[]string** | Coupons applied to the order. Stored case insensitive. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderBatch.md b/docs/OrderBatch.md index 67c1d4a..17fe0e8 100644 --- a/docs/OrderBatch.md +++ b/docs/OrderBatch.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Orders** | [**[]Order**](order.md) | array of order objects | [default to null] +**Orders** | [**[]Order**](Order.md) | array of order objects | [default to null] **NotifyUrl** | **string** | Notify Url provided by client to get the status of batch request | [optional] [default to null] **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 null] diff --git a/docs/PaymentsApi.md b/docs/PaymentsApi.md index 3ab8b7d..47c85bc 100644 --- a/docs/PaymentsApi.md +++ b/docs/PaymentsApi.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes ### Return type -[**CreatePaymentResponse**](createPaymentResponse.md) +[**CreatePaymentResponse**](CreatePaymentResponse.md) ### Authorization @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### Return type -[**GetPaymentRequest**](getPaymentRequest.md) +[**GetPaymentRequest**](GetPaymentRequest.md) ### Authorization diff --git a/docs/PostContactInfo.md b/docs/PostContactInfo.md index 5988616..eeb5d46 100644 --- a/docs/PostContactInfo.md +++ b/docs/PostContactInfo.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [***PostContactInfoContacts**](postContactInfo_contacts.md) | | [default to null] +**Contacts** | [***PostContactInfoContacts**](PostContactInfoContacts.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProcessApi.md b/docs/ProcessApi.md index 4a40452..fea3f4a 100644 --- a/docs/ProcessApi.md +++ b/docs/ProcessApi.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes ### Return type -[**GetProcess**](getProcess.md) +[**GetProcess**](GetProcess.md) ### Authorization @@ -56,7 +56,7 @@ Name | Type | Description | Notes ### Return type -[**GetProcesses**](getProcesses.md) +[**GetProcesses**](GetProcesses.md) ### Authorization diff --git a/docs/RemainingCreditModel.md b/docs/RemainingCreditModel.md index 7a684bb..438ba7f 100644 --- a/docs/RemainingCreditModel.md +++ b/docs/RemainingCreditModel.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Child** | [***RemainingCreditModelChild**](remainingCreditModel_child.md) | | [default to null] -**Reseller** | [***RemainingCreditModelReseller**](remainingCreditModel_reseller.md) | | [default to null] +**Child** | [***RemainingCreditModelChild**](RemainingCreditModelChild.md) | | [default to null] +**Reseller** | [***RemainingCreditModelReseller**](RemainingCreditModelReseller.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md index eaebcb5..f88ded3 100644 --- a/docs/RequestContactExport.md +++ b/docs/RequestContactExport.md @@ -4,7 +4,7 @@ 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] [default to null] -**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](requestContactExport_customContactFilter.md) | | [default to null] +**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](RequestContactExportCustomContactFilter.md) | | [default to null] **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] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md index 6ce5fb0..f5b41ed 100644 --- a/docs/RequestContactImport.md +++ b/docs/RequestContactImport.md @@ -5,10 +5,10 @@ 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] [default to null] **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] [default to null] -**JsonBody** | [**[]RequestContactImportJsonBody**](requestContactImport_jsonBody.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] [default to null] +**JsonBody** | [**[]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] [default to null] **ListIds** | **[]int64** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] [default to null] **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] [default to null] -**NewList** | [***RequestContactImportNewList**](requestContactImport_newList.md) | | [optional] [default to null] +**NewList** | [***RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] [default to null] **EmailBlacklist** | **bool** | To blacklist all the contacts for email | [optional] [default to null] **DisableNotification** | **bool** | To disable email notification | [optional] [default to null] **SmsBlacklist** | **bool** | To blacklist all the contacts for sms | [optional] [default to null] diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md index ea3d7d8..e7d4cd9 100644 --- a/docs/ResellerApi.md +++ b/docs/ResellerApi.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes ### Return type -[**RemainingCreditModel**](remainingCreditModel.md) +[**RemainingCreditModel**](RemainingCreditModel.md) ### Authorization @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**CreateReseller**](createReseller.md) +[**CreateReseller**](CreateReseller.md) ### Authorization @@ -229,7 +229,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildAccountCreationStatus**](getChildAccountCreationStatus.md) +[**GetChildAccountCreationStatus**](GetChildAccountCreationStatus.md) ### Authorization @@ -255,7 +255,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildDomains**](getChildDomains.md) +[**GetChildDomains**](GetChildDomains.md) ### Authorization @@ -281,7 +281,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildInfo**](getChildInfo.md) +[**GetChildInfo**](GetChildInfo.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ### Return type -[**GetChildrenList**](getChildrenList.md) +[**GetChildrenList**](GetChildrenList.md) ### Authorization @@ -343,7 +343,7 @@ Name | Type | Description | Notes ### Return type -[**GetSsoToken**](getSsoToken.md) +[**GetSsoToken**](GetSsoToken.md) ### Authorization @@ -370,7 +370,7 @@ Name | Type | Description | Notes ### Return type -[**RemainingCreditModel**](remainingCreditModel.md) +[**RemainingCreditModel**](RemainingCreditModel.md) ### Authorization diff --git a/docs/SMSCampaignsApi.md b/docs/SMSCampaignsApi.md index 91d7c3f..53b464e 100644 --- a/docs/SMSCampaignsApi.md +++ b/docs/SMSCampaignsApi.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmsCampaign**](getSmsCampaign.md) +[**GetSmsCampaign**](GetSmsCampaign.md) ### Authorization @@ -119,7 +119,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmsCampaigns**](getSmsCampaigns.md) +[**GetSmsCampaigns**](GetSmsCampaigns.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](createdProcessId.md) +[**CreatedProcessId**](CreatedProcessId.md) ### Authorization diff --git a/docs/SendReport.md b/docs/SendReport.md index 3d5474f..f7d0f6f 100644 --- a/docs/SendReport.md +++ b/docs/SendReport.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Language** | **string** | Language of email content for campaign report sending. | [optional] [default to null] -**Email** | [***SendReportEmail**](sendReport_email.md) | | [default to null] +**Email** | [***SendReportEmail**](SendReportEmail.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index 1fb247c..c9be6eb 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Sender** | [***SendSmtpEmailSender**](sendSmtpEmail_sender.md) | | [optional] [default to null] -**To** | [**[]SendSmtpEmailTo**](sendSmtpEmail_to.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] [default to null] -**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmail_bcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] -**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmail_cc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] +**Sender** | [***SendSmtpEmailSender**](SendSmtpEmailSender.md) | | [optional] [default to null] +**To** | [**[]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] [default to null] +**Bcc** | [**[]SendSmtpEmailBcc**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] +**Cc** | [**[]SendSmtpEmailCc**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] **HtmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] [default to null] **TextContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] [default to null] **Subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] [default to null] -**ReplyTo** | [***SendSmtpEmailReplyTo**](sendSmtpEmail_replyTo.md) | | [optional] [default to null] -**Attachment** | [**[]SendSmtpEmailAttachment**](sendSmtpEmail_attachment.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] [default to null] +**ReplyTo** | [***SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] [default to null] +**Attachment** | [**[]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] [default to null] **Headers** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] **TemplateId** | **int64** | Id of the template. | [optional] [default to null] **Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] -**MessageVersions** | [**[]SendSmtpEmailMessageVersions**](sendSmtpEmail_messageVersions.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] [default to null] +**MessageVersions** | [**[]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] [default to null] **Tags** | **[]string** | Tag your emails to find them more easily | [optional] [default to null] **ScheduledAt** | [**time.Time**](time.Time.md) | 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] [default to null] **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] [default to null] diff --git a/docs/SendSmtpEmailMessageVersions.md b/docs/SendSmtpEmailMessageVersions.md index e164a78..2cd6fa7 100644 --- a/docs/SendSmtpEmailMessageVersions.md +++ b/docs/SendSmtpEmailMessageVersions.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**To** | [**[]SendSmtpEmailTo1**](sendSmtpEmail_to_1.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\"}] | [default to null] +**To** | [**[]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\"}] | [default to null] **Params** | [**map[string]interface{}**](interface{}.md) | 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] [default to null] -**Bcc** | [**[]SendSmtpEmailBcc**](sendSmtpEmail_bcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] -**Cc** | [**[]SendSmtpEmailCc**](sendSmtpEmail_cc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] -**ReplyTo** | [***SendSmtpEmailReplyTo1**](sendSmtpEmail_replyTo_1.md) | | [optional] [default to null] +**Bcc** | [**[]SendSmtpEmailBcc**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] +**Cc** | [**[]SendSmtpEmailCc**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] +**ReplyTo** | [***SendSmtpEmailReplyTo1**](SendSmtpEmailReplyTo1.md) | | [optional] [default to null] **Subject** | **string** | Custom subject specific to message version | [optional] [default to null] **HtmlContent** | **string** | HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** | [optional] [default to null] **TextContent** | **string** | Plain Text body of the message. **Ignored if 'templateId' is passed** | [optional] [default to null] diff --git a/docs/SendersApi.md b/docs/SendersApi.md index 5ccfb98..8908587 100644 --- a/docs/SendersApi.md +++ b/docs/SendersApi.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSenderModel**](createSenderModel.md) +[**CreateSenderModel**](CreateSenderModel.md) ### Authorization @@ -81,7 +81,7 @@ This endpoint does not need any parameter. ### Return type -[**GetIps**](getIps.md) +[**GetIps**](GetIps.md) ### Authorization @@ -107,7 +107,7 @@ Name | Type | Description | Notes ### Return type -[**GetIpsFromSender**](getIpsFromSender.md) +[**GetIpsFromSender**](GetIpsFromSender.md) ### Authorization @@ -141,7 +141,7 @@ Name | Type | Description | Notes ### Return type -[**GetSendersList**](getSendersList.md) +[**GetSendersList**](GetSendersList.md) ### Authorization diff --git a/docs/SubAccountDetailsResponse.md b/docs/SubAccountDetailsResponse.md index a43cae6..bbc8226 100644 --- a/docs/SubAccountDetailsResponse.md +++ b/docs/SubAccountDetailsResponse.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes **Name** | **string** | Name of the sub-account user | [optional] [default to null] **Email** | **string** | Email id of the sub-account organization | [optional] [default to null] **CompanyName** | **string** | Sub-account company name | [optional] [default to null] -**Groups** | [**[]SubAccountDetailsResponseGroups**](subAccountDetailsResponse_groups.md) | List of group(s) associated with the sub-account | [optional] [default to null] -**PlanInfo** | [***SubAccountDetailsResponsePlanInfo**](subAccountDetailsResponse_planInfo.md) | | [optional] [default to null] +**Groups** | [**[]SubAccountDetailsResponseGroups**](SubAccountDetailsResponseGroups.md) | List of group(s) associated with the sub-account | [optional] [default to null] +**PlanInfo** | [***SubAccountDetailsResponsePlanInfo**](SubAccountDetailsResponsePlanInfo.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponsePlanInfo.md b/docs/SubAccountDetailsResponsePlanInfo.md index bb5eabd..e4d8eb1 100644 --- a/docs/SubAccountDetailsResponsePlanInfo.md +++ b/docs/SubAccountDetailsResponsePlanInfo.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Credits** | [***SubAccountDetailsResponsePlanInfoCredits**](subAccountDetailsResponse_planInfo_credits.md) | | [optional] [default to null] -**Features** | [***SubAccountDetailsResponsePlanInfoFeatures**](subAccountDetailsResponse_planInfo_features.md) | | [optional] [default to null] +**Credits** | [***SubAccountDetailsResponsePlanInfoCredits**](SubAccountDetailsResponsePlanInfoCredits.md) | | [optional] [default to null] +**Features** | [***SubAccountDetailsResponsePlanInfoFeatures**](SubAccountDetailsResponsePlanInfoFeatures.md) | | [optional] [default to null] **PlanType** | **string** | type of the plan | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponsePlanInfoCredits.md b/docs/SubAccountDetailsResponsePlanInfoCredits.md index 527bfd3..c6158aa 100644 --- a/docs/SubAccountDetailsResponsePlanInfoCredits.md +++ b/docs/SubAccountDetailsResponsePlanInfoCredits.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Emails** | [***SubAccountDetailsResponsePlanInfoCreditsEmails**](subAccountDetailsResponse_planInfo_credits_emails.md) | | [optional] [default to null] -**Sms** | [***SubAccountDetailsResponsePlanInfoCreditsSms**](subAccountDetailsResponse_planInfo_credits_sms.md) | | [optional] [default to null] -**WpSubscribers** | [***SubAccountDetailsResponsePlanInfoCreditsWpSubscribers**](subAccountDetailsResponse_planInfo_credits_wpSubscribers.md) | | [optional] [default to null] +**Emails** | [***SubAccountDetailsResponsePlanInfoCreditsEmails**](SubAccountDetailsResponsePlanInfoCreditsEmails.md) | | [optional] [default to null] +**Sms** | [***SubAccountDetailsResponsePlanInfoCreditsSms**](SubAccountDetailsResponsePlanInfoCreditsSms.md) | | [optional] [default to null] +**WpSubscribers** | [***SubAccountDetailsResponsePlanInfoCreditsWpSubscribers**](SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountDetailsResponsePlanInfoFeatures.md b/docs/SubAccountDetailsResponsePlanInfoFeatures.md index 3e3babf..8ecd5f1 100644 --- a/docs/SubAccountDetailsResponsePlanInfoFeatures.md +++ b/docs/SubAccountDetailsResponsePlanInfoFeatures.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Inbox** | [***SubAccountDetailsResponsePlanInfoFeaturesInbox**](subAccountDetailsResponse_planInfo_features_inbox.md) | | [optional] [default to null] -**LandingPage** | [***SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](subAccountDetailsResponse_planInfo_features_landingPage.md) | | [optional] [default to null] -**Users** | [***SubAccountDetailsResponsePlanInfoFeaturesUsers**](subAccountDetailsResponse_planInfo_features_users.md) | | [optional] [default to null] +**Inbox** | [***SubAccountDetailsResponsePlanInfoFeaturesInbox**](SubAccountDetailsResponsePlanInfoFeaturesInbox.md) | | [optional] [default to null] +**LandingPage** | [***SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) | | [optional] [default to null] +**Users** | [***SubAccountDetailsResponsePlanInfoFeaturesUsers**](SubAccountDetailsResponsePlanInfoFeaturesUsers.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountUpdatePlanRequest.md b/docs/SubAccountUpdatePlanRequest.md index e0fd934..3b4e4b1 100644 --- a/docs/SubAccountUpdatePlanRequest.md +++ b/docs/SubAccountUpdatePlanRequest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Credits** | [***SubAccountUpdatePlanRequestCredits**](subAccountUpdatePlanRequest_credits.md) | | [optional] [default to null] -**Features** | [***SubAccountUpdatePlanRequestFeatures**](subAccountUpdatePlanRequest_features.md) | | [optional] [default to null] +**Credits** | [***SubAccountUpdatePlanRequestCredits**](SubAccountUpdatePlanRequestCredits.md) | | [optional] [default to null] +**Features** | [***SubAccountUpdatePlanRequestFeatures**](SubAccountUpdatePlanRequestFeatures.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountsResponse.md b/docs/SubAccountsResponse.md index cad068d..8ac0c81 100644 --- a/docs/SubAccountsResponse.md +++ b/docs/SubAccountsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Count** | **int32** | Total number of subaccounts | [optional] [default to null] -**SubAccounts** | [**[]SubAccountsResponseSubAccounts**](subAccountsResponse_subAccounts.md) | | [optional] [default to null] +**SubAccounts** | [**[]SubAccountsResponseSubAccounts**](SubAccountsResponseSubAccounts.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountsResponseSubAccounts.md b/docs/SubAccountsResponseSubAccounts.md index d617e81..d775de5 100644 --- a/docs/SubAccountsResponseSubAccounts.md +++ b/docs/SubAccountsResponseSubAccounts.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **CompanyName** | **string** | Name of the sub-account company | [default to null] **Active** | **bool** | Whether the sub-account is active or not | [default to null] **CreatedAt** | **int64** | Timestamp when the sub-account was created | [default to null] -**Groups** | [**[]SubAccountsResponseGroups**](subAccountsResponse_groups.md) | Group details | [default to null] +**Groups** | [**[]SubAccountsResponseGroups**](SubAccountsResponseGroups.md) | Group details | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionalEmailsApi.md b/docs/TransactionalEmailsApi.md index 72e8a8c..f04f6aa 100644 --- a/docs/TransactionalEmailsApi.md +++ b/docs/TransactionalEmailsApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -224,7 +224,7 @@ Name | Type | Description | Notes ### Return type -[**GetAggregatedReport**](getAggregatedReport.md) +[**GetAggregatedReport**](GetAggregatedReport.md) ### Authorization @@ -248,7 +248,7 @@ This endpoint does not need any parameter. ### Return type -[**GetBlockedDomains**](getBlockedDomains.md) +[**GetBlockedDomains**](GetBlockedDomains.md) ### Authorization @@ -293,7 +293,7 @@ Name | Type | Description | Notes ### Return type -[**GetEmailEventReport**](getEmailEventReport.md) +[**GetEmailEventReport**](GetEmailEventReport.md) ### Authorization @@ -335,7 +335,7 @@ Name | Type | Description | Notes ### Return type -[**GetScheduledEmailByBatchId**](getScheduledEmailByBatchId.md) +[**GetScheduledEmailByBatchId**](GetScheduledEmailByBatchId.md) ### Authorization @@ -373,7 +373,7 @@ Name | Type | Description | Notes ### Return type -[**GetScheduledEmailByMessageId**](getScheduledEmailByMessageId.md) +[**GetScheduledEmailByMessageId**](GetScheduledEmailByMessageId.md) ### Authorization @@ -412,7 +412,7 @@ Name | Type | Description | Notes ### Return type -[**GetReports**](getReports.md) +[**GetReports**](GetReports.md) ### Authorization @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmtpTemplateOverview**](getSmtpTemplateOverview.md) +[**GetSmtpTemplateOverview**](GetSmtpTemplateOverview.md) ### Authorization @@ -474,7 +474,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmtpTemplates**](getSmtpTemplates.md) +[**GetSmtpTemplates**](GetSmtpTemplates.md) ### Authorization @@ -512,7 +512,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacBlockedContacts**](getTransacBlockedContacts.md) +[**GetTransacBlockedContacts**](GetTransacBlockedContacts.md) ### Authorization @@ -538,7 +538,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacEmailContent**](getTransacEmailContent.md) +[**GetTransacEmailContent**](GetTransacEmailContent.md) ### Authorization @@ -580,7 +580,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacEmailsList**](getTransacEmailsList.md) +[**GetTransacEmailsList**](GetTransacEmailsList.md) ### Authorization @@ -633,7 +633,7 @@ Name | Type | Description | Notes ### Return type -[**CreateSmtpEmail**](createSmtpEmail.md) +[**CreateSmtpEmail**](CreateSmtpEmail.md) ### Authorization diff --git a/docs/TransactionalSMSApi.md b/docs/TransactionalSMSApi.md index 567f6aa..bd1e148 100644 --- a/docs/TransactionalSMSApi.md +++ b/docs/TransactionalSMSApi.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes ### Return type -[**GetSmsEventReport**](getSmsEventReport.md) +[**GetSmsEventReport**](GetSmsEventReport.md) ### Authorization @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacAggregatedSmsReport**](getTransacAggregatedSmsReport.md) +[**GetTransacAggregatedSmsReport**](GetTransacAggregatedSmsReport.md) ### Authorization @@ -111,7 +111,7 @@ Name | Type | Description | Notes ### Return type -[**GetTransacSmsReport**](getTransacSmsReport.md) +[**GetTransacSmsReport**](GetTransacSmsReport.md) ### Authorization diff --git a/docs/TransactionalWhatsAppApi.md b/docs/TransactionalWhatsAppApi.md index 355a75b..99aa2a5 100644 --- a/docs/TransactionalWhatsAppApi.md +++ b/docs/TransactionalWhatsAppApi.md @@ -37,7 +37,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappEventReport**](getWhatsappEventReport.md) +[**GetWhatsappEventReport**](GetWhatsappEventReport.md) ### Authorization diff --git a/docs/UpdateAttribute.md b/docs/UpdateAttribute.md index 14984e8..ef607cf 100644 --- a/docs/UpdateAttribute.md +++ b/docs/UpdateAttribute.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]UpdateAttributeEnumeration**](updateAttribute_enumeration.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] [default to null] +**Enumeration** | [**[]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] [default to null] **MultiCategoryOptions** | **[]string** | Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateBatchContacts.md b/docs/UpdateBatchContacts.md index d7e8689..9621aad 100644 --- a/docs/UpdateBatchContacts.md +++ b/docs/UpdateBatchContacts.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [**[]UpdateBatchContactsContacts**](updateBatchContacts_contacts.md) | List of contacts to be updated | [optional] [default to null] +**Contacts** | [**[]UpdateBatchContactsContacts**](UpdateBatchContactsContacts.md) | List of contacts to be updated | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md index 250e388..b83a09b 100644 --- a/docs/UpdateEmailCampaign.md +++ b/docs/UpdateEmailCampaign.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the campaign | [optional] [default to null] -**Sender** | [***UpdateEmailCampaignSender**](updateEmailCampaign_sender.md) | | [optional] [default to null] +**Sender** | [***UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] [default to null] **Name** | **string** | Name of the campaign | [optional] [default to null] **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] [default to null] **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] @@ -13,7 +13,7 @@ Name | Type | Description | Notes **PreviewText** | **string** | Preview text or preheader of the email campaign | [optional] [default to null] **ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] [default to null] **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] [default to null] -**Recipients** | [***UpdateEmailCampaignRecipients**](updateEmailCampaign_recipients.md) | | [optional] [default to null] +**Recipients** | [***UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional] [default to null] **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] [default to null] **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 null] **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] [default to null] diff --git a/docs/UpdateExternalFeed.md b/docs/UpdateExternalFeed.md index 52e7b6a..7a4606b 100644 --- a/docs/UpdateExternalFeed.md +++ b/docs/UpdateExternalFeed.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Username** | **string** | Username for authType `basic` | [optional] [default to null] **Password** | **string** | Password for authType `basic` | [optional] [default to null] **Token** | **string** | Token for authType `token` | [optional] [default to null] -**Headers** | [**[]GetExternalFeedByUuidHeaders**](getExternalFeedByUUID_headers.md) | Custom headers for the feed | [optional] [default to null] +**Headers** | [**[]GetExternalFeedByUuidHeaders**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] [default to null] **MaxRetries** | **int32** | Maximum number of retries on the feed url | [optional] [default to null] **Cache** | **bool** | Toggle caching of feed url response | [optional] [default to null] diff --git a/docs/UpdateSender.md b/docs/UpdateSender.md index 366cd16..eaec5bb 100644 --- a/docs/UpdateSender.md +++ b/docs/UpdateSender.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | From Name to update the sender | [optional] [default to null] **Email** | **string** | From Email to update the sender | [optional] [default to null] -**Ips** | [**[]CreateSenderIps**](createSender_ips.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] [default to null] +**Ips** | [**[]CreateSenderIps**](CreateSenderIps.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateSmsCampaign.md b/docs/UpdateSmsCampaign.md index a0c9178..1564529 100644 --- a/docs/UpdateSmsCampaign.md +++ b/docs/UpdateSmsCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the campaign | [optional] [default to null] **Sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [optional] [default to null] **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] [default to null] -**Recipients** | [***CreateSmsCampaignRecipients**](createSmsCampaign_recipients.md) | | [optional] [default to null] +**Recipients** | [***CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] [default to null] **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] [default to null] **UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] **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] [default to null] diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md index 3807fab..dbbc39f 100644 --- a/docs/UpdateSmtpTemplate.md +++ b/docs/UpdateSmtpTemplate.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tag** | **string** | Tag of the template | [optional] [default to null] -**Sender** | [***UpdateSmtpTemplateSender**](updateSmtpTemplate_sender.md) | | [optional] [default to null] +**Sender** | [***UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] [default to null] **TemplateName** | **string** | Name of the template | [optional] [default to null] **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] [default to null] **HtmlUrl** | **string** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] [default to null] diff --git a/docs/UpdateWebhook.md b/docs/UpdateWebhook.md index edd93d2..f032b0d 100644 --- a/docs/UpdateWebhook.md +++ b/docs/UpdateWebhook.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **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] [default to null] **Domain** | **string** | Inbound domain of webhook, used in case of event type `inbound` | [optional] [default to null] **Batched** | **bool** | To send batched webhooks | [optional] [default to null] -**Auth** | [***GetWebhookAuth**](getWebhook_auth.md) | | [optional] [default to null] -**Headers** | [**[]GetWebhookHeaders**](getWebhook_headers.md) | Custom headers to be send with webhooks | [optional] [default to null] +**Auth** | [***GetWebhookAuth**](GetWebhookAuth.md) | | [optional] [default to null] +**Headers** | [**[]GetWebhookHeaders**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateWhatsAppCampaign.md b/docs/UpdateWhatsAppCampaign.md index 69efe92..7adf50b 100644 --- a/docs/UpdateWhatsAppCampaign.md +++ b/docs/UpdateWhatsAppCampaign.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **CampaignName** | **string** | Name of the campaign | [optional] [default to null] **CampaignStatus** | **string** | Status of the campaign | [optional] [default to null] **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] [default to null] -**Recipients** | [***CreateWhatsAppCampaignRecipients**](createWhatsAppCampaign_recipients.md) | | [optional] [default to null] +**Recipients** | [***CreateWhatsAppCampaignRecipients**](CreateWhatsAppCampaignRecipients.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/UserApi.md index 0b8d03c..968440c 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -49,7 +49,7 @@ This endpoint does not need any parameter. ### Return type -[**GetInvitedUsersList**](getInvitedUsersList.md) +[**GetInvitedUsersList**](GetInvitedUsersList.md) ### Authorization @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### Return type -[**GetUserPermission**](getUserPermission.md) +[**GetUserPermission**](GetUserPermission.md) ### Authorization @@ -103,7 +103,7 @@ Name | Type | Description | Notes ### Return type -[**Inviteuser**](inviteuser.md) +[**Inviteuser**](Inviteuser.md) ### Authorization @@ -129,7 +129,7 @@ Name | Type | Description | Notes ### Return type -[**PutRevokeUserPermission**](putRevokeUserPermission.md) +[**PutRevokeUserPermission**](PutRevokeUserPermission.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**Putresendcancelinvitation**](putresendcancelinvitation.md) +[**Putresendcancelinvitation**](Putresendcancelinvitation.md) ### Authorization diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index 46b3b67..bc8a5fc 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -79,7 +79,7 @@ Name | Type | Description | Notes ### Return type -[**CreatedProcessId**](createdProcessId.md) +[**CreatedProcessId**](CreatedProcessId.md) ### Authorization @@ -105,7 +105,7 @@ Name | Type | Description | Notes ### Return type -[**GetWebhook**](getWebhook.md) +[**GetWebhook**](GetWebhook.md) ### Authorization @@ -139,7 +139,7 @@ Name | Type | Description | Notes ### Return type -[**GetWebhooks**](getWebhooks.md) +[**GetWebhooks**](GetWebhooks.md) ### Authorization diff --git a/docs/WhatsAppCampaignsApi.md b/docs/WhatsAppCampaignsApi.md index cfa75e3..b38513b 100644 --- a/docs/WhatsAppCampaignsApi.md +++ b/docs/WhatsAppCampaignsApi.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -54,7 +54,7 @@ Name | Type | Description | Notes ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -106,7 +106,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappCampaignOverview**](getWhatsappCampaignOverview.md) +[**GetWhatsappCampaignOverview**](GetWhatsappCampaignOverview.md) ### Authorization @@ -143,7 +143,7 @@ Name | Type | Description | Notes ### Return type -[**GetWhatsappCampaigns**](getWhatsappCampaigns.md) +[**GetWhatsappCampaigns**](GetWhatsappCampaigns.md) ### Authorization @@ -165,7 +165,7 @@ This endpoint does not need any parameter. ### Return type -[**GetWhatsAppConfig**](getWhatsAppConfig.md) +[**GetWhatsAppConfig**](GetWhatsAppConfig.md) ### Authorization @@ -203,7 +203,7 @@ Name | Type | Description | Notes ### Return type -[**GetWaTemplates**](getWATemplates.md) +[**GetWaTemplates**](GetWATemplates.md) ### Authorization diff --git a/docs/WhatsappCampTemplate.md b/docs/WhatsappCampTemplate.md index ca12560..cb22ae7 100644 --- a/docs/WhatsappCampTemplate.md +++ b/docs/WhatsappCampTemplate.md @@ -9,9 +9,9 @@ Name | Type | Description | Notes **ContainsButton** | **bool** | | [optional] [default to null] **DisplayHeader** | **bool** | | [optional] [default to null] **HeaderType** | **string** | type of header | [optional] [default to null] -**Components** | [**[]ComponentItems**](componentItems.md) | array of component item objects | [optional] [default to null] -**HeaderVariables** | [**[]VariablesItems**](variablesItems.md) | array of variables item object | [optional] [default to null] -**BodyVariables** | [**[]VariablesItems**](variablesItems.md) | array of variables item variables | [optional] [default to null] +**Components** | [**[]ComponentItems**](ComponentItems.md) | array of component item objects | [optional] [default to null] +**HeaderVariables** | [**[]VariablesItems**](VariablesItems.md) | array of variables item object | [optional] [default to null] +**BodyVariables** | [**[]VariablesItems**](VariablesItems.md) | array of variables item variables | [optional] [default to null] **ButtonType** | **string** | | [optional] [default to null] **HideFooter** | **bool** | | [optional] [default to null] From 4dc32fc1663e0b1888db9efb489d7ae020f712c0 Mon Sep 17 00:00:00 2001 From: jain-raunak Date: Sat, 13 Jul 2024 00:07:12 +0530 Subject: [PATCH 3/4] name correction --- lib/model_create_domain_model.go | 4 ++-- lib/model_create_sender.go | 2 +- lib/model_create_sender_model.go | 2 +- lib/model_otp.go | 4 ++-- test.go | 33 -------------------------------- 5 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 test.go diff --git a/lib/model_create_domain_model.go b/lib/model_create_domain_model.go index 00ceef4..0847437 100644 --- a/lib/model_create_domain_model.go +++ b/lib/model_create_domain_model.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com @@ -18,6 +18,6 @@ type CreateDomainModel struct { // Domain Provider DomainProvider string `json:"domain_provider,omitempty"` // Success message - Message string `json:"message,omitempty"` + Message string `json:"message,omitempty"` DnsRecords *CreateDomainModelDnsRecords `json:"dns_records,omitempty"` } diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go index e2a73bd..094ff38 100644 --- a/lib/model_create_sender.go +++ b/lib/model_create_sender.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go index be72393..54d0019 100644 --- a/lib/model_create_sender_model.go +++ b/lib/model_create_sender_model.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/model_otp.go b/lib/model_otp.go index e5dfca1..10208f7 100644 --- a/lib/model_otp.go +++ b/lib/model_otp.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com @@ -12,5 +12,5 @@ package swagger type Otp struct { // 6 digit OTP received on email - Name int32 `json:"name,omitempty"` + Otp int32 `json:"otp,omitempty"` } diff --git a/test.go b/test.go deleted file mode 100644 index b59c02d..0000000 --- a/test.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "context" - "fmt" - - brevo "github.com/getbrevo/brevo-go/lib" -) - -func main() { - var ctx context.Context - cfg := brevo.NewConfiguration() - //Configure API key authorization: api-key - cfg.AddDefaultHeader("api-key", "{api-key}") - //Configure API key authorization: partner-key - //cfg.AddDefaultHeader("partner-key", "YOUR_API_KEY") - - br := brevo.NewAPIClient(cfg) - - resp, err := br.ContactsApi.UpdateContact(ctx, "697", brevo.UpdateContact{ - Attributes: map[string]interface{}{ - "Email": "test-brevo@test.com", - }, - }) - if err != nil { - fmt.Println("Error ", err.Error()) - return - } - fmt.Println("resp:", resp) - //fmt.Printf("%+v", result.Contacts) - //fmt.Println("=============\n\n\n", result.Contacts, result.Contacts.Failure, result.Contacts.Success) - return -} From 58adec4c3c1c1f6c280023bb93ade5eb9be6be41 Mon Sep 17 00:00:00 2001 From: jain-raunak Date: Sat, 13 Jul 2024 00:15:32 +0530 Subject: [PATCH 4/4] package name correction --- lib/api_account.go | 102 +- lib/api_companies.go | 368 ++-- lib/api_contacts.go | 1598 ++++++++--------- lib/api_conversations.go | 516 +++--- lib/api_coupons.go | 372 ++-- lib/api_deals.go | 546 +++--- lib/api_domains.go | 296 ++- lib/api_ecommerce.go | 1026 ++++++----- lib/api_email_campaigns.go | 768 ++++---- lib/api_events.go | 50 +- lib/api_external_feeds.go | 302 ++-- lib/api_files.go | 310 ++-- lib/api_inbound_parsing.go | 192 +- lib/api_master_account.go | 1156 ++++++------ lib/api_notes.go | 316 ++-- lib/api_payments.go | 244 ++- lib/api_process.go | 132 +- lib/api_reseller.go | 1096 ++++++----- lib/api_senders.go | 362 ++-- lib/api_sms_campaigns.go | 560 +++--- lib/api_tasks.go | 324 ++-- lib/api_transactional_emails.go | 1176 ++++++------ lib/api_transactional_sms.go | 260 +-- lib/api_transactional_whats_app.go | 132 +- lib/api_user.go | 334 ++-- lib/api_webhooks.go | 332 ++-- lib/api_whats_app_campaigns.go | 490 +++-- lib/client.go | 26 +- lib/configuration.go | 6 +- lib/model_ab_test_campaign_result.go | 10 +- ...l_ab_test_campaign_result_clicked_links.go | 4 +- ...odel_ab_test_campaign_result_statistics.go | 14 +- lib/model_ab_test_version_clicks.go | 4 +- lib/model_ab_test_version_clicks_inner.go | 4 +- lib/model_ab_test_version_stats.go | 4 +- lib/model_add_child_domain.go | 4 +- lib/model_add_contact_to_list.go | 4 +- lib/model_add_credits.go | 4 +- lib/model_authenticate_domain_model.go | 4 +- lib/model_block_domain.go | 4 +- lib/model_body.go | 4 +- lib/model_body_1.go | 4 +- lib/model_body_10.go | 4 +- lib/model_body_11.go | 8 +- lib/model_body_12.go | 4 +- lib/model_body_13.go | 4 +- lib/model_body_14.go | 4 +- lib/model_body_15.go | 4 +- lib/model_body_16.go | 4 +- lib/model_body_17.go | 4 +- lib/model_body_2.go | 4 +- lib/model_body_3.go | 4 +- lib/model_body_4.go | 4 +- lib/model_body_5.go | 2 +- lib/model_body_6.go | 2 +- lib/model_body_7.go | 4 +- lib/model_body_8.go | 2 +- lib/model_body_9.go | 2 +- lib/model_body_variables_items.go | 4 +- lib/model_cart.go | 10 +- lib/model_companies_list.go | 4 +- lib/model_company.go | 2 +- lib/model_company_attributes.go | 4 +- lib/model_company_attributes_inner.go | 14 +- lib/model_component_items.go | 6 +- lib/model_configuration.go | 8 +- lib/model_conversations_message.go | 8 +- lib/model_conversations_message_file.go | 6 +- ...l_conversations_message_file_image_info.go | 4 +- lib/model_conversion_source_metrics.go | 14 +- lib/model_conversion_source_product.go | 20 +- lib/model_corporate_group_details_response.go | 8 +- ..._corporate_group_details_response_group.go | 4 +- ...rate_group_details_response_subaccounts.go | 4 +- ..._corporate_group_details_response_users.go | 4 +- lib/model_create_api_key_request.go | 4 +- lib/model_create_api_key_response.go | 4 +- lib/model_create_attribute.go | 6 +- lib/model_create_attribute_enumeration.go | 4 +- lib/model_create_category_model.go | 4 +- lib/model_create_child.go | 4 +- lib/model_create_contact.go | 2 +- lib/model_create_coupon_collection.go | 4 +- lib/model_create_coupons.go | 8 +- lib/model_create_doi_contact.go | 4 +- lib/model_create_domain.go | 4 +- lib/model_create_domain_model.go | 2 +- lib/model_create_domain_model_dns_records.go | 8 +- ...te_domain_model_dns_records_dkim_record.go | 10 +- lib/model_create_email_campaign.go | 2 +- lib/model_create_email_campaign_recipients.go | 4 +- lib/model_create_email_campaign_sender.go | 4 +- lib/model_create_external_feed.go | 6 +- lib/model_create_list.go | 4 +- lib/model_create_model.go | 4 +- lib/model_create_payment_request.go | 16 +- lib/model_create_payment_response.go | 4 +- lib/model_create_product_model.go | 4 +- lib/model_create_reseller.go | 4 +- lib/model_create_sender.go | 2 +- lib/model_create_sender_ips.go | 4 +- lib/model_create_sender_model.go | 2 +- lib/model_create_sms_campaign.go | 6 +- lib/model_create_sms_campaign_recipients.go | 4 +- lib/model_create_smtp_email.go | 6 +- lib/model_create_smtp_template.go | 6 +- lib/model_create_smtp_template_sender.go | 4 +- lib/model_create_sub_account.go | 4 +- lib/model_create_sub_account_response.go | 4 +- lib/model_create_update_batch_category.go | 4 +- ...odel_create_update_batch_category_model.go | 4 +- lib/model_create_update_batch_products.go | 4 +- ...odel_create_update_batch_products_model.go | 4 +- lib/model_create_update_categories.go | 8 +- lib/model_create_update_category.go | 8 +- lib/model_create_update_contact_model.go | 4 +- lib/model_create_update_folder.go | 4 +- lib/model_create_update_product.go | 4 +- lib/model_create_update_products.go | 4 +- lib/model_create_webhook.go | 10 +- lib/model_create_whats_app_campaign.go | 10 +- ...el_create_whats_app_campaign_recipients.go | 8 +- lib/model_create_whats_app_template.go | 10 +- lib/model_created_batch_id.go | 4 +- lib/model_created_process_id.go | 4 +- lib/model_deal.go | 2 +- lib/model_deal_attributes.go | 4 +- lib/model_deal_attributes_inner.go | 14 +- lib/model_deals_list.go | 4 +- lib/model_delete_hardbounces.go | 4 +- lib/model_email_export_recipients.go | 4 +- lib/model_error_model.go | 4 +- lib/model_event.go | 2 +- lib/model_event_identifiers.go | 4 +- lib/model_export_webhooks_history.go | 4 +- lib/model_file_data.go | 4 +- lib/model_file_downloadable_link.go | 4 +- lib/model_file_list.go | 4 +- lib/model_get_account.go | 12 +- lib/model_get_account_activity.go | 4 +- lib/model_get_account_activity_logs.go | 4 +- lib/model_get_account_marketing_automation.go | 4 +- lib/model_get_account_plan.go | 4 +- lib/model_get_account_relay.go | 8 +- lib/model_get_account_relay_data.go | 4 +- lib/model_get_aggregated_report.go | 4 +- lib/model_get_all_external_feeds.go | 6 +- lib/model_get_all_external_feeds_feeds.go | 6 +- lib/model_get_attributes.go | 4 +- lib/model_get_attributes_attributes.go | 4 +- lib/model_get_attributes_enumeration.go | 4 +- lib/model_get_blocked_domains.go | 4 +- lib/model_get_campaign_overview.go | 4 +- lib/model_get_campaign_recipients.go | 6 +- lib/model_get_campaign_stats.go | 4 +- lib/model_get_categories.go | 4 +- lib/model_get_category_details.go | 4 +- ...model_get_child_account_creation_status.go | 4 +- lib/model_get_child_domain.go | 4 +- lib/model_get_child_domains.go | 4 +- lib/model_get_child_info.go | 12 +- lib/model_get_child_info_api_keys.go | 4 +- lib/model_get_child_info_api_keys_v2.go | 4 +- lib/model_get_child_info_api_keys_v3.go | 4 +- lib/model_get_child_info_credits.go | 4 +- lib/model_get_child_info_statistics.go | 4 +- lib/model_get_children_list.go | 4 +- lib/model_get_client.go | 4 +- lib/model_get_contact_campaign_stats.go | 22 +- ...odel_get_contact_campaign_stats_clicked.go | 8 +- ...model_get_contact_campaign_stats_opened.go | 4 +- ...ntact_campaign_stats_transac_attributes.go | 4 +- ..._contact_campaign_stats_unsubscriptions.go | 4 +- lib/model_get_contact_details.go | 2 +- lib/model_get_contacts.go | 4 +- lib/model_get_corporate_invited_users_list.go | 4 +- ...orate_invited_users_list_feature_access.go | 4 +- ...get_corporate_invited_users_list_groups.go | 4 +- ..._get_corporate_invited_users_list_users.go | 6 +- lib/model_get_corporate_user_permission.go | 8 +- ...orporate_user_permission_feature_access.go | 4 +- ...el_get_corporate_user_permission_groups.go | 4 +- lib/model_get_coupon_collection.go | 4 +- lib/model_get_device_browser_stats.go | 4 +- lib/model_get_domain_configuration_model.go | 8 +- lib/model_get_domains_list.go | 4 +- lib/model_get_domains_list_domains.go | 4 +- lib/model_get_email_campaign.go | 2 +- lib/model_get_email_campaigns.go | 4 +- lib/model_get_email_event_report.go | 4 +- lib/model_get_email_event_report_events.go | 4 +- lib/model_get_extended_campaign_overview.go | 6 +- ...l_get_extended_campaign_overview_sender.go | 4 +- lib/model_get_extended_campaign_stats.go | 2 +- lib/model_get_extended_client.go | 8 +- lib/model_get_extended_client_address.go | 4 +- lib/model_get_extended_contact_details.go | 2 +- ...get_extended_contact_details_statistics.go | 6 +- ...nded_contact_details_statistics_clicked.go | 4 +- ...ed_contact_details_statistics_delivered.go | 4 +- ...tended_contact_details_statistics_links.go | 4 +- ...ontact_details_statistics_messages_sent.go | 4 +- ...ended_contact_details_statistics_opened.go | 4 +- ...tact_details_statistics_unsubscriptions.go | 4 +- ...cs_unsubscriptions_admin_unsubscription.go | 4 +- ...ics_unsubscriptions_user_unsubscription.go | 4 +- lib/model_get_extended_list.go | 6 +- lib/model_get_extended_list_campaign_stats.go | 8 +- lib/model_get_external_feed_by_uuid.go | 6 +- ...model_get_external_feed_by_uuid_headers.go | 4 +- lib/model_get_folder.go | 4 +- lib/model_get_folder_lists.go | 4 +- lib/model_get_folders.go | 4 +- lib/model_get_inbound_email_events.go | 4 +- lib/model_get_inbound_email_events_by_uuid.go | 6 +- ...nbound_email_events_by_uuid_attachments.go | 4 +- ...l_get_inbound_email_events_by_uuid_logs.go | 4 +- lib/model_get_inbound_email_events_events.go | 4 +- lib/model_get_invited_users_list.go | 4 +- ...l_get_invited_users_list_feature_access.go | 2 +- lib/model_get_invited_users_list_users.go | 6 +- lib/model_get_ip.go | 4 +- lib/model_get_ip_from_sender.go | 4 +- lib/model_get_ips.go | 4 +- lib/model_get_ips_from_sender.go | 4 +- lib/model_get_list.go | 4 +- lib/model_get_lists.go | 4 +- lib/model_get_orders.go | 4 +- lib/model_get_payment_request.go | 18 +- lib/model_get_process.go | 4 +- lib/model_get_processes.go | 4 +- lib/model_get_product_details.go | 2 +- lib/model_get_products.go | 4 +- lib/model_get_reports.go | 4 +- lib/model_get_reports_reports.go | 4 +- lib/model_get_scheduled_email_by_batch_id.go | 6 +- ...get_scheduled_email_by_batch_id_batches.go | 4 +- ...model_get_scheduled_email_by_message_id.go | 4 +- lib/model_get_segments.go | 4 +- lib/model_get_segments_segments.go | 4 +- lib/model_get_senders_list.go | 4 +- lib/model_get_senders_list_ips.go | 4 +- lib/model_get_senders_list_senders.go | 4 +- lib/model_get_shared_template_url.go | 4 +- lib/model_get_sms_campaign.go | 2 +- lib/model_get_sms_campaign_overview.go | 4 +- lib/model_get_sms_campaign_stats.go | 4 +- lib/model_get_sms_campaigns.go | 4 +- lib/model_get_sms_event_report.go | 4 +- lib/model_get_sms_event_report_events.go | 6 +- lib/model_get_smtp_template_overview.go | 8 +- ...model_get_smtp_template_overview_sender.go | 4 +- lib/model_get_smtp_templates.go | 6 +- lib/model_get_sso_token.go | 4 +- lib/model_get_stats_by_browser.go | 4 +- lib/model_get_stats_by_device.go | 4 +- lib/model_get_stats_by_domain.go | 4 +- ...model_get_transac_aggregated_sms_report.go | 4 +- lib/model_get_transac_blocked_contacts.go | 6 +- ...l_get_transac_blocked_contacts_contacts.go | 8 +- ...del_get_transac_blocked_contacts_reason.go | 4 +- lib/model_get_transac_email_content.go | 4 +- lib/model_get_transac_email_content_events.go | 4 +- lib/model_get_transac_emails_list.go | 6 +- ...ransac_emails_list_transactional_emails.go | 4 +- lib/model_get_transac_sms_report.go | 4 +- lib/model_get_transac_sms_report_reports.go | 4 +- lib/model_get_user_permission.go | 4 +- lib/model_get_user_permission_privileges.go | 6 +- lib/model_get_wa_templates.go | 4 +- lib/model_get_wa_templates_templates.go | 4 +- lib/model_get_webhook.go | 12 +- lib/model_get_webhook_auth.go | 4 +- lib/model_get_webhook_headers.go | 4 +- lib/model_get_webhooks.go | 4 +- lib/model_get_whats_app_config.go | 4 +- lib/model_get_whatsapp_campaign_overview.go | 10 +- lib/model_get_whatsapp_campaigns.go | 4 +- lib/model_get_whatsapp_campaigns_campaigns.go | 8 +- lib/model_get_whatsapp_event_report.go | 4 +- lib/model_get_whatsapp_event_report_events.go | 4 +- lib/model_inline_response_200.go | 4 +- lib/model_inline_response_200_1.go | 4 +- lib/model_inline_response_200_2.go | 4 +- lib/model_inline_response_200_3.go | 4 +- lib/model_inline_response_200_4.go | 4 +- lib/model_inline_response_200_5.go | 6 +- lib/model_inline_response_200_5_totals.go | 8 +- lib/model_inline_response_200_6.go | 6 +- lib/model_inline_response_200_7.go | 4 +- lib/model_inline_response_200_8.go | 4 +- lib/model_inline_response_201.go | 4 +- lib/model_inline_response_201_1.go | 4 +- lib/model_inline_response_201_2.go | 4 +- lib/model_inline_response_201_3.go | 4 +- lib/model_inline_response_201_4.go | 4 +- lib/model_inline_response_201_5.go | 4 +- lib/model_inline_response_400.go | 4 +- lib/model_invite_admin_user.go | 6 +- lib/model_invite_admin_user_privileges.go | 4 +- lib/model_inviteuser.go | 8 +- lib/model_inviteuser_privileges.go | 4 +- lib/model_manage_ip.go | 4 +- lib/model_master_details_response.go | 8 +- ...el_master_details_response_billing_info.go | 10 +- ...r_details_response_billing_info_address.go | 4 +- ...ster_details_response_billing_info_name.go | 4 +- ...model_master_details_response_plan_info.go | 4 +- ...ter_details_response_plan_info_features.go | 4 +- lib/model_note.go | 2 +- lib/model_note_data.go | 4 +- lib/model_note_id.go | 4 +- lib/model_note_list.go | 4 +- lib/model_notification.go | 10 +- lib/model_order.go | 8 +- lib/model_order_batch.go | 4 +- lib/model_order_billing.go | 4 +- lib/model_order_products.go | 4 +- lib/model_otp.go | 2 +- lib/model_pipeline.go | 4 +- lib/model_pipeline_stage.go | 4 +- lib/model_pipelines.go | 4 +- lib/model_post_contact_info.go | 4 +- lib/model_post_contact_info_contacts.go | 4 +- lib/model_post_send_failed.go | 8 +- lib/model_post_send_sms_test_failed.go | 8 +- lib/model_put_revoke_user_permission.go | 4 +- lib/model_putresendcancelinvitation.go | 4 +- lib/model_remaining_credit_model.go | 6 +- lib/model_remaining_credit_model_child.go | 4 +- lib/model_remaining_credit_model_reseller.go | 4 +- lib/model_remove_contact_from_list.go | 4 +- lib/model_remove_credits.go | 4 +- lib/model_request_contact_export.go | 6 +- ...st_contact_export_custom_contact_filter.go | 10 +- lib/model_request_contact_import.go | 10 +- lib/model_request_contact_import_json_body.go | 2 +- lib/model_request_contact_import_new_list.go | 4 +- lib/model_request_sms_recipient_export.go | 4 +- lib/model_schedule_smtp_email.go | 6 +- lib/model_send_report.go | 8 +- lib/model_send_report_email.go | 4 +- lib/model_send_sms.go | 6 +- lib/model_send_smtp_email.go | 2 +- lib/model_send_smtp_email_attachment.go | 4 +- lib/model_send_smtp_email_bcc.go | 4 +- lib/model_send_smtp_email_cc.go | 4 +- lib/model_send_smtp_email_message_versions.go | 12 +- lib/model_send_smtp_email_reply_to.go | 4 +- lib/model_send_smtp_email_reply_to_1.go | 4 +- lib/model_send_smtp_email_sender.go | 4 +- lib/model_send_smtp_email_to.go | 4 +- lib/model_send_smtp_email_to_1.go | 4 +- lib/model_send_test_email.go | 4 +- lib/model_send_test_sms.go | 4 +- lib/model_send_transac_sms.go | 4 +- lib/model_send_whatsapp_message.go | 2 +- lib/model_set_config_display_currency.go | 4 +- lib/model_sso_token_request.go | 6 +- lib/model_sso_token_request_corporate.go | 4 +- lib/model_sub_account_apps_toggle_request.go | 4 +- lib/model_sub_account_details_response.go | 6 +- ...del_sub_account_details_response_groups.go | 4 +- ..._sub_account_details_response_plan_info.go | 6 +- ...ount_details_response_plan_info_credits.go | 8 +- ...tails_response_plan_info_credits_emails.go | 4 +- ..._details_response_plan_info_credits_sms.go | 4 +- ...sponse_plan_info_credits_wp_subscribers.go | 4 +- ...unt_details_response_plan_info_features.go | 8 +- ...tails_response_plan_info_features_inbox.go | 4 +- ...esponse_plan_info_features_landing_page.go | 4 +- ...tails_response_plan_info_features_users.go | 4 +- lib/model_sub_account_update_plan_request.go | 6 +- ...sub_account_update_plan_request_credits.go | 4 +- ...ub_account_update_plan_request_features.go | 4 +- lib/model_sub_accounts_response.go | 6 +- lib/model_sub_accounts_response_groups.go | 4 +- ...odel_sub_accounts_response_sub_accounts.go | 4 +- lib/model_task.go | 4 +- lib/model_task_list.go | 4 +- lib/model_task_reminder.go | 4 +- lib/model_task_types.go | 4 +- lib/model_update_attribute.go | 6 +- lib/model_update_attribute_enumeration.go | 4 +- lib/model_update_batch_contacts.go | 4 +- lib/model_update_batch_contacts_contacts.go | 2 +- lib/model_update_batch_contacts_model.go | 4 +- lib/model_update_campaign_status.go | 4 +- lib/model_update_child.go | 4 +- lib/model_update_child_account_status.go | 4 +- lib/model_update_child_domain.go | 4 +- lib/model_update_contact.go | 2 +- lib/model_update_coupon_collection.go | 4 +- lib/model_update_email_campaign.go | 2 +- lib/model_update_email_campaign_recipients.go | 4 +- lib/model_update_email_campaign_sender.go | 4 +- lib/model_update_external_feed.go | 6 +- lib/model_update_list.go | 4 +- lib/model_update_sender.go | 4 +- lib/model_update_sms_campaign.go | 6 +- lib/model_update_smtp_template.go | 6 +- lib/model_update_smtp_template_sender.go | 4 +- lib/model_update_webhook.go | 10 +- lib/model_update_whats_app_campaign.go | 10 +- lib/model_upload_image_model.go | 4 +- lib/model_upload_image_to_gallery.go | 4 +- lib/model_variables_items.go | 6 +- lib/model_whatsapp_camp_stats.go | 12 +- lib/model_whatsapp_camp_template.go | 14 +- lib/response.go | 4 +- 410 files changed, 7487 insertions(+), 7791 deletions(-) diff --git a/lib/api_account.go b/lib/api_account.go index 15ab5a8..044226a 100644 --- a/lib/api_account.go +++ b/lib/api_account.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "github.com/antihax/optional" ) // Linger please @@ -26,18 +26,18 @@ var ( type AccountApiService service -/* +/* AccountApiService Get your account information, plan and credits details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetAccount */ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAccount ) @@ -75,7 +75,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -88,7 +88,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -109,36 +109,36 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAccount - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* AccountApiService Get user activity logs * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetAccountActivityOpts - Optional Parameters: @@ -150,19 +150,19 @@ AccountApiService Get user activity logs @return GetAccountActivity */ -type GetAccountActivityOpts struct { +type GetAccountActivityOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAccountActivity ) @@ -212,7 +212,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -225,7 +225,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -246,40 +246,40 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAccountActivity - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_companies.go b/lib/api_companies.go index d61cebd..cae79f2 100644 --- a/lib/api_companies.go +++ b/lib/api_companies.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,18 +27,18 @@ var ( type CompaniesApiService service -/* +/* CompaniesApiService Get company attributes - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return CompanyAttributes */ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (CompanyAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CompanyAttributes ) @@ -76,7 +76,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -89,7 +89,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,36 +110,36 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CompanyAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Get all companies * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CompaniesGetOpts - Optional Parameters: @@ -154,22 +154,22 @@ CompaniesApiService Get all companies @return CompaniesList */ -type CompaniesGetOpts struct { - Filters optional.String +type CompaniesGetOpts struct { + Filters optional.String LinkedContactsIds optional.Int64 - LinkedDealsIds optional.String - Page optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + LinkedDealsIds optional.String + Page optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptionals *CompaniesGetOpts) (CompaniesList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CompaniesList ) @@ -228,7 +228,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -241,7 +241,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -262,52 +262,50 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CompaniesList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Delete a company - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id */ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -315,7 +313,6 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -353,7 +350,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -366,7 +363,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -385,54 +382,53 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* CompaniesApiService Get a company - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id @return Company */ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Company, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Company ) @@ -471,7 +467,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -484,7 +480,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -505,71 +501,71 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Company - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Update a company - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - * @param body Updated company details. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id + - @param body Updated company details. @return Company */ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body6) (Company, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Company ) @@ -610,7 +606,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -623,7 +619,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -644,64 +640,62 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Company - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CompaniesApiService Link and Unlink company with contacts and deals - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - * @param body Linked / Unlinked contacts and deals ids. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id + - @param body Linked / Unlinked contacts and deals ids. */ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body7) (*http.Response, error) { var ( @@ -709,7 +703,6 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -749,7 +742,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -762,7 +755,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -781,43 +774,42 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* CompaniesApiService Create a company - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Company create data. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Company create data. @return InlineResponse2002 */ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (InlineResponse2002, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2002 ) @@ -857,7 +849,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -870,7 +862,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -891,29 +883,29 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2002 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_contacts.go b/lib/api_contacts.go index beb5840..89c3932 100644 --- a/lib/api_contacts.go +++ b/lib/api_contacts.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,20 +27,20 @@ var ( type ContactsApiService service -/* +/* ContactsApiService Add existing contacts to a list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param listId Id of the list + - @param contactEmails Emails addresses OR IDs of the contacts @return PostContactInfo */ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -81,7 +81,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -94,7 +94,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -115,65 +115,63 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create contact attribute - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param attributeCategory Category of the attribute - * @param attributeName Name of the attribute - * @param createAttribute Values to create an attribute - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param attributeCategory Category of the attribute + - @param attributeName Name of the attribute + - @param createAttribute Values to create an attribute */ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error) { var ( @@ -181,7 +179,6 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -222,7 +219,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -235,7 +232,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -254,43 +251,42 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Create a contact - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createContact Values to create a contact + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createContact Values to create a contact @return CreateUpdateContactModel */ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact CreateContact) (CreateUpdateContactModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateContactModel ) @@ -330,7 +326,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -343,7 +339,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -364,52 +360,50 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateContactModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create Contact via DOI (Double-Opt-In) Flow - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createDoiContact Values to create the Double opt-in (DOI) contact - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createDoiContact Values to create the Double opt-in (DOI) contact */ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiContact CreateDoiContact) (*http.Response, error) { var ( @@ -417,7 +411,6 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -456,7 +449,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -469,7 +462,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -488,43 +481,42 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Create a folder - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createFolder Name of the folder + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createFolder Name of the folder @return CreateModel */ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -564,7 +556,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -577,7 +569,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -598,59 +590,59 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Create a list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createList Values to create a list + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createList Values to create a list @return CreateModel */ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -690,7 +682,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -703,7 +695,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -724,53 +716,51 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Delete an attribute - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param attributeCategory Category of the attribute - * @param attributeName Name of the existing attribute - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param attributeCategory Category of the attribute + - @param attributeName Name of the existing attribute */ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error) { var ( @@ -778,7 +768,6 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -817,7 +806,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -830,7 +819,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -849,47 +838,44 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a contact - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param identifier Email (urlencoded) OR ID of the contact - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param identifier Email (urlencoded) OR ID of the contact */ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -897,7 +883,6 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -935,7 +920,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -948,7 +933,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -967,58 +952,55 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a folder (and all its lists) - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param folderId Id of the folder - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param folderId Id of the folder */ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error) { var ( @@ -1026,7 +1008,6 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1064,7 +1045,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1077,7 +1058,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1096,47 +1077,44 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param listId Id of the list - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param listId Id of the list */ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error) { var ( @@ -1144,7 +1122,6 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1182,7 +1159,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1195,7 +1172,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1214,53 +1191,52 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService List all attributes - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetAttributes */ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAttributes ) @@ -1298,7 +1274,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1311,7 +1287,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1332,58 +1308,58 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value * @param optional nil or *GetContactInfoOpts - Optional Parameters: - * @param "StartDate" (optional.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 - * @param "EndDate" (optional.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. + * @param "StartDate" (optional.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 + * @param "EndDate" (optional.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. @return GetExtendedContactDetails */ -type GetContactInfoOpts struct { +type GetContactInfoOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string, localVarOptionals *GetContactInfoOpts) (GetExtendedContactDetails, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedContactDetails ) @@ -1428,7 +1404,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1441,7 +1417,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1462,58 +1438,58 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedContactDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get email campaigns' statistics for a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact @@ -1524,17 +1500,17 @@ ContactsApiService Get email campaigns' statistics for a contact @return GetContactCampaignStats */ -type GetContactStatsOpts struct { +type GetContactStatsOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *GetContactStatsOpts) (GetContactCampaignStats, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContactCampaignStats ) @@ -1579,7 +1555,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1592,7 +1568,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1613,58 +1589,58 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContactCampaignStats - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetContactsOpts - Optional Parameters: @@ -1675,28 +1651,28 @@ ContactsApiService Get all the contacts * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed * @param "SegmentId" (optional.Int64) - Id of the segment. **Either listIds or segmentId can be passed.** * @param "ListIds" (optional.Interface of []int64) - Ids of the list. **Either listIds or segmentId can be passed.** - * @param "Filter" (optional.String) - Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** + * @param "Filter" (optional.String) - Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))** @return GetContacts */ -type GetContactsOpts struct { - Limit optional.Int64 - Offset optional.Int64 +type GetContactsOpts struct { + Limit optional.Int64 + Offset optional.Int64 ModifiedSince optional.String - CreatedSince optional.String - Sort optional.String - SegmentId optional.Int64 - ListIds optional.Interface - Filter optional.String + CreatedSince optional.String + Sort optional.String + SegmentId optional.Int64 + ListIds optional.Interface + Filter optional.String } func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *GetContactsOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1758,7 +1734,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1771,7 +1747,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1792,47 +1768,47 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get contacts in a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list @@ -1845,19 +1821,19 @@ ContactsApiService Get contacts in a list @return GetContacts */ -type GetContactsFromListOpts struct { +type GetContactsFromListOpts struct { ModifiedSince optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1908,7 +1884,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1921,7 +1897,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1942,70 +1918,70 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Returns a folder's details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param folderId id of the folder + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param folderId id of the folder @return GetFolder */ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolder ) @@ -2044,7 +2020,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2057,7 +2033,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2078,58 +2054,58 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolder - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get lists in a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder @@ -2141,18 +2117,18 @@ ContactsApiService Get lists in a folder @return GetFolderLists */ -type GetFolderListsOpts struct { - Limit optional.Int64 +type GetFolderListsOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolderLists ) @@ -2200,7 +2176,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2213,7 +2189,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2234,58 +2210,58 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolderLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all folders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page @@ -2296,16 +2272,16 @@ ContactsApiService Get all folders @return GetFolders */ -type GetFoldersOpts struct { +type GetFoldersOpts struct { Sort optional.String } func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolders ) @@ -2354,7 +2330,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2367,7 +2343,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2388,47 +2364,47 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetFolders - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get a list's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list @@ -2439,17 +2415,17 @@ ContactsApiService Get a list's details @return GetExtendedList */ -type GetListOpts struct { +type GetListOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVarOptionals *GetListOpts) (GetExtendedList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedList ) @@ -2494,7 +2470,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2507,7 +2483,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2528,58 +2504,58 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the lists * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetListsOpts - Optional Parameters: @@ -2590,18 +2566,18 @@ ContactsApiService Get all the lists @return GetLists */ -type GetListsOpts struct { - Limit optional.Int64 +type GetListsOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetLists ) @@ -2648,7 +2624,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2661,7 +2637,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2682,47 +2658,47 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Get all the Segments * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page @@ -2733,16 +2709,16 @@ ContactsApiService Get all the Segments @return GetSegments */ -type GetSegmentsOpts struct { +type GetSegmentsOpts struct { Sort optional.String } func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offset int64, localVarOptionals *GetSegmentsOpts) (GetSegments, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSegments ) @@ -2791,7 +2767,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2804,7 +2780,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2825,60 +2801,60 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSegments - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Import contacts -It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param 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`` +It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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`` @return CreatedProcessId */ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactImport RequestContactImport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -2918,7 +2894,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2931,7 +2907,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2952,60 +2928,60 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Delete a contact from a list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param listId Id of the list - * @param contactEmails Emails addresses OR IDs of the contacts + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param listId Id of the list + - @param contactEmails Emails addresses OR IDs of the contacts @return PostContactInfo */ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -3046,7 +3022,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3059,7 +3035,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3080,71 +3056,71 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param requestContactExport Values to request a contact export + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param requestContactExport Values to request a contact export @return CreatedProcessId */ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestContactExport RequestContactExport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -3184,7 +3160,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3197,7 +3173,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3218,54 +3194,52 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ContactsApiService Update contact attribute - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param attributeCategory Category of the attribute - * @param attributeName Name of the existing attribute - * @param updateAttribute Values to update an attribute - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param attributeCategory Category of the attribute + - @param attributeName Name of the existing attribute + - @param updateAttribute Values to update an attribute */ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error) { var ( @@ -3273,7 +3247,6 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3314,7 +3287,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3327,7 +3300,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3346,47 +3319,44 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update multiple contacts - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param updateBatchContacts Values to update multiple contacts - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param updateBatchContacts Values to update multiple contacts */ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatchContacts UpdateBatchContacts) (*http.Response, error) { var ( @@ -3394,7 +3364,6 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3433,7 +3402,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3446,7 +3415,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3465,37 +3434,34 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a contact - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param identifier Email (urlencoded) OR ID of the contact - * @param updateContact Values to update a contact - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param identifier Email (urlencoded) OR ID of the contact + - @param updateContact Values to update a contact */ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier string, updateContact UpdateContact) (*http.Response, error) { var ( @@ -3503,7 +3469,6 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3543,7 +3508,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3556,7 +3521,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3575,48 +3540,45 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a folder - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param folderId Id of the folder - * @param updateFolder Name of the folder - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param folderId Id of the folder + - @param updateFolder Name of the folder */ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error) { var ( @@ -3624,7 +3586,6 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3664,7 +3625,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3677,7 +3638,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3696,48 +3657,45 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ContactsApiService Update a list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param listId Id of the list - * @param updateList Values to update a list - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param listId Id of the list + - @param updateList Values to update a list */ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error) { var ( @@ -3745,7 +3703,6 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3785,7 +3742,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3798,7 +3755,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3817,35 +3774,34 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_conversations.go b/lib/api_conversations.go index d1396f1..c491fb7 100644 --- a/lib/api_conversations.go +++ b/lib/api_conversations.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" ) // Linger please @@ -26,13 +26,11 @@ var ( type ConversationsApiService service -/* +/* ConversationsApiService Sets agent’s status to online for 2-3 minutes We recommend pinging this endpoint every minute for as long as the agent has to be considered online. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Agent fields. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Agent fields. */ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.Context, body Body17) (*http.Response, error) { var ( @@ -40,7 +38,6 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -79,7 +76,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +89,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,37 +108,34 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Delete a message sent by an agent Only agents’ messages can be deleted. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the message - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the message */ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -149,7 +143,6 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -187,7 +180,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -200,7 +193,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -219,54 +212,53 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Get a message - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the message + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the message @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -305,7 +297,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -318,7 +310,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -339,78 +331,78 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Update a message sent by an agent Only agents’ messages can be edited. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param id ID of the message * @param optional nil or *ConversationsMessagesIdPutOpts - Optional Parameters: - * @param "Body" (optional.Interface of Body14) - + * @param "Body" (optional.Interface of Body14) - @return ConversationsMessage */ -type ConversationsMessagesIdPutOpts struct { +type ConversationsMessagesIdPutOpts struct { Body optional.Interface } func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context, id string, localVarOptionals *ConversationsMessagesIdPutOpts) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -441,10 +433,10 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context } // body params if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - + localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(Body14) if !localVarOptionalBodyok { - return localVarReturnValue, nil, reportError("body should be Body14") + return localVarReturnValue, nil, reportError("body should be Body14") } localVarPostBody = &localVarOptionalBody } @@ -458,7 +450,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -471,7 +463,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -492,70 +484,70 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Send a message as an agent - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Message fields. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Message fields. @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, body Body13) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -595,7 +587,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -608,7 +600,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -629,52 +621,50 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Delete an automated message - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the message - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the message */ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -682,7 +672,6 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -720,7 +709,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -733,7 +722,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -752,54 +741,53 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ConversationsApiService Get an automated message - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the message sent previously + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the message sent previously @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -838,7 +826,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -851,7 +839,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -872,71 +860,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Update an automated message - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the message - * @param body + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the message + - @param body @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.Context, id string, body Body16) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -977,7 +965,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -990,7 +978,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1011,71 +999,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ConversationsApiService Send an automated message to a visitor Example of automated messages: order status, announce new features in your web app, etc. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body @return ConversationsMessage */ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Context, body Body15) (ConversationsMessage, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue ConversationsMessage ) @@ -1115,7 +1103,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1128,7 +1116,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1149,40 +1137,40 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v ConversationsMessage - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_coupons.go b/lib/api_coupons.go index 473c7d2..9b11f6e 100644 --- a/lib/api_coupons.go +++ b/lib/api_coupons.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type CouponsApiService service -/* +/* CouponsApiService Create а coupon collection - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createCouponCollection Values to create a coupon collection + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createCouponCollection Values to create a coupon collection @return InlineResponse2013 */ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCouponCollection CreateCouponCollection) (InlineResponse2013, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2013 ) @@ -79,7 +79,7 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,63 +113,61 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse2013 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CouponsApiService Create coupons for a coupon collection - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createCoupons Values to create coupons - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createCoupons Values to create coupons */ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons CreateCoupons) (*http.Response, error) { var ( @@ -177,7 +175,6 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -216,7 +213,7 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -229,7 +226,7 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -248,65 +245,64 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* CouponsApiService Get a coupon collection by id - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the collection to return + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the collection to return @return GetCouponCollection */ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) (GetCouponCollection, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCouponCollection ) @@ -345,7 +341,7 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -358,7 +354,7 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -379,69 +375,69 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCouponCollection - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CouponsApiService Get all your coupon collections * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetCouponCollectionsOpts - Optional Parameters: @@ -453,19 +449,19 @@ CouponsApiService Get all your coupon collections @return GetCouponCollection */ -type GetCouponCollectionsOpts struct { - Limit optional.Int64 +type GetCouponCollectionsOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String SortBy optional.String } func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOptionals *GetCouponCollectionsOpts) (GetCouponCollection, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCouponCollection ) @@ -515,7 +511,7 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -528,7 +524,7 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -549,69 +545,69 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCouponCollection - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* CouponsApiService Update a coupon collection by id * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param id Id of the collection to update @@ -621,16 +617,16 @@ CouponsApiService Update a coupon collection by id @return InlineResponse2008 */ -type UpdateCouponCollectionOpts struct { +type UpdateCouponCollectionOpts struct { UpdateCouponCollection optional.Interface } func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id string, localVarOptionals *UpdateCouponCollectionOpts) (InlineResponse2008, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2008 ) @@ -661,10 +657,10 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin } // body params if localVarOptionals != nil && localVarOptionals.UpdateCouponCollection.IsSet() { - + localVarOptionalUpdateCouponCollection, localVarOptionalUpdateCouponCollectionok := localVarOptionals.UpdateCouponCollection.Value().(UpdateCouponCollection) if !localVarOptionalUpdateCouponCollectionok { - return localVarReturnValue, nil, reportError("updateCouponCollection should be UpdateCouponCollection") + return localVarReturnValue, nil, reportError("updateCouponCollection should be UpdateCouponCollection") } localVarPostBody = &localVarOptionalUpdateCouponCollection } @@ -678,7 +674,7 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -691,7 +687,7 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -712,51 +708,51 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2008 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_deals.go b/lib/api_deals.go index 332caa9..b5be9bb 100644 --- a/lib/api_deals.go +++ b/lib/api_deals.go @@ -1,24 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" - "strings" - "fmt" - "github.com/antihax/optional" "os" + "strings" ) // Linger please @@ -28,18 +28,18 @@ var ( type DealsApiService service -/* +/* DealsApiService Get deal attributes - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return DealAttributes */ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue DealAttributes ) @@ -77,7 +77,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +90,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,36 +111,36 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v DealAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get all deals * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmDealsGetOpts - Optional Parameters: @@ -155,22 +155,22 @@ DealsApiService Get all deals @return DealsList */ -type CrmDealsGetOpts struct { +type CrmDealsGetOpts struct { FiltersAttributesDealName optional.String FiltersLinkedCompaniesIds optional.String - FiltersLinkedContactsIds optional.String - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + FiltersLinkedContactsIds optional.String + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *CrmDealsGetOpts) (DealsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue DealsList ) @@ -229,7 +229,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -242,7 +242,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -263,52 +263,50 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v DealsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Delete a deal - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id */ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -316,7 +314,6 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -354,7 +351,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -367,7 +364,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -386,54 +383,53 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DealsApiService Get a deal - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id @return Deal */ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Deal ) @@ -472,7 +468,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -485,7 +481,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -506,64 +502,62 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Deal - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Update a deal - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - * @param body Updated deal details. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id + - @param body Updated deal details. */ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body9) (*http.Response, error) { var ( @@ -571,7 +565,6 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -611,7 +604,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -624,7 +617,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -643,56 +636,55 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DealsApiService Import deals(creation and updation) Import deals from a CSV file with mapping options. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name - * @param mapping The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank } + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name + - @param mapping The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank } @return InlineResponse2003 */ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, mapping string) (InlineResponse2003, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2003 ) @@ -738,7 +730,7 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -751,7 +743,7 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -772,53 +764,51 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2003 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v InlineResponse400 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Link and Unlink a deal with contacts and companies - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - * @param body Linked / Unlinked contacts and companies ids. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id + - @param body Linked / Unlinked contacts and companies ids. */ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id string, body Body10) (*http.Response, error) { var ( @@ -826,7 +816,6 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -866,7 +855,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -879,7 +868,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -898,43 +887,42 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DealsApiService Create a deal - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Deal create data. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Deal create data. @return InlineResponse2011 */ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineResponse2011, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2011 ) @@ -974,7 +962,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -987,7 +975,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1008,47 +996,47 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse2011 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get all pipelines - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return Pipelines */ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelines, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Pipelines ) @@ -1086,7 +1074,7 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1099,7 +1087,7 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1120,59 +1108,59 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Pipelines - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get pipeline stages This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return Pipeline */ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Pipeline ) @@ -1210,7 +1198,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1223,7 +1211,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1244,48 +1232,48 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Pipeline - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DealsApiService Get a pipeline - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param pipelineID + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param pipelineID @return Pipelines */ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, pipelineID string) (Pipelines, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Pipelines ) @@ -1324,7 +1312,7 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1337,7 +1325,7 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1358,40 +1346,40 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Pipelines - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_domains.go b/lib/api_domains.go index dbe3f0a..00e49d1 100644 --- a/lib/api_domains.go +++ b/lib/api_domains.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" ) // Linger please @@ -26,19 +26,19 @@ var ( type DomainsApiService service -/* +/* DomainsApiService Authenticate a domain - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param domainName Domain name + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param domainName Domain name @return AuthenticateDomainModel */ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName string) (AuthenticateDomainModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue AuthenticateDomainModel ) @@ -77,7 +77,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +90,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,58 +111,58 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v AuthenticateDomainModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Create a new domain * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateDomainOpts - Optional Parameters: @@ -171,16 +171,16 @@ DomainsApiService Create a new domain @return CreateDomainModel */ -type CreateDomainOpts struct { +type CreateDomainOpts struct { DomainName optional.Interface } func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals *CreateDomainOpts) (CreateDomainModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateDomainModel ) @@ -210,10 +210,10 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals } // body params if localVarOptionals != nil && localVarOptionals.DomainName.IsSet() { - + localVarOptionalDomainName, localVarOptionalDomainNameok := localVarOptionals.DomainName.Value().(CreateDomain) if !localVarOptionalDomainNameok { - return localVarReturnValue, nil, reportError("domainName should be CreateDomain") + return localVarReturnValue, nil, reportError("domainName should be CreateDomain") } localVarPostBody = &localVarOptionalDomainName } @@ -227,7 +227,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -240,7 +240,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -261,52 +261,50 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CreateDomainModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Delete a domain - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param domainName Domain name - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param domainName Domain name */ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) (*http.Response, error) { var ( @@ -314,7 +312,6 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -352,7 +349,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -365,7 +362,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -384,54 +381,53 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* DomainsApiService Validate domain configuration - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param domainName Domain name + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param domainName Domain name @return GetDomainConfigurationModel */ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainName string) (GetDomainConfigurationModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetDomainConfigurationModel ) @@ -470,7 +466,7 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -483,7 +479,7 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -504,69 +500,69 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetDomainConfigurationModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* DomainsApiService Get the list of all your domains - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetDomainsList */ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetDomainsList ) @@ -604,7 +600,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -617,7 +613,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -638,40 +634,40 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetDomainsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_ecommerce.go b/lib/api_ecommerce.go index f0a410f..1f2820e 100644 --- a/lib/api_ecommerce.go +++ b/lib/api_ecommerce.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,13 +27,11 @@ var ( type EcommerceApiService service -/* +/* EcommerceApiService Create orders in batch Create multiple orders at one time instead of one order at a time - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderBatch - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param orderBatch */ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch OrderBatch) (*http.Response, error) { var ( @@ -41,7 +39,6 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -80,7 +77,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +90,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -112,37 +109,34 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EcommerceApiService Managing the status of the order Manages the transactional status of the order - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param order - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param order */ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*http.Response, error) { var ( @@ -150,7 +144,6 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -189,7 +182,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -202,7 +195,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -221,43 +214,42 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EcommerceApiService Create categories in batch - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createUpdateBatchCategory Values to create a batch of categories + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createUpdateBatchCategory Values to create a batch of categories @return CreateUpdateBatchCategoryModel */ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, createUpdateBatchCategory CreateUpdateBatchCategory) (CreateUpdateBatchCategoryModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateBatchCategoryModel ) @@ -297,7 +289,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -310,7 +302,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -331,59 +323,59 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateBatchCategoryModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create products in batch - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createUpdateBatchProducts Values to create a batch of products + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createUpdateBatchProducts Values to create a batch of products @return CreateUpdateBatchProductsModel */ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, createUpdateBatchProducts CreateUpdateBatchProducts) (CreateUpdateBatchProductsModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateBatchProductsModel ) @@ -423,7 +415,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -436,7 +428,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -457,59 +449,59 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateBatchProductsModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create/Update a category - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createUpdateCategory Values to create/update a category + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createUpdateCategory Values to create/update a category @return CreateCategoryModel */ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUpdateCategory CreateUpdateCategory) (CreateCategoryModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateCategoryModel ) @@ -549,7 +541,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -562,7 +554,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -583,59 +575,59 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateCategoryModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Create/Update a product - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createUpdateProduct Values to create/update a product + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createUpdateProduct Values to create/update a product @return CreateProductModel */ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpdateProduct CreateUpdateProduct) (CreateProductModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateProductModel ) @@ -675,7 +667,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -688,7 +680,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -709,52 +701,50 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateProductModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Activate the eCommerce app Getting access to Brevo eCommerce. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.Response, error) { var ( @@ -762,7 +752,6 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -799,7 +788,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -812,7 +801,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -831,55 +820,54 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http. return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EcommerceApiService Get detailed attribution metrics for a single Brevo campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param conversionSource The Brevo campaign type for which data will be retrieved + - @param conversionSourceId The Brevo campaign id for which data will be retrieved @return InlineResponse2006 */ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2006, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2006 ) @@ -919,7 +907,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -932,7 +920,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -953,47 +941,47 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2006 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get attribution metrics for one or more Brevo campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *EcommerceAttributionMetricsGetOpts - Optional Parameters: @@ -1004,18 +992,18 @@ EcommerceApiService Get attribution metrics for one or more Brevo campaigns @return InlineResponse2005 */ -type EcommerceAttributionMetricsGetOpts struct { - PeriodFrom optional.Time - PeriodTo optional.Time +type EcommerceAttributionMetricsGetOpts struct { + PeriodFrom optional.Time + PeriodTo optional.Time EmailCampaignId optional.Interface } func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context, localVarOptionals *EcommerceAttributionMetricsGetOpts) (InlineResponse2005, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2005 ) @@ -1062,7 +1050,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1075,7 +1063,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1096,60 +1084,60 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2005 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get attributed product sales for a single Brevo campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param conversionSource The Brevo campaign type for which data will be retrieved - * @param conversionSourceId The Brevo campaign id for which data will be retrieved + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param conversionSource The Brevo campaign type for which data will be retrieved + - @param conversionSourceId The Brevo campaign id for which data will be retrieved @return InlineResponse2007 */ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2007, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2007 ) @@ -1189,7 +1177,7 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1202,7 +1190,7 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1223,58 +1211,58 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2007 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get the ISO 4217 compliant display currency code for your Brevo account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return InlineResponse2004 */ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Context) (InlineResponse2004, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2004 ) @@ -1312,7 +1300,7 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1325,7 +1313,7 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1346,69 +1334,69 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse2004 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Return all your categories * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetCategoriesOpts - Optional Parameters: @@ -1417,28 +1405,28 @@ EcommerceApiService Return all your categories * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed * @param "Ids" (optional.Interface of []string) - Filter by category ids * @param "Name" (optional.String) - Filter by category name - * @param "ModifiedSince" (optional.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.** - * @param "CreatedSince" (optional.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.** + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** @return GetCategories */ -type GetCategoriesOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String - Ids optional.Interface - Name optional.String +type GetCategoriesOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Ids optional.Interface + Name optional.String ModifiedSince optional.String - CreatedSince optional.String + CreatedSince optional.String } func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptionals *GetCategoriesOpts) (GetCategories, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCategories ) @@ -1497,7 +1485,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1510,7 +1498,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1531,59 +1519,59 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCategories - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get a category details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Category ID + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Category ID @return GetCategoryDetails */ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (GetCategoryDetails, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCategoryDetails ) @@ -1622,7 +1610,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1635,7 +1623,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1656,58 +1644,58 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCategoryDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get order details Get all the orders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1715,26 +1703,26 @@ Get all the orders * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed - * @param "ModifiedSince" (optional.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.** - * @param "CreatedSince" (optional.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.** + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** @return GetOrders */ -type GetOrdersOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetOrdersOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String ModifiedSince optional.String - CreatedSince optional.String + CreatedSince optional.String } func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *GetOrdersOpts) (GetOrders, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetOrders ) @@ -1787,7 +1775,7 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1800,7 +1788,7 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1821,59 +1809,59 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetOrders - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Get a product's details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Product ID + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Product ID @return GetProductDetails */ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (GetProductDetails, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProductDetails ) @@ -1912,7 +1900,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1925,7 +1913,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1946,58 +1934,58 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProductDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Return all your products * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetProductsOpts - Optional Parameters: @@ -2013,35 +2001,35 @@ EcommerceApiService Return all your products * @param "PriceEq" (optional.Float32) - Price filter for products equals to particular amount * @param "PriceNe" (optional.Float32) - Price filter for products not equals to particular amount * @param "Categories" (optional.Interface of []string) - Filter by category ids - * @param "ModifiedSince" (optional.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.** - * @param "CreatedSince" (optional.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.** + * @param "ModifiedSince" (optional.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.** + * @param "CreatedSince" (optional.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.** @return GetProducts */ -type GetProductsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String - Ids optional.Interface - Name optional.String - PriceLte optional.Float32 - PriceGte optional.Float32 - PriceLt optional.Float32 - PriceGt optional.Float32 - PriceEq optional.Float32 - PriceNe optional.Float32 - Categories optional.Interface +type GetProductsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Ids optional.Interface + Name optional.String + PriceLte optional.Float32 + PriceGte optional.Float32 + PriceLt optional.Float32 + PriceGt optional.Float32 + PriceEq optional.Float32 + PriceNe optional.Float32 + Categories optional.Interface ModifiedSince optional.String - CreatedSince optional.String + CreatedSince optional.String } func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals *GetProductsOpts) (GetProducts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProducts ) @@ -2121,7 +2109,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2134,7 +2122,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2155,59 +2143,59 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProducts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EcommerceApiService Set the ISO 4217 compliant display currency code for your Brevo account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload @return SetConfigDisplayCurrency */ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setConfigDisplayCurrency SetConfigDisplayCurrency) (SetConfigDisplayCurrency, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SetConfigDisplayCurrency ) @@ -2247,7 +2235,7 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2260,7 +2248,7 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2281,73 +2269,73 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v SetConfigDisplayCurrency - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 422 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_email_campaigns.go b/lib/api_email_campaigns.go index 15815b8..8f1aa59 100644 --- a/lib/api_email_campaigns.go +++ b/lib/api_email_campaigns.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type EmailCampaignsApiService service -/* +/* EmailCampaignsApiService Create an email campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param emailCampaigns Values to create a campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param emailCampaigns Values to create a campaign @return CreateModel */ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emailCampaigns CreateEmailCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -79,7 +79,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,52 +113,50 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Delete an email campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the campaign */ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -166,7 +164,6 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -204,7 +201,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -217,7 +214,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -236,42 +233,41 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Export the recipients of an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign @@ -281,16 +277,16 @@ EmailCampaignsApiService Export the recipients of an email campaign @return CreatedProcessId */ -type EmailExportRecipientsOpts struct { +type EmailExportRecipientsOpts struct { RecipientExport optional.Interface } func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -321,10 +317,10 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca } // body params if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { - + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(EmailExportRecipients) if !localVarOptionalRecipientExportok { - return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients") + return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients") } localVarPostBody = &localVarOptionalRecipientExport } @@ -338,7 +334,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -351,7 +347,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -372,71 +368,71 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get an A/B test email campaign results Obtain winning version of an A/B test email campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the A/B test campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the A/B test campaign @return AbTestCampaignResult */ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, campaignId int64) (AbTestCampaignResult, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue AbTestCampaignResult ) @@ -475,7 +471,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -488,7 +484,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -509,69 +505,69 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v AbTestCampaignResult - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get an email campaign report * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign @@ -581,16 +577,16 @@ EmailCampaignsApiService Get an email campaign report @return GetEmailCampaign */ -type GetEmailCampaignOpts struct { +type GetEmailCampaignOpts struct { Statistics optional.String } func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaignId int64, localVarOptionals *GetEmailCampaignOpts) (GetEmailCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaign ) @@ -632,7 +628,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -645,7 +641,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -666,58 +662,58 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Return all your created email campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetEmailCampaignsOpts - Optional Parameters: @@ -734,24 +730,24 @@ EmailCampaignsApiService Return all your created email campaigns @return GetEmailCampaigns */ -type GetEmailCampaignsOpts struct { - Type_ optional.String - Status optional.String - Statistics optional.String - StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetEmailCampaignsOpts struct { + Type_ optional.String + Status optional.String + Statistics optional.String + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String ExcludeHtmlContent optional.Bool } func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *GetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaigns ) @@ -816,7 +812,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -829,7 +825,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -850,60 +846,60 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Get a shared template url Get a unique URL to share & import an email template from one Brevo account to another. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign or template + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign or template @return GetSharedTemplateUrl */ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, campaignId int64) (GetSharedTemplateUrl, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSharedTemplateUrl ) @@ -942,7 +938,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -955,7 +951,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -976,63 +972,61 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSharedTemplateUrl - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send an email campaign immediately, based on campaignId - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign */ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -1040,7 +1034,6 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1078,7 +1071,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1091,7 +1084,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1110,60 +1103,57 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send the report of a campaign A PDF will be sent to the specified email addresses - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign - * @param sendReport Values for send a report - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign + - @param sendReport Values for send a report */ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( @@ -1171,7 +1161,6 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1211,7 +1200,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1224,7 +1213,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1243,48 +1232,45 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Send an email campaign to your test list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign - * @param emailTo - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign + - @param emailTo */ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId int64, emailTo SendTestEmail) (*http.Response, error) { var ( @@ -1292,7 +1278,6 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1332,7 +1317,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1345,7 +1330,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1364,48 +1349,45 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Update an email campaign status - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign - * @param status Status of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign + - @param status Status of the campaign */ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( @@ -1413,7 +1395,6 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1453,7 +1434,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1466,7 +1447,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1485,48 +1466,45 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Update an email campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign - * @param emailCampaign Values to update a campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign + - @param emailCampaign Values to update a campaign */ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, campaignId int64, emailCampaign UpdateEmailCampaign) (*http.Response, error) { var ( @@ -1534,7 +1512,6 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1574,7 +1551,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1587,7 +1564,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1606,54 +1583,53 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* EmailCampaignsApiService Upload an image to your account's image gallery - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uploadImage Parameters to upload an image + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uploadImage Parameters to upload an image @return UploadImageModel */ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, uploadImage UploadImageToGallery) (UploadImageModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue UploadImageModel ) @@ -1693,7 +1669,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1706,7 +1682,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1727,40 +1703,40 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v UploadImageModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_events.go b/lib/api_events.go index b36ba6f..5a6ac91 100644 --- a/lib/api_events.go +++ b/lib/api_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" @@ -25,13 +25,11 @@ var ( type EventsApiService service -/* +/* EventsApiService Create an event Create an event to track a contact's interaction. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param event - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param event */ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.Response, error) { var ( @@ -39,7 +37,6 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http. localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -78,7 +75,7 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http. key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +88,7 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http. key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,35 +107,34 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http. return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_external_feeds.go b/lib/api_external_feeds.go index d37aade..3529b1f 100644 --- a/lib/api_external_feeds.go +++ b/lib/api_external_feeds.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,20 +27,20 @@ var ( type ExternalFeedsApiService service -/* +/* ExternalFeedsApiService Create an external feed This endpoint will create an external feed. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createExternalFeed Values to create a feed + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createExternalFeed Values to create a feed @return InlineResponse2015 */ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, createExternalFeed CreateExternalFeed) (InlineResponse2015, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2015 ) @@ -80,7 +80,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +93,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -114,53 +114,51 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse2015 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Delete an external feed This endpoint will delete an external feed. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid UUID of the feed to delete - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uuid UUID of the feed to delete */ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid string) (*http.Response, error) { var ( @@ -168,7 +166,6 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -206,7 +203,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -219,7 +216,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -238,42 +235,41 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Fetch all external feeds This endpoint can fetch all created external feeds. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -289,22 +285,22 @@ This endpoint can fetch all created external feeds. @return GetAllExternalFeeds */ -type GetAllExternalFeedsOpts struct { - Search optional.String +type GetAllExternalFeedsOpts struct { + Search optional.String StartDate optional.String - EndDate optional.String - Sort optional.String - AuthType optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Sort optional.String + AuthType optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, localVarOptionals *GetAllExternalFeedsOpts) (GetAllExternalFeeds, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAllExternalFeeds ) @@ -363,7 +359,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -376,7 +372,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -397,71 +393,71 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAllExternalFeeds - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Get an external feed by UUID This endpoint will update an external feed. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid UUID of the feed to fetch + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uuid UUID of the feed to fetch @return GetExternalFeedByUuid */ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uuid string) (GetExternalFeedByUuid, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExternalFeedByUuid ) @@ -500,7 +496,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -513,7 +509,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -534,65 +530,63 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetExternalFeedByUuid - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ExternalFeedsApiService Update an external feed This endpoint will update an external feed. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid UUID of the feed to update - * @param updateExternalFeed Values to update a feed - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uuid UUID of the feed to update + - @param updateExternalFeed Values to update a feed */ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid string, updateExternalFeed UpdateExternalFeed) (*http.Response, error) { var ( @@ -600,7 +594,6 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -640,7 +633,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -653,7 +646,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -672,35 +665,34 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_files.go b/lib/api_files.go index 6c084ac..0e5c108 100644 --- a/lib/api_files.go +++ b/lib/api_files.go @@ -1,24 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" - "strings" - "fmt" - "github.com/antihax/optional" "os" + "strings" ) // Linger please @@ -28,7 +28,7 @@ var ( type FilesApiService service -/* +/* FilesApiService Get all files * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmFilesGetOpts - Optional Parameters: @@ -43,22 +43,22 @@ FilesApiService Get all files @return FileList */ -type CrmFilesGetOpts struct { - Entity optional.String +type CrmFilesGetOpts struct { + Entity optional.String EntityIds optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String } func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *CrmFilesGetOpts) (FileList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileList ) @@ -117,7 +117,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -130,7 +130,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -151,59 +151,59 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Get file details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id File id to get file data. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id File id to get file data. @return FileData */ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (FileData, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileData ) @@ -242,7 +242,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -255,7 +255,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -276,63 +276,61 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileData - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Delete a file - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id File id to delete. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id File id to delete. */ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -340,7 +338,6 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -378,7 +375,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -391,7 +388,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -410,54 +407,53 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* FilesApiService Download a file - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id File id to download. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id File id to download. @return FileDownloadableLink */ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDownloadableLink, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileDownloadableLink ) @@ -496,7 +492,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -509,7 +505,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -530,58 +526,58 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v FileDownloadableLink - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* FilesApiService Upload a file * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param file File data to create a file. @@ -593,18 +589,18 @@ FilesApiService Upload a file @return FileData */ -type CrmFilesPostOpts struct { - DealId optional.String +type CrmFilesPostOpts struct { + DealId optional.String ContactId optional.Int64 CompanyId optional.String } func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, localVarOptionals *CrmFilesPostOpts) (FileData, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue FileData ) @@ -658,7 +654,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -671,7 +667,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -692,40 +688,40 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v FileData - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_inbound_parsing.go b/lib/api_inbound_parsing.go index f276bda..9560e6f 100644 --- a/lib/api_inbound_parsing.go +++ b/lib/api_inbound_parsing.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,20 +27,20 @@ var ( type InboundParsingApiService service -/* +/* InboundParsingApiService Retrieve inbound attachment with download token. This endpoint will retrieve inbound attachment with download token. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param downloadToken Token to fetch a particular attachment + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param downloadToken Token to fetch a particular attachment @return *os.File */ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context, downloadToken string) (*os.File, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue *os.File ) @@ -79,7 +79,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,58 +113,58 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v *os.File - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* InboundParsingApiService Get the list of all the events for the received emails. This endpoint will show the list of all the events for the received emails. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -179,21 +179,21 @@ This endpoint will show the list of all the events for the received emails. @return GetInboundEmailEvents */ -type GetInboundEmailEventsOpts struct { - Sender optional.String +type GetInboundEmailEventsOpts struct { + Sender optional.String StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, localVarOptionals *GetInboundEmailEventsOpts) (GetInboundEmailEvents, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetInboundEmailEvents ) @@ -249,7 +249,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -262,7 +262,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -283,60 +283,60 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetInboundEmailEvents - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* InboundParsingApiService Fetch all events history for one particular received email. This endpoint will show the list of all events history for one particular received email. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid UUID to fetch events specific to recieved email + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uuid UUID to fetch events specific to recieved email @return GetInboundEmailEventsByUuid */ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Context, uuid string) (GetInboundEmailEventsByUuid, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetInboundEmailEventsByUuid ) @@ -375,7 +375,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -388,7 +388,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -409,40 +409,40 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetInboundEmailEventsByUuid - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_master_account.go b/lib/api_master_account.go index 549e167..ec6d874 100644 --- a/lib/api_master_account.go +++ b/lib/api_master_account.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,13 +27,11 @@ var ( type MasterAccountApiService service -/* +/* MasterAccountApiService Delete a group This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the group - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the group */ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -41,7 +39,6 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -79,7 +76,7 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +89,7 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,44 +108,43 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService GET a group details This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the group of sub-organization + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the group of sub-organization @return CorporateGroupDetailsResponse */ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id string) (CorporateGroupDetailsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CorporateGroupDetailsResponse ) @@ -187,7 +183,7 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -200,7 +196,7 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -221,43 +217,41 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v CorporateGroupDetailsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Update a group of sub-accounts This endpoint allows you to update a group of sub-accounts - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the group - * @param body Group details to be updated. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the group + - @param body Group details to be updated. */ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id string, body Body3) (*http.Response, error) { var ( @@ -265,7 +259,6 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -305,7 +298,7 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -318,7 +311,7 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -337,44 +330,43 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Create a new group of sub-accounts This endpoint allows to create a group of sub-accounts - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Group details to be created. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Group details to be created. @return InlineResponse201 */ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body Body) (InlineResponse201, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse201 ) @@ -414,7 +406,7 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -427,7 +419,7 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -448,54 +440,52 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse201 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Delete sub-account from group This endpoint allows you to remove a sub-organization from a group. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param groupId Id of the group - * @param body List of sub-account ids - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param groupId Id of the group + - @param body List of sub-account ids */ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx context.Context, groupId string, body Body4) (*http.Response, error) { var ( @@ -503,7 +493,6 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -543,7 +532,7 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -556,7 +545,7 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -575,43 +564,42 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get the details of requested master account This endpoint will provide the details of the master account. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return MasterDetailsResponse */ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue MasterDetailsResponse ) @@ -649,7 +637,7 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -662,7 +650,7 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -683,60 +671,60 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v MasterDetailsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Generate SSO token to access admin account This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param ssoTokenRequestCorporate User email of admin account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ssoTokenRequestCorporate User email of admin account @return GetSsoToken */ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, ssoTokenRequestCorporate SsoTokenRequestCorporate) (GetSsoToken, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSsoToken ) @@ -776,7 +764,7 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -789,7 +777,7 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -810,72 +798,72 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSsoToken - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get the list of all the sub-accounts of the master account. This endpoint will provide the list all the sub-accounts of the master account. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param offset Index of the first sub-account in the page - * @param limit Number of sub-accounts to be displayed on each page + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param offset Index of the first sub-account in the page + - @param limit Number of sub-accounts to be displayed on each page @return SubAccountsResponse */ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SubAccountsResponse ) @@ -915,7 +903,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -928,7 +916,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -949,54 +937,52 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v SubAccountsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Enable/disable sub-account application(s) API endpoint for the Corporate owner to enable/disable applications on the sub-account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the sub-account organization (mandatory) - * @param toggleApplications List of applications to activate or deactivate on a sub-account - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the sub-account organization (mandatory) + - @param toggleApplications List of applications to activate or deactivate on a sub-account */ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx context.Context, id int64, toggleApplications SubAccountAppsToggleRequest) (*http.Response, error) { var ( @@ -1004,7 +990,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1044,7 +1029,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1057,7 +1042,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1076,47 +1061,44 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Delete a sub-account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the sub-account organization to be deleted - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the sub-account organization to be deleted */ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error) { var ( @@ -1124,7 +1106,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1162,7 +1143,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1175,7 +1156,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1194,33 +1175,32 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get sub-account details This endpoint will provide the details for the specified sub-account company - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the sub-account organization + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the sub-account organization @return SubAccountDetailsResponse */ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SubAccountDetailsResponse ) @@ -1259,7 +1239,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1272,7 +1252,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1293,43 +1273,41 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v SubAccountDetailsResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Update sub-account plan This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the sub-account organization - * @param updatePlanDetails Values to update a sub-account plan - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the sub-account organization + - @param updatePlanDetails Values to update a sub-account plan */ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error) { var ( @@ -1337,7 +1315,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1377,7 +1354,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1390,7 +1367,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1409,55 +1386,54 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Associate an IP to sub-accounts This endpoint allows to associate an IP to sub-accounts - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Ip address association details + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Ip address association details @return interface{} */ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context.Context, body Body1) (interface{}, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue interface{} ) @@ -1497,7 +1473,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1510,7 +1486,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1531,53 +1507,51 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v interface{} - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Dissociate an IP from sub-accounts This endpoint allows to dissociate an IP from sub-accounts - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Ip address dissociation details - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Ip address dissociation details */ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context.Context, body Body2) (*http.Response, error) { var ( @@ -1585,7 +1559,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1624,7 +1597,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1637,7 +1610,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1656,44 +1629,43 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Create an API key for a sub-account This endpoint will generate an API v3 key for a sub account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createApiKeyRequest Values to generate API key for sub-account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createApiKeyRequest Values to generate API key for sub-account @return CreateApiKeyResponse */ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context, createApiKeyRequest CreateApiKeyRequest) (CreateApiKeyResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateApiKeyResponse ) @@ -1733,7 +1705,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1746,7 +1718,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1767,60 +1739,60 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateApiKeyResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Create a new sub-account under a master account. This endpoint will create a new sub-account under a master account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param subAccountCreate values to create new sub-account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param subAccountCreate values to create new sub-account @return CreateSubAccountResponse */ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSubAccountResponse ) @@ -1860,7 +1832,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1873,7 +1845,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1894,60 +1866,60 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateSubAccountResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Generate SSO token to access sub-account 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param ssoTokenRequest Values to generate SSO token for sub-account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ssoTokenRequest Values to generate SSO token for sub-account @return GetSsoToken */ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSsoToken ) @@ -1987,7 +1959,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2000,7 +1972,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2021,72 +1993,72 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSsoToken - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Resend / cancel admin user invitation -This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param action Action to be performed (cancel / resend) - * @param email Email address of the recipient +This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param action Action to be performed (cancel / resend) + - @param email Email address of the recipient @return InlineResponse200 */ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx context.Context, action string, email string) (InlineResponse200, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse200 ) @@ -2126,7 +2098,7 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2139,7 +2111,7 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2160,53 +2132,51 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InlineResponse200 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Revoke an admin user This endpoint allows to revoke/remove an invited member of your Admin account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param email Email of the invited user - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param email Email of the invited user */ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Context, email string) (*http.Response, error) { var ( @@ -2214,7 +2184,6 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2252,7 +2221,7 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2265,7 +2234,7 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2284,31 +2253,30 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get user activity logs * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetAccountActivityOpts - Optional Parameters: @@ -2320,19 +2288,19 @@ MasterAccountApiService Get user activity logs @return GetAccountActivity */ -type GetAccountActivityOpts struct { +type GetAccountActivityOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAccountActivity ) @@ -2382,7 +2350,7 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2395,7 +2363,7 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2416,59 +2384,59 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAccountActivity - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get the list of all admin users This endpoint allows you to list all Admin users of your Admin account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetCorporateInvitedUsersList */ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Context) (GetCorporateInvitedUsersList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCorporateInvitedUsersList ) @@ -2506,7 +2474,7 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2519,7 +2487,7 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2540,59 +2508,59 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCorporateInvitedUsersList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Check admin user permissions - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param email Email of the invited user + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param email Email of the invited user @return GetCorporateUserPermission */ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context, email string) (GetCorporateUserPermission, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetCorporateUserPermission ) @@ -2631,7 +2599,7 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2644,7 +2612,7 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2665,59 +2633,59 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetCorporateUserPermission - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService Get the list of groups This endpoint allows you to list all groups created on your Admin account. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return []InlineResponse2001 */ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]InlineResponse2001, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue []InlineResponse2001 ) @@ -2755,7 +2723,7 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2768,7 +2736,7 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2789,60 +2757,60 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v []InlineResponse2001 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* MasterAccountApiService 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param sendInvitation Payload to send an invitation +`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. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param sendInvitation Payload to send an invitation @return InviteAdminUser */ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvitation InviteAdminUser) (InviteAdminUser, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InviteAdminUser ) @@ -2882,7 +2850,7 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2895,7 +2863,7 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2916,40 +2884,40 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v InviteAdminUser - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_notes.go b/lib/api_notes.go index 2b6661d..88c0544 100644 --- a/lib/api_notes.go +++ b/lib/api_notes.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,7 +27,7 @@ var ( type NotesApiService service -/* +/* NotesApiService Get all notes * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmNotesGetOpts - Optional Parameters: @@ -42,22 +42,22 @@ NotesApiService Get all notes @return NoteList */ -type CrmNotesGetOpts struct { - Entity optional.String +type CrmNotesGetOpts struct { + Entity optional.String EntityIds optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String } func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *CrmNotesGetOpts) (NoteList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue NoteList ) @@ -116,7 +116,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -129,7 +129,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -150,52 +150,50 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v NoteList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* NotesApiService Delete a note - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Note ID to delete - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Note ID to delete */ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -203,7 +201,6 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -241,7 +238,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -254,7 +251,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -273,54 +270,53 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* NotesApiService Get a note - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Note ID to get + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Note ID to get @return Note */ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Note ) @@ -359,7 +355,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -372,7 +368,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -393,64 +389,62 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Note - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* NotesApiService Update a note - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Note ID to update - * @param body Note data to update a note - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Note ID to update + - @param body Note data to update a note */ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body NoteData) (*http.Response, error) { var ( @@ -458,7 +452,6 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -498,7 +491,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -511,7 +504,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -530,65 +523,64 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 415 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* NotesApiService Create a note - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Note data to create a note. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Note data to create a note. @return NoteId */ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (NoteId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue NoteId ) @@ -628,7 +620,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -641,7 +633,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -662,51 +654,51 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v NoteId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 415 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_payments.go b/lib/api_payments.go index 55983d2..78e9532 100644 --- a/lib/api_payments.go +++ b/lib/api_payments.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" ) // Linger please @@ -26,19 +26,19 @@ var ( type PaymentsApiService service -/* +/* PaymentsApiService Create a payment request - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createPaymentRquest Create a payment request + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createPaymentRquest Create a payment request @return CreatePaymentResponse */ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPaymentRquest CreatePaymentRequest) (CreatePaymentResponse, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatePaymentResponse ) @@ -78,7 +78,7 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +91,7 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -112,74 +112,72 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreatePaymentResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* PaymentsApiService Delete a payment request. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id ID of the payment request. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id ID of the payment request. */ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string) (*http.Response, error) { var ( @@ -187,7 +185,6 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -225,7 +222,7 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -238,7 +235,7 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -257,65 +254,64 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* PaymentsApiService Get payment request details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id Id of the payment Request + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id Id of the payment Request @return GetPaymentRequest */ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (GetPaymentRequest, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetPaymentRequest ) @@ -354,7 +350,7 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -367,7 +363,7 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -388,73 +384,73 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) ( if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetPaymentRequest - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 401 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_process.go b/lib/api_process.go index a4e0cf5..f93686b 100644 --- a/lib/api_process.go +++ b/lib/api_process.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type ProcessApiService service -/* +/* ProcessApiService Return the informations for a process - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param processId Id of the process + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param processId Id of the process @return GetProcess */ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (GetProcess, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcess ) @@ -78,7 +78,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +91,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -112,58 +112,58 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProcess - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ProcessApiService Return all the processes for your account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetProcessesOpts - Optional Parameters: @@ -174,18 +174,18 @@ ProcessApiService Return all the processes for your account @return GetProcesses */ -type GetProcessesOpts struct { - Limit optional.Int64 +type GetProcessesOpts struct { + Limit optional.Int64 Offset optional.Int64 - Sort optional.String + Sort optional.String } func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *GetProcessesOpts) (GetProcesses, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcesses ) @@ -232,7 +232,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -245,7 +245,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -266,40 +266,40 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetProcesses - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_reseller.go b/lib/api_reseller.go index 78312d2..570138c 100644 --- a/lib/api_reseller.go +++ b/lib/api_reseller.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,20 +27,20 @@ var ( type ResellerApiService service -/* +/* ResellerApiService Add Email and/or SMS credits to a specific child account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param addCredits Values to post to add credit to a specific child account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param addCredits Values to post to add credit to a specific child account @return RemainingCreditModel */ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier string, addCredits AddCredits) (RemainingCreditModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue RemainingCreditModel ) @@ -81,7 +81,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -94,7 +94,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -115,75 +115,73 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Associate a dedicated IP to the child - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param ip IP to associate - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param ip IP to associate */ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( @@ -191,7 +189,6 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -231,7 +228,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -244,7 +241,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -263,48 +260,45 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Create a domain for a child account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. */ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentifier string, addChildDomain AddChildDomain) (*http.Response, error) { var ( @@ -312,7 +306,6 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -352,7 +345,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -365,7 +358,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -384,53 +377,52 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Creates a reseller child * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateResellerChildOpts - Optional Parameters: @@ -439,16 +431,16 @@ ResellerApiService Creates a reseller child @return CreateReseller */ -type CreateResellerChildOpts struct { +type CreateResellerChildOpts struct { ResellerChild optional.Interface } func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *CreateResellerChildOpts) (CreateReseller, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateReseller ) @@ -478,10 +470,10 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp } // body params if localVarOptionals != nil && localVarOptionals.ResellerChild.IsSet() { - + localVarOptionalResellerChild, localVarOptionalResellerChildok := localVarOptionals.ResellerChild.Value().(CreateChild) if !localVarOptionalResellerChildok { - return localVarReturnValue, nil, reportError("resellerChild should be CreateChild") + return localVarReturnValue, nil, reportError("resellerChild should be CreateChild") } localVarPostBody = &localVarOptionalResellerChild } @@ -495,7 +487,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -508,7 +500,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -529,64 +521,62 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateReseller - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Delete the sender domain of the reseller child based on the childIdentifier and domainName passed - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param domainName Pass the existing domain that needs to be deleted - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param domainName Pass the existing domain that needs to be deleted */ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentifier string, domainName string) (*http.Response, error) { var ( @@ -594,7 +584,6 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -633,7 +622,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -646,7 +635,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -665,58 +654,55 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Delete a single reseller child based on the child identifier supplied - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or child id of reseller's child - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or child id of reseller's child */ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdentifier string) (*http.Response, error) { var ( @@ -724,7 +710,6 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -762,7 +747,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -775,7 +760,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -794,59 +779,56 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Dissociate a dedicated IP to the child - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param ip IP to dissociate - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param ip IP to dissociate */ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( @@ -854,7 +836,6 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -894,7 +875,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -907,7 +888,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -926,54 +907,53 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child @return GetChildAccountCreationStatus */ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, childIdentifier string) (GetChildAccountCreationStatus, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildAccountCreationStatus ) @@ -1012,7 +992,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1025,7 +1005,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1046,81 +1026,81 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildAccountCreationStatus - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get all sender domains for a specific child account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child @return GetChildDomains */ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) (GetChildDomains, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildDomains ) @@ -1159,7 +1139,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1172,7 +1152,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1193,81 +1173,81 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildDomains - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get a child account's details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child @return GetChildInfo */ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier string) (GetChildInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildInfo ) @@ -1306,7 +1286,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1319,7 +1299,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1340,69 +1320,69 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Get the list of all children accounts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetResellerChildsOpts - Optional Parameters: @@ -1412,17 +1392,17 @@ ResellerApiService Get the list of all children accounts @return GetChildrenList */ -type GetResellerChildsOpts struct { - Limit optional.Int64 +type GetResellerChildsOpts struct { + Limit optional.Int64 Offset optional.Int64 } func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *GetResellerChildsOpts) (GetChildrenList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetChildrenList ) @@ -1466,7 +1446,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1479,7 +1459,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1500,60 +1480,60 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetChildrenList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService 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] - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child @return GetSsoToken */ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier string) (GetSsoToken, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSsoToken ) @@ -1592,7 +1572,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1605,7 +1585,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1626,82 +1606,82 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSsoToken - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Remove Email and/or SMS credits from a specific child account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param removeCredits Values to post to remove email or SMS credits from a specific child account + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param removeCredits Values to post to remove email or SMS credits from a specific child account @return RemainingCreditModel */ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier string, removeCredits RemoveCredits) (RemainingCreditModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue RemainingCreditModel ) @@ -1742,7 +1722,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1755,7 +1735,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1776,75 +1756,73 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* ResellerApiService Update info of reseller's child account status based on the childIdentifier supplied - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param updateChildAccountStatus values to update in child account status - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param updateChildAccountStatus values to update in child account status */ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, childIdentifier string, updateChildAccountStatus UpdateChildAccountStatus) (*http.Response, error) { var ( @@ -1852,7 +1830,6 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1892,7 +1869,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1905,7 +1882,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1924,60 +1901,57 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Update the sender domain of reseller's child based on the childIdentifier and domainName passed - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param domainName Pass the existing domain that needs to be updated - * @param updateChildDomain value to update for sender domain - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param domainName Pass the existing domain that needs to be updated + - @param updateChildDomain value to update for sender domain */ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentifier string, domainName string, updateChildDomain UpdateChildDomain) (*http.Response, error) { var ( @@ -1985,7 +1959,6 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2026,7 +1999,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2039,7 +2012,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2058,59 +2031,56 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* ResellerApiService Update info of reseller's child based on the child identifier supplied - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child - * @param resellerChild values to update in child profile - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param childIdentifier Either auth key or id of reseller's child + - @param resellerChild values to update in child profile */ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdentifier string, resellerChild UpdateChild) (*http.Response, error) { var ( @@ -2118,7 +2088,6 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2158,7 +2127,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2171,7 +2140,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2190,46 +2159,45 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_senders.go b/lib/api_senders.go index 7032b5b..e394ae9 100644 --- a/lib/api_senders.go +++ b/lib/api_senders.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,7 +27,7 @@ var ( type SendersApiService service -/* +/* SendersApiService Create a new sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CreateSenderOpts - Optional Parameters: @@ -36,16 +36,16 @@ SendersApiService Create a new sender @return CreateSenderModel */ -type CreateSenderOpts struct { +type CreateSenderOpts struct { Sender optional.Interface } func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *CreateSenderOpts) (CreateSenderModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSenderModel ) @@ -75,10 +75,10 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals } // body params if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { - + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(CreateSender) if !localVarOptionalSenderok { - return localVarReturnValue, nil, reportError("sender should be CreateSender") + return localVarReturnValue, nil, reportError("sender should be CreateSender") } localVarPostBody = &localVarOptionalSender } @@ -92,7 +92,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -105,7 +105,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -126,52 +126,50 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateSenderModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Delete a sender - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param senderId Id of the sender - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param senderId Id of the sender */ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*http.Response, error) { var ( @@ -179,7 +177,6 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -217,7 +214,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -230,7 +227,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -249,53 +246,52 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SendersApiService Get all the dedicated IPs for your account - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetIps */ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIps ) @@ -333,7 +329,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -346,7 +342,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -367,48 +363,48 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetIps - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Get all the dedicated IPs for a sender - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param senderId Id of the sender + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param senderId Id of the sender @return GetIpsFromSender */ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64) (GetIpsFromSender, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIpsFromSender ) @@ -447,7 +443,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -460,7 +456,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -481,58 +477,58 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetIpsFromSender - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Get the list of all your senders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSendersOpts - Optional Parameters: @@ -542,17 +538,17 @@ SendersApiService Get the list of all your senders @return GetSendersList */ -type GetSendersOpts struct { - Ip optional.String +type GetSendersOpts struct { + Ip optional.String Domain optional.String } func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *GetSendersOpts) (GetSendersList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSendersList ) @@ -596,7 +592,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -609,7 +605,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -630,47 +626,47 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSendersList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SendersApiService Update a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender @@ -680,7 +676,7 @@ SendersApiService Update a sender */ -type UpdateSenderOpts struct { +type UpdateSenderOpts struct { Sender optional.Interface } @@ -690,7 +686,6 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -720,10 +715,10 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo } // body params if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { - + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(UpdateSender) if !localVarOptionalSenderok { - return nil, reportError("sender should be UpdateSender") + return nil, reportError("sender should be UpdateSender") } localVarPostBody = &localVarOptionalSender } @@ -737,7 +732,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -750,7 +745,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -769,42 +764,41 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SendersApiService Update a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender @@ -814,7 +808,7 @@ SendersApiService Update a sender */ -type ValidateSenderByOTPOpts struct { +type ValidateSenderByOTPOpts struct { Otp optional.Interface } @@ -824,7 +818,6 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -854,10 +847,10 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in } // body params if localVarOptionals != nil && localVarOptionals.Otp.IsSet() { - + localVarOptionalOtp, localVarOptionalOtpok := localVarOptionals.Otp.Value().(Otp) if !localVarOptionalOtpok { - return nil, reportError("otp should be Otp") + return nil, reportError("otp should be Otp") } localVarPostBody = &localVarOptionalOtp } @@ -871,7 +864,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -884,7 +877,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -903,35 +896,34 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_sms_campaigns.go b/lib/api_sms_campaigns.go index 71e90d2..405f53f 100644 --- a/lib/api_sms_campaigns.go +++ b/lib/api_sms_campaigns.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type SMSCampaignsApiService service -/* +/* SMSCampaignsApiService Creates an SMS campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createSmsCampaign Values to create an SMS Campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createSmsCampaign Values to create an SMS Campaign @return CreateModel */ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSmsCampaign CreateSmsCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -79,7 +79,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,52 +113,50 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Delete an SMS campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the SMS campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the SMS campaign */ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -166,7 +164,6 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -204,7 +201,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -217,7 +214,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -236,54 +233,53 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Get an SMS campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the SMS campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the SMS campaign @return GetSmsCampaign */ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId int64) (GetSmsCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaign ) @@ -322,7 +318,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -335,7 +331,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -356,58 +352,58 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Returns the information for all your created SMS campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmsCampaignsOpts - Optional Parameters: @@ -421,21 +417,21 @@ SMSCampaignsApiService Returns the information for all your created SMS campaign @return GetSmsCampaigns */ -type GetSmsCampaignsOpts struct { - Status optional.String +type GetSmsCampaignsOpts struct { + Status optional.String StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *GetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaigns ) @@ -491,7 +487,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -504,7 +500,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -525,47 +521,47 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -576,16 +572,16 @@ It returns the background process ID which on completion calls the notify URL th @return CreatedProcessId */ -type RequestSmsRecipientExportOpts struct { +type RequestSmsRecipientExportOpts struct { RecipientExport optional.Interface } func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *RequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -616,10 +612,10 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, } // body params if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { - + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(RequestSmsRecipientExport) if !localVarOptionalRecipientExportok { - return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport") + return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport") } localVarPostBody = &localVarOptionalRecipientExport } @@ -633,7 +629,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -646,7 +642,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -667,63 +663,61 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Send your SMS campaign immediately - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the campaign */ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -731,7 +725,6 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -769,7 +762,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -782,7 +775,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -801,60 +794,57 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the campaign - * @param sendReport Values for send a report - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the campaign + - @param sendReport Values for send a report */ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( @@ -862,7 +852,6 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -902,7 +891,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -915,7 +904,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -934,48 +923,45 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Send a test SMS campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the SMS campaign - * @param 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 - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the SMS campaign + - @param 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 */ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int64, phoneNumber SendTestSms) (*http.Response, error) { var ( @@ -983,7 +969,6 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1023,7 +1008,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1036,7 +1021,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1055,48 +1040,45 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendSmsTestFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Update an SMS campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the SMS campaign - * @param updateSmsCampaign Values to update an SMS Campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the SMS campaign + - @param updateSmsCampaign Values to update an SMS Campaign */ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaignId int64, updateSmsCampaign UpdateSmsCampaign) (*http.Response, error) { var ( @@ -1104,7 +1086,6 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1144,7 +1125,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1157,7 +1138,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1176,48 +1157,45 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* SMSCampaignsApiService Update a campaign's status - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the campaign - * @param status Status of the campaign. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the campaign + - @param status Status of the campaign. */ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( @@ -1225,7 +1203,6 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1265,7 +1242,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1278,7 +1255,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1297,35 +1274,34 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_tasks.go b/lib/api_tasks.go index 2cd737f..d3f114f 100644 --- a/lib/api_tasks.go +++ b/lib/api_tasks.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,7 +27,7 @@ var ( type TasksApiService service -/* +/* TasksApiService Get all tasks * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *CrmTasksGetOpts - Optional Parameters: @@ -48,28 +48,28 @@ TasksApiService Get all tasks @return TaskList */ -type CrmTasksGetOpts struct { - FilterType optional.String - FilterStatus optional.String - FilterDate optional.String - FilterAssignTo optional.String - FilterContacts optional.String - FilterDeals optional.String +type CrmTasksGetOpts struct { + FilterType optional.String + FilterStatus optional.String + FilterDate optional.String + FilterAssignTo optional.String + FilterContacts optional.String + FilterDeals optional.String FilterCompanies optional.String - DateFrom optional.Int32 - DateTo optional.Int32 - Offset optional.Int64 - Limit optional.Int64 - Sort optional.String - SortBy optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String } func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *CrmTasksGetOpts) (TaskList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue TaskList ) @@ -146,7 +146,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -159,7 +159,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -180,52 +180,50 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v TaskList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Delete a task - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id */ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*http.Response, error) { var ( @@ -233,7 +231,6 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -271,7 +268,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -284,7 +281,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -303,54 +300,53 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TasksApiService Get a task - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id @return Task */ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Task ) @@ -389,7 +385,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -402,7 +398,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -423,64 +419,62 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, * if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Task - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Update a task - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id - * @param body Updated task details. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param id + - @param body Updated task details. */ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body12) (*http.Response, error) { var ( @@ -488,7 +482,6 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -528,7 +521,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -541,7 +534,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -560,54 +553,53 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TasksApiService Create a task - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Task name. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Task name. @return InlineResponse2012 */ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (InlineResponse2012, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2012 ) @@ -647,7 +639,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -660,7 +652,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -681,47 +673,47 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse2012 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TasksApiService Get all task types - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return TaskTypes */ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue TaskTypes ) @@ -759,7 +751,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -772,7 +764,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -793,29 +785,29 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v TaskTypes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_transactional_emails.go b/lib/api_transactional_emails.go index c371d94..add1fe6 100644 --- a/lib/api_transactional_emails.go +++ b/lib/api_transactional_emails.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,13 +27,11 @@ var ( type TransactionalEmailsApiService service -/* +/* TransactionalEmailsApiService Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param blockDomain - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param blockDomain */ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, blockDomain BlockDomain) (*http.Response, error) { var ( @@ -41,7 +39,6 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -80,7 +77,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +90,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -112,43 +109,42 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Create an email template - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param smtpTemplate values to update in transactional email template + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param smtpTemplate values to update in transactional email template @return CreateModel */ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, smtpTemplate CreateSmtpTemplate) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -188,7 +184,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -201,7 +197,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -222,53 +218,51 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param domain The name of the domain to be deleted - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param domain The name of the domain to be deleted */ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, domain string) (*http.Response, error) { var ( @@ -276,7 +270,6 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -314,7 +307,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -327,7 +320,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -346,31 +339,30 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -380,7 +372,7 @@ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) */ -type DeleteHardbouncesOpts struct { +type DeleteHardbouncesOpts struct { DeleteHardbounces optional.Interface } @@ -390,7 +382,6 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -419,10 +410,10 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l } // body params if localVarOptionals != nil && localVarOptionals.DeleteHardbounces.IsSet() { - + localVarOptionalDeleteHardbounces, localVarOptionalDeleteHardbouncesok := localVarOptionals.DeleteHardbounces.Value().(DeleteHardbounces) if !localVarOptionalDeleteHardbouncesok { - return nil, reportError("deleteHardbounces should be DeleteHardbounces") + return nil, reportError("deleteHardbounces should be DeleteHardbounces") } localVarPostBody = &localVarOptionalDeleteHardbounces } @@ -436,7 +427,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -449,7 +440,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -468,37 +459,34 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageId - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. */ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -506,7 +494,6 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -544,7 +531,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -557,7 +544,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -576,47 +563,44 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete an inactive email template - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param templateId id of the template - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param templateId id of the template */ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, templateId int64) (*http.Response, error) { var ( @@ -624,7 +608,6 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -662,7 +645,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -675,7 +658,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -694,42 +677,41 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService 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 * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -742,19 +724,19 @@ This endpoint will show the aggregated stats for past 90 days by default if  @return GetAggregatedReport */ -type GetAggregatedSmtpReportOpts struct { +type GetAggregatedSmtpReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *GetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAggregatedReport ) @@ -804,7 +786,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -817,7 +799,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -838,59 +820,59 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetAggregatedReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of blocked domains Get the list of blocked domains - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetBlockedDomains */ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (GetBlockedDomains, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetBlockedDomains ) @@ -928,7 +910,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -941,7 +923,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -962,36 +944,36 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetBlockedDomains - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1011,26 +993,26 @@ This endpoint will show the aggregated stats for past 30 days by default if  @return GetEmailEventReport */ -type GetEmailEventReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Email optional.String - Event optional.String - Tags optional.String - MessageId optional.String +type GetEmailEventReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Email optional.String + Event optional.String + Tags optional.String + MessageId optional.String TemplateId optional.Int64 - Sort optional.String + Sort optional.String } func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *GetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailEventReport ) @@ -1101,7 +1083,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1114,7 +1096,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1135,47 +1117,47 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetEmailEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Fetch scheduled emails by batchId Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1191,21 +1173,21 @@ Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) @return GetScheduledEmailByBatchId */ -type GetScheduledEmailByBatchIdOpts struct { +type GetScheduledEmailByBatchIdOpts struct { StartDate optional.String - EndDate optional.String - Sort optional.String - Status optional.String - Limit optional.Int64 - Offset optional.Int64 + EndDate optional.String + Sort optional.String + Status optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.Context, batchId string, localVarOptionals *GetScheduledEmailByBatchIdOpts) (GetScheduledEmailByBatchId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetScheduledEmailByBatchId ) @@ -1262,7 +1244,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1275,7 +1257,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1296,58 +1278,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetScheduledEmailByBatchId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Fetch scheduled email by messageId Fetch scheduled email by messageId (Can retrieve data upto 30 days old) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1359,17 +1341,17 @@ Fetch scheduled email by messageId (Can retrieve data upto 30 days old) @return GetScheduledEmailByMessageId */ -type GetScheduledEmailByMessageIdOpts struct { +type GetScheduledEmailByMessageIdOpts struct { StartDate optional.String - EndDate optional.String + EndDate optional.String } func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context.Context, messageId string, localVarOptionals *GetScheduledEmailByMessageIdOpts) (GetScheduledEmailByMessageId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetScheduledEmailByMessageId ) @@ -1414,7 +1396,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1427,7 +1409,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1448,58 +1430,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetScheduledEmailByMessageId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get your transactional email activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmtpReportOpts - Optional Parameters: @@ -1514,22 +1496,22 @@ TransactionalEmailsApiService Get your transactional email activity aggregated p @return GetReports */ -type GetSmtpReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 +type GetSmtpReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *GetSmtpReportOpts) (GetReports, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetReports ) @@ -1588,7 +1570,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1601,7 +1583,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1622,59 +1604,59 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetReports - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Returns the template information - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param templateId id of the template + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param templateId id of the template @return GetSmtpTemplateOverview */ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, templateId int64) (GetSmtpTemplateOverview, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplateOverview ) @@ -1713,7 +1695,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1726,7 +1708,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1747,58 +1729,58 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplateOverview - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of email templates * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmtpTemplatesOpts - Optional Parameters: @@ -1810,19 +1792,19 @@ TransactionalEmailsApiService Get the list of email templates @return GetSmtpTemplates */ -type GetSmtpTemplatesOpts struct { +type GetSmtpTemplatesOpts struct { TemplateStatus optional.Bool - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *GetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplates ) @@ -1872,7 +1854,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1885,7 +1867,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1906,47 +1888,47 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplates - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the list of blocked or unsubscribed transactional contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacBlockedContactsOpts - Optional Parameters: @@ -1960,21 +1942,21 @@ TransactionalEmailsApiService Get the list of blocked or unsubscribed transactio @return GetTransacBlockedContacts */ -type GetTransacBlockedContactsOpts struct { +type GetTransacBlockedContactsOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Senders optional.Interface - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Senders optional.Interface + Sort optional.String } func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Context, localVarOptionals *GetTransacBlockedContactsOpts) (GetTransacBlockedContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacBlockedContacts ) @@ -2030,7 +2012,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2043,7 +2025,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2064,59 +2046,59 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacBlockedContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Get the personalized content of a sent transactional email - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid Unique id of the transactional email that has been sent to a particular contact + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param uuid Unique id of the transactional email that has been sent to a particular contact @return GetTransacEmailContent */ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Context, uuid string) (GetTransacEmailContent, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailContent ) @@ -2155,7 +2137,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2168,7 +2150,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2189,36 +2171,36 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailContent - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService 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. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -2235,23 +2217,23 @@ This endpoint will show the list of emails for past 30 days by default. To retri @return GetTransacEmailsList */ -type GetTransacEmailsListOpts struct { - Email optional.String +type GetTransacEmailsListOpts struct { + Email optional.String TemplateId optional.Int64 - MessageId optional.String - StartDate optional.String - EndDate optional.String - Sort optional.String - Limit optional.Int64 - Offset optional.Int64 + MessageId optional.String + StartDate optional.String + EndDate optional.String + Sort optional.String + Limit optional.Int64 + Offset optional.Int64 } func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *GetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailsList ) @@ -2313,7 +2295,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2326,7 +2308,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2347,53 +2329,51 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Send a template to your test list - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param templateId Id of the template - * @param sendTestEmail - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param templateId Id of the template + - @param sendTestEmail */ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, templateId int64, sendTestEmail SendTestEmail) (*http.Response, error) { var ( @@ -2401,7 +2381,6 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2441,7 +2420,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2454,7 +2433,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2473,54 +2452,53 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Send a transactional email - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param sendSmtpEmail Values to send a transactional email + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param sendSmtpEmail Values to send a transactional email @return CreateSmtpEmail */ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, sendSmtpEmail SendSmtpEmail) (CreateSmtpEmail, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSmtpEmail ) @@ -2560,7 +2538,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2573,7 +2551,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2594,63 +2572,61 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateSmtpEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 202 { var v ScheduleSmtpEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Unblock or resubscribe a transactional contact - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param email contact email (urlencoded) to unblock. - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param email contact email (urlencoded) to unblock. */ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx context.Context, email string) (*http.Response, error) { var ( @@ -2658,7 +2634,6 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2696,7 +2671,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2709,7 +2684,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2728,47 +2703,44 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Delete an SMTP transactional log - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param identifier MessageId or Email of the transactional log(s) to delete - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param identifier MessageId or Email of the transactional log(s) to delete */ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -2776,7 +2748,6 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2814,7 +2785,7 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2827,7 +2798,7 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2846,48 +2817,45 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* TransactionalEmailsApiService Update an email template - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param templateId id of the template - * @param smtpTemplate values to update in transactional email template - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param templateId id of the template + - @param smtpTemplate values to update in transactional email template */ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, templateId int64, smtpTemplate UpdateSmtpTemplate) (*http.Response, error) { var ( @@ -2895,7 +2863,6 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2935,7 +2902,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2948,7 +2915,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2967,35 +2934,34 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_transactional_sms.go b/lib/api_transactional_sms.go index 621f5c9..6501926 100644 --- a/lib/api_transactional_sms.go +++ b/lib/api_transactional_sms.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "github.com/antihax/optional" ) // Linger please @@ -26,7 +26,7 @@ var ( type TransactionalSMSApiService service -/* +/* TransactionalSMSApiService Get all your SMS activity (unaggregated events) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetSmsEventsOpts - Optional Parameters: @@ -43,24 +43,24 @@ TransactionalSMSApiService Get all your SMS activity (unaggregated events) @return GetSmsEventReport */ -type GetSmsEventsOpts struct { - Limit optional.Int64 - StartDate optional.String - EndDate optional.String - Offset optional.Int64 - Days optional.Int64 +type GetSmsEventsOpts struct { + Limit optional.Int64 + StartDate optional.String + EndDate optional.String + Offset optional.Int64 + Days optional.Int64 PhoneNumber optional.String - Event optional.String - Tags optional.String - Sort optional.String + Event optional.String + Tags optional.String + Sort optional.String } func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *GetSmsEventsOpts) (GetSmsEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsEventReport ) @@ -125,7 +125,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -138,7 +138,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -159,47 +159,47 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetSmsEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Get your SMS activity aggregated over a period of time * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacAggregatedSmsReportOpts - Optional Parameters: @@ -211,19 +211,19 @@ TransactionalSMSApiService Get your SMS activity aggregated over a period of tim @return GetTransacAggregatedSmsReport */ -type GetTransacAggregatedSmsReportOpts struct { +type GetTransacAggregatedSmsReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.Context, localVarOptionals *GetTransacAggregatedSmsReportOpts) (GetTransacAggregatedSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacAggregatedSmsReport ) @@ -273,7 +273,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -286,7 +286,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -307,47 +307,47 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacAggregatedSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Get your SMS activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetTransacSmsReportOpts - Optional Parameters: @@ -360,20 +360,20 @@ TransactionalSMSApiService Get your SMS activity aggregated per day @return GetTransacSmsReport */ -type GetTransacSmsReportOpts struct { +type GetTransacSmsReportOpts struct { StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *GetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacSmsReport ) @@ -426,7 +426,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -439,7 +439,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -460,59 +460,59 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetTransacSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalSMSApiService Send SMS message to a mobile number - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param sendTransacSms Values to send a transactional SMS + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param sendTransacSms Values to send a transactional SMS @return SendSms */ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTransacSms SendTransacSms) (SendSms, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SendSms ) @@ -552,7 +552,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -565,7 +565,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -586,51 +586,51 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v SendSms - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_transactional_whats_app.go b/lib/api_transactional_whats_app.go index 8064fee..d606498 100644 --- a/lib/api_transactional_whats_app.go +++ b/lib/api_transactional_whats_app.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "github.com/antihax/optional" ) // Linger please @@ -26,16 +26,16 @@ var ( type TransactionalWhatsAppApiService service -/* +/* TransactionalWhatsAppApiService 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) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsappEventReportOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number limitation for the result returned * @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from - * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate - * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate + * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ * @param "ContactNumber" (optional.String) - Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) * @param "Event" (optional.String) - Filter the report for a specific event type * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed @@ -43,23 +43,23 @@ This endpoint will show the unaggregated statistics for WhatsApp activity (30 da @return GetWhatsappEventReport */ -type GetWhatsappEventReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 +type GetWhatsappEventReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 ContactNumber optional.String - Event optional.String - Sort optional.String + Event optional.String + Sort optional.String } func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Context, localVarOptionals *GetWhatsappEventReportOpts) (GetWhatsappEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappEventReport ) @@ -121,7 +121,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -134,7 +134,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -155,60 +155,60 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* TransactionalWhatsAppApiService Send a WhatsApp message This endpoint is used to send a WhatsApp message. <br/>(**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.**) - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param sendWhatsappMessage Values to send WhatsApp message + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param sendWhatsappMessage Values to send WhatsApp message @return InlineResponse2014 */ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Context, sendWhatsappMessage SendWhatsappMessage) (InlineResponse2014, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue InlineResponse2014 ) @@ -248,7 +248,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -261,7 +261,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -282,40 +282,40 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v InlineResponse2014 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_user.go b/lib/api_user.go index e8a7e91..6712f9e 100644 --- a/lib/api_user.go +++ b/lib/api_user.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" ) // Linger please @@ -26,20 +26,20 @@ var ( type UserApiService service -/* +/* UserApiService 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param updatePermissions Values to update permissions for an invited 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param updatePermissions Values to update permissions for an invited user @return Inviteuser */ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissions Inviteuser) (Inviteuser, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Inviteuser ) @@ -79,7 +79,7 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,58 +113,58 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Inviteuser - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* UserApiService Get the list of all your users - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetInvitedUsersList */ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUsersList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetInvitedUsersList ) @@ -202,7 +202,7 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -215,7 +215,7 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -236,59 +236,59 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetInvitedUsersList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* UserApiService Check user permission - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param email Email of the invited user. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param email Email of the invited user. @return GetUserPermission */ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (GetUserPermission, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetUserPermission ) @@ -327,7 +327,7 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -340,7 +340,7 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -361,60 +361,60 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetUserPermission - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* UserApiService 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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param sendInvitation Values to create an invitation +`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\" - \"create_edit_delete\" - \"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\" - \"manage_others_deals_tasks\" - \"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\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"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. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param sendInvitation Values to create an invitation @return Inviteuser */ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteuser) (Inviteuser, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Inviteuser ) @@ -454,7 +454,7 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -467,7 +467,7 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -488,59 +488,59 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Inviteuser - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* UserApiService Revoke user permission - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param email Email of the invited user. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param email Email of the invited user. @return PutRevokeUserPermission */ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email string) (PutRevokeUserPermission, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PutRevokeUserPermission ) @@ -579,7 +579,7 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -592,7 +592,7 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -613,60 +613,60 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v PutRevokeUserPermission - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* UserApiService Resend / Cancel invitation - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param action action - * @param email Email of the invited user. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param action action + - @param email Email of the invited user. @return Putresendcancelinvitation */ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action string, email string) (Putresendcancelinvitation, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue Putresendcancelinvitation ) @@ -706,7 +706,7 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -719,7 +719,7 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -740,40 +740,40 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v Putresendcancelinvitation - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_webhooks.go b/lib/api_webhooks.go index 7d5d3a9..b459fe3 100644 --- a/lib/api_webhooks.go +++ b/lib/api_webhooks.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type WebhooksApiService service -/* +/* WebhooksApiService Create a webhook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param createWebhook Values to create a webhook + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createWebhook Values to create a webhook @return CreateModel */ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook CreateWebhook) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -79,7 +79,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,52 +113,50 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Delete a webhook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param webhookId Id of the webhook - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param webhookId Id of the webhook */ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) (*http.Response, error) { var ( @@ -166,7 +164,6 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -204,7 +201,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -217,7 +214,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -236,55 +233,54 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* WebhooksApiService 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param exportWebhookHistory Values to submit for webhooks history + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param exportWebhookHistory Values to submit for webhooks history @return CreatedProcessId */ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWebhookHistory ExportWebhooksHistory) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -324,7 +320,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -337,7 +333,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -358,59 +354,59 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Get a webhook details - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param webhookId Id of the webhook + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param webhookId Id of the webhook @return GetWebhook */ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (GetWebhook, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhook ) @@ -449,7 +445,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -462,7 +458,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -483,58 +479,58 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWebhook - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Get all webhooks * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWebhooksOpts - Optional Parameters: @@ -544,17 +540,17 @@ WebhooksApiService Get all webhooks @return GetWebhooks */ -type GetWebhooksOpts struct { +type GetWebhooksOpts struct { Type_ optional.String - Sort optional.String + Sort optional.String } func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *GetWebhooksOpts) (GetWebhooks, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhooks ) @@ -598,7 +594,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -611,7 +607,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -632,53 +628,51 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWebhooks - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WebhooksApiService Update a webhook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param webhookId Id of the webhook - * @param updateWebhook Values to update a webhook - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param webhookId Id of the webhook + - @param updateWebhook Values to update a webhook */ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, updateWebhook UpdateWebhook) (*http.Response, error) { var ( @@ -686,7 +680,6 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -726,7 +719,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -739,7 +732,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -758,35 +751,34 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/api_whats_app_campaigns.go b/lib/api_whats_app_campaigns.go index a9ea966..707092b 100644 --- a/lib/api_whats_app_campaigns.go +++ b/lib/api_whats_app_campaigns.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "context" + "fmt" + "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -27,19 +27,19 @@ var ( type WhatsAppCampaignsApiService service -/* +/* WhatsAppCampaignsApiService Create and Send a WhatsApp campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param whatsAppCampaigns Values to create a campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param whatsAppCampaigns Values to create a campaign @return CreateModel */ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context, whatsAppCampaigns CreateWhatsAppCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -79,7 +79,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +92,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,59 +113,59 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Create a WhatsApp template - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param whatsAppTemplates Values to create a template + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param whatsAppTemplates Values to create a template @return CreateModel */ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context, whatsAppTemplates CreateWhatsAppTemplate) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -205,7 +205,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -218,7 +218,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -239,52 +239,50 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Delete a WhatsApp campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId id of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId id of the campaign */ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -292,7 +290,6 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -330,7 +327,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -343,7 +340,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -362,54 +359,53 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Get a WhatsApp campaign - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param campaignId Id of the campaign + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignId Id of the campaign @return GetWhatsappCampaignOverview */ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, campaignId int64) (GetWhatsappCampaignOverview, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappCampaignOverview ) @@ -448,7 +444,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -461,7 +457,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -482,63 +478,63 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappCampaignOverview - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Return all your created WhatsApp campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsAppCampaignsOpts - Optional Parameters: - * @param "StartDate" (optional.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** - * @param "EndDate" (optional.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** + * @param "StartDate" (optional.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** + * @param "EndDate" (optional.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** * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed @@ -546,20 +542,20 @@ WhatsAppCampaignsApiService Return all your created WhatsApp campaigns @return GetWhatsappCampaigns */ -type GetWhatsAppCampaignsOpts struct { +type GetWhatsAppCampaignsOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, localVarOptionals *GetWhatsAppCampaignsOpts) (GetWhatsappCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsappCampaigns ) @@ -612,7 +608,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -625,7 +621,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -646,58 +642,58 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsappCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Get your WhatsApp API account information - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return GetWhatsAppConfig */ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (GetWhatsAppConfig, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWhatsAppConfig ) @@ -735,7 +731,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -748,7 +744,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -769,52 +765,52 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWhatsAppConfig - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Return all your created WhatsApp templates * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetWhatsAppTemplatesOpts - Optional Parameters: - * @param "StartDate" (optional.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** - * @param "EndDate" (optional.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** + * @param "StartDate" (optional.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** + * @param "EndDate" (optional.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** * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed @@ -823,21 +819,21 @@ WhatsAppCampaignsApiService Return all your created WhatsApp templates @return GetWaTemplates */ -type GetWhatsAppTemplatesOpts struct { +type GetWhatsAppTemplatesOpts struct { StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String - Source optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + Source optional.String } func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, localVarOptionals *GetWhatsAppTemplatesOpts) (GetWaTemplates, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWaTemplates ) @@ -893,7 +889,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -906,7 +902,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -927,52 +923,50 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 200 { var v GetWaTemplates - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Send your WhatsApp template for approval - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param templateId id of the campaign - - + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param templateId id of the campaign */ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.Context, templateId int64) (*http.Response, error) { var ( @@ -980,7 +974,6 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1018,7 +1011,7 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1031,7 +1024,7 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1050,31 +1043,30 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } -/* +/* WhatsAppCampaignsApiService Update a WhatsApp campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign @@ -1084,7 +1076,7 @@ WhatsAppCampaignsApiService Update a WhatsApp campaign */ -type UpdateWhatsAppCampaignOpts struct { +type UpdateWhatsAppCampaignOpts struct { WhatsAppCampaign optional.Interface } @@ -1094,7 +1086,6 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1124,10 +1115,10 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context } // body params if localVarOptionals != nil && localVarOptionals.WhatsAppCampaign.IsSet() { - + localVarOptionalWhatsAppCampaign, localVarOptionalWhatsAppCampaignok := localVarOptionals.WhatsAppCampaign.Value().(UpdateWhatsAppCampaign) if !localVarOptionalWhatsAppCampaignok { - return nil, reportError("whatsAppCampaign should be UpdateWhatsAppCampaign") + return nil, reportError("whatsAppCampaign should be UpdateWhatsAppCampaign") } localVarPostBody = &localVarOptionalWhatsAppCampaign } @@ -1141,7 +1132,7 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1154,7 +1145,7 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1173,35 +1164,34 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } - + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } - + return localVarHttpResponse, newErr } diff --git a/lib/client.go b/lib/client.go index 9b71b04..3ab97ff 100644 --- a/lib/client.go +++ b/lib/client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "bytes" @@ -379,17 +379,17 @@ func (c *APIClient) prepareRequest( } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if strings.Contains(contentType, "application/xml") { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } else if strings.Contains(contentType, "application/json") { - if err = json.Unmarshal(b, v); err != nil { - return err - } - return nil + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err } + return nil + } return errors.New("undefined response type") } @@ -540,4 +540,4 @@ func (e GenericSwaggerError) Body() []byte { // Model returns the unpacked model of the error func (e GenericSwaggerError) Model() interface{} { return e.model -} \ No newline at end of file +} diff --git a/lib/configuration.go b/lib/configuration.go index c248265..9fa1b0d 100644 --- a/lib/configuration.go +++ b/lib/configuration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "net/http" @@ -63,7 +63,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://api.brevo.com/v3", DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.0.0/go", + UserAgent: "brevo_clientAPI/v1.0.0/go", } return cfg } diff --git a/lib/model_ab_test_campaign_result.go b/lib/model_ab_test_campaign_result.go index cc0f878..632ea99 100644 --- a/lib/model_ab_test_campaign_result.go +++ b/lib/model_ab_test_campaign_result.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AbTestCampaignResult struct { // 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. @@ -22,7 +22,7 @@ type AbTestCampaignResult struct { // Click rate for current winning version ClickRate string `json:"clickRate,omitempty"` // Open/Click rate for the winner version - WinningVersionRate string `json:"winningVersionRate,omitempty"` - Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` - ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` + WinningVersionRate string `json:"winningVersionRate,omitempty"` + Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` + ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` } diff --git a/lib/model_ab_test_campaign_result_clicked_links.go b/lib/model_ab_test_campaign_result_clicked_links.go index 6482f57..893e654 100644 --- a/lib/model_ab_test_campaign_result_clicked_links.go +++ b/lib/model_ab_test_campaign_result_clicked_links.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AbTestCampaignResultClickedLinks struct { VersionA *AbTestVersionClicks `json:"Version A"` diff --git a/lib/model_ab_test_campaign_result_statistics.go b/lib/model_ab_test_campaign_result_statistics.go index 9a9adb3..adbbeea 100644 --- a/lib/model_ab_test_campaign_result_statistics.go +++ b/lib/model_ab_test_campaign_result_statistics.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AbTestCampaignResultStatistics struct { - Openers *AbTestVersionStats `json:"openers"` - Clicks *AbTestVersionStats `json:"clicks"` + Openers *AbTestVersionStats `json:"openers"` + Clicks *AbTestVersionStats `json:"clicks"` Unsubscribed *AbTestVersionStats `json:"unsubscribed"` - HardBounces *AbTestVersionStats `json:"hardBounces"` - SoftBounces *AbTestVersionStats `json:"softBounces"` - Complaints *AbTestVersionStats `json:"complaints"` + HardBounces *AbTestVersionStats `json:"hardBounces"` + SoftBounces *AbTestVersionStats `json:"softBounces"` + Complaints *AbTestVersionStats `json:"complaints"` } diff --git a/lib/model_ab_test_version_clicks.go b/lib/model_ab_test_version_clicks.go index f11a070..8903164 100644 --- a/lib/model_ab_test_version_clicks.go +++ b/lib/model_ab_test_version_clicks.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Information on clicked links for a particular version type AbTestVersionClicks struct { diff --git a/lib/model_ab_test_version_clicks_inner.go b/lib/model_ab_test_version_clicks_inner.go index 2d87c65..e601120 100644 --- a/lib/model_ab_test_version_clicks_inner.go +++ b/lib/model_ab_test_version_clicks_inner.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AbTestVersionClicksInner struct { // URL of the link diff --git a/lib/model_ab_test_version_stats.go b/lib/model_ab_test_version_stats.go index a358aed..318145b 100644 --- a/lib/model_ab_test_version_stats.go +++ b/lib/model_ab_test_version_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Percentage of a particular event for both versions type AbTestVersionStats struct { diff --git a/lib/model_add_child_domain.go b/lib/model_add_child_domain.go index 37e80a8..87eea84 100644 --- a/lib/model_add_child_domain.go +++ b/lib/model_add_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AddChildDomain struct { // Sender domain to add for a specific child account diff --git a/lib/model_add_contact_to_list.go b/lib/model_add_contact_to_list.go index 74041db..2429f23 100644 --- a/lib/model_add_contact_to_list.go +++ b/lib/model_add_contact_to_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AddContactToList struct { // 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. diff --git a/lib/model_add_credits.go b/lib/model_add_credits.go index 051dd5e..90ced29 100644 --- a/lib/model_add_credits.go +++ b/lib/model_add_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AddCredits struct { // Required if email credits are empty. SMS credits to be added to the child account diff --git a/lib/model_authenticate_domain_model.go b/lib/model_authenticate_domain_model.go index 48c251a..39dc1c2 100644 --- a/lib/model_authenticate_domain_model.go +++ b/lib/model_authenticate_domain_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type AuthenticateDomainModel struct { // Domain diff --git a/lib/model_block_domain.go b/lib/model_block_domain.go index cfb1430..13b7414 100644 --- a/lib/model_block_domain.go +++ b/lib/model_block_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type BlockDomain struct { // name of the domain to be blocked diff --git a/lib/model_body.go b/lib/model_body.go index be74cb6..d708000 100644 --- a/lib/model_body.go +++ b/lib/model_body.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body struct { // The name of the group of sub-accounts diff --git a/lib/model_body_1.go b/lib/model_body_1.go index 3750e90..71fba90 100644 --- a/lib/model_body_1.go +++ b/lib/model_body_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body1 struct { // IP Address diff --git a/lib/model_body_10.go b/lib/model_body_10.go index da18f3d..8103097 100644 --- a/lib/model_body_10.go +++ b/lib/model_body_10.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body10 struct { // Contact ids for contacts to be linked with deal diff --git a/lib/model_body_11.go b/lib/model_body_11.go index d232b9e..99a5ea2 100644 --- a/lib/model_body_11.go +++ b/lib/model_body_11.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" @@ -34,6 +34,6 @@ type Body11 struct { // Deal ids for deals a task is linked to DealsIds []string `json:"dealsIds,omitempty"` // Companies ids for companies a task is linked to - CompaniesIds []string `json:"companiesIds,omitempty"` - Reminder *TaskReminder `json:"reminder,omitempty"` + CompaniesIds []string `json:"companiesIds,omitempty"` + Reminder *TaskReminder `json:"reminder,omitempty"` } diff --git a/lib/model_body_12.go b/lib/model_body_12.go index f8f216a..f068095 100644 --- a/lib/model_body_12.go +++ b/lib/model_body_12.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_body_13.go b/lib/model_body_13.go index 61702bd..af83acb 100644 --- a/lib/model_body_13.go +++ b/lib/model_body_13.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body13 struct { // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations diff --git a/lib/model_body_14.go b/lib/model_body_14.go index 8a9b20c..a505cb6 100644 --- a/lib/model_body_14.go +++ b/lib/model_body_14.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body14 struct { // edited message text diff --git a/lib/model_body_15.go b/lib/model_body_15.go index 642dd7a..2d70883 100644 --- a/lib/model_body_15.go +++ b/lib/model_body_15.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body15 struct { // visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations diff --git a/lib/model_body_16.go b/lib/model_body_16.go index fb899a7..06a4632 100644 --- a/lib/model_body_16.go +++ b/lib/model_body_16.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body16 struct { // edited message text diff --git a/lib/model_body_17.go b/lib/model_body_17.go index e258872..404b64f 100644 --- a/lib/model_body_17.go +++ b/lib/model_body_17.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body17 struct { // 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). diff --git a/lib/model_body_2.go b/lib/model_body_2.go index 275fd67..7c66dfe 100644 --- a/lib/model_body_2.go +++ b/lib/model_body_2.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body2 struct { // IP Address diff --git a/lib/model_body_3.go b/lib/model_body_3.go index 5ad4166..381f313 100644 --- a/lib/model_body_3.go +++ b/lib/model_body_3.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body3 struct { // The name of the group of sub-accounts diff --git a/lib/model_body_4.go b/lib/model_body_4.go index a952ff6..062307f 100644 --- a/lib/model_body_4.go +++ b/lib/model_body_4.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body4 struct { // List of sub-account ids diff --git a/lib/model_body_5.go b/lib/model_body_5.go index a5e50b4..044dfec 100644 --- a/lib/model_body_5.go +++ b/lib/model_body_5.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body5 struct { // Name of company diff --git a/lib/model_body_6.go b/lib/model_body_6.go index 82ff68e..5e8c636 100644 --- a/lib/model_body_6.go +++ b/lib/model_body_6.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body6 struct { // Name of company diff --git a/lib/model_body_7.go b/lib/model_body_7.go index e8e7667..b8b4c91 100644 --- a/lib/model_body_7.go +++ b/lib/model_body_7.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body7 struct { // Contact ids for contacts to be linked with company diff --git a/lib/model_body_8.go b/lib/model_body_8.go index cf92043..fc1e92c 100644 --- a/lib/model_body_8.go +++ b/lib/model_body_8.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body8 struct { // Name of deal diff --git a/lib/model_body_9.go b/lib/model_body_9.go index c5b45ea..3a426dd 100644 --- a/lib/model_body_9.go +++ b/lib/model_body_9.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Body9 struct { // Name of deal diff --git a/lib/model_body_variables_items.go b/lib/model_body_variables_items.go index 930f21d..cc0511a 100644 --- a/lib/model_body_variables_items.go +++ b/lib/model_body_variables_items.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type BodyVariablesItems struct { } diff --git a/lib/model_cart.go b/lib/model_cart.go index b9b82bc..3d4c723 100644 --- a/lib/model_cart.go +++ b/lib/model_cart.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib -// Specify the payment currency and amount. +// Specify the payment currency and amount. type Cart struct { - // Currency code for the payment amount. + // Currency code for the payment amount. Currency string `json:"currency"` - // Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. + // Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200. SpecificAmount int64 `json:"specificAmount"` } diff --git a/lib/model_companies_list.go b/lib/model_companies_list.go index c2ce1f4..7574f1a 100644 --- a/lib/model_companies_list.go +++ b/lib/model_companies_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of companies type CompaniesList struct { diff --git a/lib/model_company.go b/lib/model_company.go index 01cd02d..9d3471d 100644 --- a/lib/model_company.go +++ b/lib/model_company.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Company Details type Company struct { diff --git a/lib/model_company_attributes.go b/lib/model_company_attributes.go index b807ac0..27fc28b 100644 --- a/lib/model_company_attributes.go +++ b/lib/model_company_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of company attributes type CompanyAttributes struct { diff --git a/lib/model_company_attributes_inner.go b/lib/model_company_attributes_inner.go index 7995148..bcde745 100644 --- a/lib/model_company_attributes_inner.go +++ b/lib/model_company_attributes_inner.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of attributes type CompanyAttributesInner struct { - InternalName string `json:"internalName,omitempty"` - Label string `json:"label,omitempty"` - AttributeTypeName string `json:"attributeTypeName,omitempty"` - AttributeOptions []interface{} `json:"attributeOptions,omitempty"` - IsRequired bool `json:"isRequired,omitempty"` + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` } diff --git a/lib/model_component_items.go b/lib/model_component_items.go index 0514fed..0aa9461 100644 --- a/lib/model_component_items.go +++ b/lib/model_component_items.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ComponentItems struct { Type_ string `json:"type,omitempty"` - Text string `json:"text,omitempty"` + Text string `json:"text,omitempty"` } diff --git a/lib/model_configuration.go b/lib/model_configuration.go index ed7f675..8732fce 100644 --- a/lib/model_configuration.go +++ b/lib/model_configuration.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib -// Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated +// Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated type Configuration struct { - // Absolute URL of the custom success page. + // Absolute URL of the custom success page. CustomSuccessUrl string `json:"customSuccessUrl"` } diff --git a/lib/model_conversations_message.go b/lib/model_conversations_message.go index eaff1bd..76dba76 100644 --- a/lib/model_conversations_message.go +++ b/lib/model_conversations_message.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // a Conversations message type ConversationsMessage struct { @@ -29,6 +29,6 @@ type ConversationsMessage struct { // `true` for pushed messages IsPushed bool `json:"isPushed,omitempty"` // 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. - ReceivedFrom string `json:"receivedFrom,omitempty"` - File *ConversationsMessageFile `json:"file,omitempty"` + ReceivedFrom string `json:"receivedFrom,omitempty"` + File *ConversationsMessageFile `json:"file,omitempty"` } diff --git a/lib/model_conversations_message_file.go b/lib/model_conversations_message_file.go index 9422d15..b8b1e6b 100644 --- a/lib/model_conversations_message_file.go +++ b/lib/model_conversations_message_file.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ConversationsMessageFile struct { // Name of the file @@ -18,6 +18,6 @@ type ConversationsMessageFile struct { // Whether the file is an image IsImage bool `json:"isImage,omitempty"` // URL of the file - Url string `json:"url,omitempty"` + Url string `json:"url,omitempty"` ImageInfo *ConversationsMessageFileImageInfo `json:"imageInfo,omitempty"` } diff --git a/lib/model_conversations_message_file_image_info.go b/lib/model_conversations_message_file_image_info.go index 9bd685d..c47654b 100644 --- a/lib/model_conversations_message_file_image_info.go +++ b/lib/model_conversations_message_file_image_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // image info is passed in case the file is an image type ConversationsMessageFileImageInfo struct { diff --git a/lib/model_conversion_source_metrics.go b/lib/model_conversion_source_metrics.go index 226bf4e..a68409c 100644 --- a/lib/model_conversion_source_metrics.go +++ b/lib/model_conversion_source_metrics.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ConversionSourceMetrics struct { - Id float32 `json:"id"` - ConversionSource string `json:"conversionSource"` - OrdersCount float32 `json:"ordersCount"` - Revenue float32 `json:"revenue"` - AverageBasket float32 `json:"averageBasket"` + Id float32 `json:"id"` + ConversionSource string `json:"conversionSource"` + OrdersCount float32 `json:"ordersCount"` + Revenue float32 `json:"revenue"` + AverageBasket float32 `json:"averageBasket"` } diff --git a/lib/model_conversion_source_product.go b/lib/model_conversion_source_product.go index 3522bd8..8dc93ea 100644 --- a/lib/model_conversion_source_product.go +++ b/lib/model_conversion_source_product.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ConversionSourceProduct struct { - Id string `json:"id"` - Name string `json:"name,omitempty"` - Sku string `json:"sku,omitempty"` - Price float32 `json:"price,omitempty"` - Url string `json:"url,omitempty"` - ImageUrl string `json:"imageUrl,omitempty"` - OrdersCount int32 `json:"ordersCount,omitempty"` - Revenue float32 `json:"revenue,omitempty"` + Id string `json:"id"` + Name string `json:"name,omitempty"` + Sku string `json:"sku,omitempty"` + Price float32 `json:"price,omitempty"` + Url string `json:"url,omitempty"` + ImageUrl string `json:"imageUrl,omitempty"` + OrdersCount int32 `json:"ordersCount,omitempty"` + Revenue float32 `json:"revenue,omitempty"` } diff --git a/lib/model_corporate_group_details_response.go b/lib/model_corporate_group_details_response.go index d22402b..0583d8d 100644 --- a/lib/model_corporate_group_details_response.go +++ b/lib/model_corporate_group_details_response.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CorporateGroupDetailsResponse struct { - Group *CorporateGroupDetailsResponseGroup `json:"group,omitempty"` + Group *CorporateGroupDetailsResponseGroup `json:"group,omitempty"` SubAccounts []CorporateGroupDetailsResponseSubaccounts `json:"sub-accounts,omitempty"` - Users []CorporateGroupDetailsResponseUsers `json:"users,omitempty"` + Users []CorporateGroupDetailsResponseUsers `json:"users,omitempty"` } diff --git a/lib/model_corporate_group_details_response_group.go b/lib/model_corporate_group_details_response_group.go index a00048b..6b804ab 100644 --- a/lib/model_corporate_group_details_response_group.go +++ b/lib/model_corporate_group_details_response_group.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CorporateGroupDetailsResponseGroup struct { // Group id diff --git a/lib/model_corporate_group_details_response_subaccounts.go b/lib/model_corporate_group_details_response_subaccounts.go index 48bba68..2e386af 100644 --- a/lib/model_corporate_group_details_response_subaccounts.go +++ b/lib/model_corporate_group_details_response_subaccounts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CorporateGroupDetailsResponseSubaccounts struct { // Id of the sub-account organzation diff --git a/lib/model_corporate_group_details_response_users.go b/lib/model_corporate_group_details_response_users.go index a6cfaba..44a7bf7 100644 --- a/lib/model_corporate_group_details_response_users.go +++ b/lib/model_corporate_group_details_response_users.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CorporateGroupDetailsResponseUsers struct { // Email address of the user diff --git a/lib/model_create_api_key_request.go b/lib/model_create_api_key_request.go index 745a5b9..830f7e7 100644 --- a/lib/model_create_api_key_request.go +++ b/lib/model_create_api_key_request.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateApiKeyRequest struct { // Id of the sub-account organization diff --git a/lib/model_create_api_key_response.go b/lib/model_create_api_key_response.go index 285f60b..1950028 100644 --- a/lib/model_create_api_key_response.go +++ b/lib/model_create_api_key_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateApiKeyResponse struct { // Status of the API operation. diff --git a/lib/model_create_attribute.go b/lib/model_create_attribute.go index 6e36514..c03f9fe 100644 --- a/lib/model_create_attribute.go +++ b/lib/model_create_attribute.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateAttribute struct { // Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' @@ -17,7 +17,7 @@ type CreateAttribute struct { IsRecurring bool `json:"isRecurring,omitempty"` // 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\"}] Enumeration []CreateAttributeEnumeration `json:"enumeration,omitempty"` - // List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** + // List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"` // Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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 ) Type_ string `json:"type,omitempty"` diff --git a/lib/model_create_attribute_enumeration.go b/lib/model_create_attribute_enumeration.go index 63e3b7e..05c3a5f 100644 --- a/lib/model_create_attribute_enumeration.go +++ b/lib/model_create_attribute_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateAttributeEnumeration struct { // Id of the value diff --git a/lib/model_create_category_model.go b/lib/model_create_category_model.go index d8ec73a..b188e17 100644 --- a/lib/model_create_category_model.go +++ b/lib/model_create_category_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateCategoryModel struct { // ID of the category when a new category is created diff --git a/lib/model_create_child.go b/lib/model_create_child.go index 531c05c..eef462b 100644 --- a/lib/model_create_child.go +++ b/lib/model_create_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateChild struct { // Email address to create the child account diff --git a/lib/model_create_contact.go b/lib/model_create_contact.go index 09556d1..f7bfb8f 100644 --- a/lib/model_create_contact.go +++ b/lib/model_create_contact.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateContact struct { // 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\"} diff --git a/lib/model_create_coupon_collection.go b/lib/model_create_coupon_collection.go index e6a164a..42da1b0 100644 --- a/lib/model_create_coupon_collection.go +++ b/lib/model_create_coupon_collection.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_create_coupons.go b/lib/model_create_coupons.go index c45df69..5442a32 100644 --- a/lib/model_create_coupons.go +++ b/lib/model_create_coupons.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateCoupons struct { // The id of the coupon collection for which the coupons will be created - CollectionId string `json:"collectionId"` - Coupons []string `json:"coupons"` + CollectionId string `json:"collectionId"` + Coupons []string `json:"coupons"` } diff --git a/lib/model_create_doi_contact.go b/lib/model_create_doi_contact.go index f8d3ebb..2ab3245 100644 --- a/lib/model_create_doi_contact.go +++ b/lib/model_create_doi_contact.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateDoiContact struct { // Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. diff --git a/lib/model_create_domain.go b/lib/model_create_domain.go index 34d1bd3..7ae3211 100644 --- a/lib/model_create_domain.go +++ b/lib/model_create_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateDomain struct { // Domain name diff --git a/lib/model_create_domain_model.go b/lib/model_create_domain_model.go index 0847437..fa210fd 100644 --- a/lib/model_create_domain_model.go +++ b/lib/model_create_domain_model.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateDomainModel struct { // ID of the Domain created diff --git a/lib/model_create_domain_model_dns_records.go b/lib/model_create_domain_model_dns_records.go index 70bf409..cb2f1fe 100644 --- a/lib/model_create_domain_model_dns_records.go +++ b/lib/model_create_domain_model_dns_records.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateDomainModelDnsRecords struct { - DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"` - BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"` + DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"` + BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"` DmarcRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dmarc_record,omitempty"` } diff --git a/lib/model_create_domain_model_dns_records_dkim_record.go b/lib/model_create_domain_model_dns_records_dkim_record.go index acebff2..835e065 100644 --- a/lib/model_create_domain_model_dns_records_dkim_record.go +++ b/lib/model_create_domain_model_dns_records_dkim_record.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateDomainModelDnsRecordsDkimRecord struct { - Type_ string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Type_ string `json:"type,omitempty"` + Value string `json:"value,omitempty"` HostName string `json:"host_name,omitempty"` - Status bool `json:"status,omitempty"` + Status bool `json:"status,omitempty"` } diff --git a/lib/model_create_email_campaign.go b/lib/model_create_email_campaign.go index 133436e..9467095 100644 --- a/lib/model_create_email_campaign.go +++ b/lib/model_create_email_campaign.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateEmailCampaign struct { // Tag of the campaign diff --git a/lib/model_create_email_campaign_recipients.go b/lib/model_create_email_campaign_recipients.go index 6d301f6..801580f 100644 --- a/lib/model_create_email_campaign_recipients.go +++ b/lib/model_create_email_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Segment ids and List ids to include/exclude from campaign type CreateEmailCampaignRecipients struct { diff --git a/lib/model_create_email_campaign_sender.go b/lib/model_create_email_campaign_sender.go index ded43a1..c2ce207 100644 --- a/lib/model_create_email_campaign_sender.go +++ b/lib/model_create_email_campaign_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type CreateEmailCampaignSender struct { diff --git a/lib/model_create_external_feed.go b/lib/model_create_external_feed.go index 8c56332..f82d9e8 100644 --- a/lib/model_create_external_feed.go +++ b/lib/model_create_external_feed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateExternalFeed struct { // Name of the feed Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType,omitempty"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_create_list.go b/lib/model_create_list.go index b91addc..00a9266 100644 --- a/lib/model_create_list.go +++ b/lib/model_create_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateList struct { // Name of the list diff --git a/lib/model_create_model.go b/lib/model_create_model.go index 75c2038..5047659 100644 --- a/lib/model_create_model.go +++ b/lib/model_create_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateModel struct { // ID of the object created diff --git a/lib/model_create_payment_request.go b/lib/model_create_payment_request.go index 726c6c7..0540b3b 100644 --- a/lib/model_create_payment_request.go +++ b/lib/model_create_payment_request.go @@ -1,23 +1,23 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreatePaymentRequest struct { - // Reference of the payment request, it will appear on the payment page. + // Reference of the payment request, it will appear on the payment page. Reference string `json:"reference"` - Cart *Cart `json:"cart"` - // Brevo ID of the contact requested to pay. + Cart *Cart `json:"cart"` + // Brevo ID of the contact requested to pay. ContactId int64 `json:"contactId"` - // description of payment request. - Description string `json:"description,omitempty"` - Notification *Notification `json:"notification,omitempty"` + // description of payment request. + Description string `json:"description,omitempty"` + Notification *Notification `json:"notification,omitempty"` Configuration *Configuration `json:"configuration,omitempty"` } diff --git a/lib/model_create_payment_response.go b/lib/model_create_payment_response.go index 276da07..6b7fd1a 100644 --- a/lib/model_create_payment_response.go +++ b/lib/model_create_payment_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreatePaymentResponse struct { // ID of the object created diff --git a/lib/model_create_product_model.go b/lib/model_create_product_model.go index f1902f2..9660dba 100644 --- a/lib/model_create_product_model.go +++ b/lib/model_create_product_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateProductModel struct { // ID of the Product when a new product is created diff --git a/lib/model_create_reseller.go b/lib/model_create_reseller.go index caf4e52..b018bc8 100644 --- a/lib/model_create_reseller.go +++ b/lib/model_create_reseller.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateReseller struct { // AuthKey of Reseller child created diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go index 094ff38..0ee910b 100644 --- a/lib/model_create_sender.go +++ b/lib/model_create_sender.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSender struct { // From Name to use for the sender diff --git a/lib/model_create_sender_ips.go b/lib/model_create_sender_ips.go index f027446..cff6317 100644 --- a/lib/model_create_sender_ips.go +++ b/lib/model_create_sender_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSenderIps struct { // Dedicated IP available in your account diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go index 54d0019..12f316c 100644 --- a/lib/model_create_sender_model.go +++ b/lib/model_create_sender_model.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSenderModel struct { // ID of the Sender created diff --git a/lib/model_create_sms_campaign.go b/lib/model_create_sms_campaign.go index 0170843..c361201 100644 --- a/lib/model_create_sms_campaign.go +++ b/lib/model_create_sms_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSmsCampaign struct { // Name of the campaign @@ -16,7 +16,7 @@ type CreateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender"` // 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 - Content string `json:"content"` + Content string `json:"content"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // 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. ScheduledAt string `json:"scheduledAt,omitempty"` diff --git a/lib/model_create_sms_campaign_recipients.go b/lib/model_create_sms_campaign_recipients.go index c72fa30..6dd1b7b 100644 --- a/lib/model_create_sms_campaign_recipients.go +++ b/lib/model_create_sms_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSmsCampaignRecipients struct { // Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty diff --git a/lib/model_create_smtp_email.go b/lib/model_create_smtp_email.go index e943eb2..f6cf765 100644 --- a/lib/model_create_smtp_email.go +++ b/lib/model_create_smtp_email.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSmtpEmail struct { // Message ID of the transactional email sent - MessageId string `json:"messageId,omitempty"` + MessageId string `json:"messageId,omitempty"` MessageIds []string `json:"messageIds,omitempty"` } diff --git a/lib/model_create_smtp_template.go b/lib/model_create_smtp_template.go index 1b786f1..ad2a4e1 100644 --- a/lib/model_create_smtp_template.go +++ b/lib/model_create_smtp_template.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *CreateSmtpTemplateSender `json:"sender"` // Name of the template TemplateName string `json:"templateName"` diff --git a/lib/model_create_smtp_template_sender.go b/lib/model_create_smtp_template_sender.go index 6e0226b..c67ff7e 100644 --- a/lib/model_create_smtp_template_sender.go +++ b/lib/model_create_smtp_template_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type CreateSmtpTemplateSender struct { diff --git a/lib/model_create_sub_account.go b/lib/model_create_sub_account.go index 339e9e3..5e49fe9 100644 --- a/lib/model_create_sub_account.go +++ b/lib/model_create_sub_account.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSubAccount struct { // Set the name of the sub-account company diff --git a/lib/model_create_sub_account_response.go b/lib/model_create_sub_account_response.go index e31fc6d..1bc1554 100644 --- a/lib/model_create_sub_account_response.go +++ b/lib/model_create_sub_account_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateSubAccountResponse struct { // ID of the sub-account created diff --git a/lib/model_create_update_batch_category.go b/lib/model_create_update_batch_category.go index 6c770bb..1d18e12 100644 --- a/lib/model_create_update_batch_category.go +++ b/lib/model_create_update_batch_category.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateBatchCategory struct { // array of categories objects diff --git a/lib/model_create_update_batch_category_model.go b/lib/model_create_update_batch_category_model.go index 881b654..1b9bc72 100644 --- a/lib/model_create_update_batch_category_model.go +++ b/lib/model_create_update_batch_category_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateBatchCategoryModel struct { // Number of the new created categories diff --git a/lib/model_create_update_batch_products.go b/lib/model_create_update_batch_products.go index c19a4bc..f2bfd7d 100644 --- a/lib/model_create_update_batch_products.go +++ b/lib/model_create_update_batch_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateBatchProducts struct { // array of products objects diff --git a/lib/model_create_update_batch_products_model.go b/lib/model_create_update_batch_products_model.go index 0d10327..4bca9bf 100644 --- a/lib/model_create_update_batch_products_model.go +++ b/lib/model_create_update_batch_products_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateBatchProductsModel struct { // Number of the new created products diff --git a/lib/model_create_update_categories.go b/lib/model_create_update_categories.go index 27109b6..800c5af 100644 --- a/lib/model_create_update_categories.go +++ b/lib/model_create_update_categories.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateCategories struct { - // Unique Category ID as saved in the shop + // Unique Category ID as saved in the shop Id string `json:"id"` - // **Mandatory in case of creation**. Name of the Category, as displayed in the shop + // **Mandatory in case of creation**. Name of the Category, as displayed in the shop Name string `json:"name,omitempty"` // URL to the category Url string `json:"url,omitempty"` diff --git a/lib/model_create_update_category.go b/lib/model_create_update_category.go index b9dd6d5..50f67e9 100644 --- a/lib/model_create_update_category.go +++ b/lib/model_create_update_category.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateCategory struct { - // Unique Category ID as saved in the shop + // Unique Category ID as saved in the shop Id string `json:"id"` - // **Mandatory in case of creation**. Name of the Category, as displayed in the shop + // **Mandatory in case of creation**. Name of the Category, as displayed in the shop Name string `json:"name,omitempty"` // URL to the category Url string `json:"url,omitempty"` diff --git a/lib/model_create_update_contact_model.go b/lib/model_create_update_contact_model.go index ef33de5..51da3a0 100644 --- a/lib/model_create_update_contact_model.go +++ b/lib/model_create_update_contact_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateContactModel struct { // ID of the contact when a new contact is created diff --git a/lib/model_create_update_folder.go b/lib/model_create_update_folder.go index 65f7179..9deb777 100644 --- a/lib/model_create_update_folder.go +++ b/lib/model_create_update_folder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateFolder struct { // Name of the folder diff --git a/lib/model_create_update_product.go b/lib/model_create_update_product.go index b391a04..413848e 100644 --- a/lib/model_create_update_product.go +++ b/lib/model_create_update_product.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateProduct struct { // Product ID for which you requested the details diff --git a/lib/model_create_update_products.go b/lib/model_create_update_products.go index 19f6fbf..f690052 100644 --- a/lib/model_create_update_products.go +++ b/lib/model_create_update_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateUpdateProducts struct { // Product ID for which you requested the details diff --git a/lib/model_create_webhook.go b/lib/model_create_webhook.go index 8a24edc..01afa35 100644 --- a/lib/model_create_webhook.go +++ b/lib/model_create_webhook.go @@ -1,29 +1,29 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateWebhook struct { // URL of the webhook Url string `json:"url"` // Description of the webhook Description string `json:"description,omitempty"` - // - 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` + // - 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` Events []string `json:"events"` // Type of the webhook Type_ string `json:"type,omitempty"` // Inbound domain of webhook, required in case of event type `inbound` Domain string `json:"domain,omitempty"` // To send batched webhooks - Batched bool `json:"batched,omitempty"` - Auth *GetWebhookAuth `json:"auth,omitempty"` + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` // Custom headers to be send with webhooks Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_create_whats_app_campaign.go b/lib/model_create_whats_app_campaign.go index e63ff0b..e8964fd 100644 --- a/lib/model_create_whats_app_campaign.go +++ b/lib/model_create_whats_app_campaign.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateWhatsAppCampaign struct { // Name of the WhatsApp campaign creation Name string `json:"name"` // Id of the WhatsApp template in **approved** state TemplateId int32 `json:"templateId"` - // 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** - ScheduledAt string `json:"scheduledAt"` - Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"` + // 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** + ScheduledAt string `json:"scheduledAt"` + Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"` } diff --git a/lib/model_create_whats_app_campaign_recipients.go b/lib/model_create_whats_app_campaign_recipients.go index c252e7e..937718b 100644 --- a/lib/model_create_whats_app_campaign_recipients.go +++ b/lib/model_create_whats_app_campaign_recipients.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Segment ids and List ids to include/exclude from campaign type CreateWhatsAppCampaignRecipients struct { // List ids to exclude from the campaign ExcludedListIds []int64 `json:"excludedListIds,omitempty"` - // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to + // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to ListIds []int64 `json:"listIds,omitempty"` - // **Mandatory if listIds are not used**. Segment ids to send the campaign to. + // **Mandatory if listIds are not used**. Segment ids to send the campaign to. Segments []int64 `json:"segments,omitempty"` } diff --git a/lib/model_create_whats_app_template.go b/lib/model_create_whats_app_template.go index b9e672c..60192d6 100644 --- a/lib/model_create_whats_app_template.go +++ b/lib/model_create_whats_app_template.go @@ -1,27 +1,27 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreateWhatsAppTemplate struct { // Name of the template Name string `json:"name"` - // Language of the template. For Example : **en** for English + // Language of the template. For Example : **en** for English Language string `json:"language"` // Category of the template Category string `json:"category"` - // 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 + // 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 MediaUrl string `json:"mediaUrl,omitempty"` // Body of the template. **Maximum allowed characters are 1024** BodyText string `json:"bodyText"` - // 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** + // 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** HeaderText string `json:"headerText,omitempty"` // source of the template Source string `json:"source,omitempty"` diff --git a/lib/model_created_batch_id.go b/lib/model_created_batch_id.go index a68e9a6..31ab9a6 100644 --- a/lib/model_created_batch_id.go +++ b/lib/model_created_batch_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreatedBatchId struct { // Batch ID of the request diff --git a/lib/model_created_process_id.go b/lib/model_created_process_id.go index c5cb0fd..eb03f2c 100644 --- a/lib/model_created_process_id.go +++ b/lib/model_created_process_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type CreatedProcessId struct { // Id of the process created diff --git a/lib/model_deal.go b/lib/model_deal.go index 12cba8a..26997c3 100644 --- a/lib/model_deal.go +++ b/lib/model_deal.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Deal Details type Deal struct { diff --git a/lib/model_deal_attributes.go b/lib/model_deal_attributes.go index 366f81c..6fc95d2 100644 --- a/lib/model_deal_attributes.go +++ b/lib/model_deal_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of deal attributes type DealAttributes struct { diff --git a/lib/model_deal_attributes_inner.go b/lib/model_deal_attributes_inner.go index d22beb2..72db5d0 100644 --- a/lib/model_deal_attributes_inner.go +++ b/lib/model_deal_attributes_inner.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of attributes type DealAttributesInner struct { - InternalName string `json:"internalName,omitempty"` - Label string `json:"label,omitempty"` - AttributeTypeName string `json:"attributeTypeName,omitempty"` - AttributeOptions []interface{} `json:"attributeOptions,omitempty"` - IsRequired bool `json:"isRequired,omitempty"` + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` } diff --git a/lib/model_deals_list.go b/lib/model_deals_list.go index 03efd80..0e8034d 100644 --- a/lib/model_deals_list.go +++ b/lib/model_deals_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of Deals type DealsList struct { diff --git a/lib/model_delete_hardbounces.go b/lib/model_delete_hardbounces.go index 0279252..df3c168 100644 --- a/lib/model_delete_hardbounces.go +++ b/lib/model_delete_hardbounces.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type DeleteHardbounces struct { // 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 diff --git a/lib/model_email_export_recipients.go b/lib/model_email_export_recipients.go index 929d913..1d10d64 100644 --- a/lib/model_email_export_recipients.go +++ b/lib/model_email_export_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type EmailExportRecipients struct { // Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 diff --git a/lib/model_error_model.go b/lib/model_error_model.go index 9df58f2..9ae08a6 100644 --- a/lib/model_error_model.go +++ b/lib/model_error_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ErrorModel struct { // Error code displayed in case of a failure diff --git a/lib/model_event.go b/lib/model_event.go index 05acf56..41f6ba6 100644 --- a/lib/model_event.go +++ b/lib/model_event.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Event struct { // 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. diff --git a/lib/model_event_identifiers.go b/lib/model_event_identifiers.go index 66f249e..7424253 100644 --- a/lib/model_event_identifiers.go +++ b/lib/model_event_identifiers.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Identifies the contact associated with the event. At least one identifier is required. type EventIdentifiers struct { diff --git a/lib/model_export_webhooks_history.go b/lib/model_export_webhooks_history.go index 6c35218..33f8bd6 100644 --- a/lib/model_export_webhooks_history.go +++ b/lib/model_export_webhooks_history.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ExportWebhooksHistory struct { // Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ diff --git a/lib/model_file_data.go b/lib/model_file_data.go index 194b5f4..02463f4 100644 --- a/lib/model_file_data.go +++ b/lib/model_file_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_file_downloadable_link.go b/lib/model_file_downloadable_link.go index b7ad916..bc990de 100644 --- a/lib/model_file_downloadable_link.go +++ b/lib/model_file_downloadable_link.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type FileDownloadableLink struct { // A unique link to download the requested file. diff --git a/lib/model_file_list.go b/lib/model_file_list.go index 3947965..f437e82 100644 --- a/lib/model_file_list.go +++ b/lib/model_file_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of files type FileList struct { diff --git a/lib/model_get_account.go b/lib/model_get_account.go index 6858cf3..7a089a3 100644 --- a/lib/model_get_account.go +++ b/lib/model_get_account.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAccount struct { // Login Email @@ -18,10 +18,10 @@ type GetAccount struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Address *GetExtendedClientAddress `json:"address"` + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` // Information about your plans and credits - Plan []GetAccountPlan `json:"plan"` - Relay *GetAccountRelay `json:"relay"` + Plan []GetAccountPlan `json:"plan"` + Relay *GetAccountRelay `json:"relay"` MarketingAutomation *GetAccountMarketingAutomation `json:"marketingAutomation,omitempty"` } diff --git a/lib/model_get_account_activity.go b/lib/model_get_account_activity.go index 81737b5..cef4bf3 100644 --- a/lib/model_get_account_activity.go +++ b/lib/model_get_account_activity.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAccountActivity struct { // Get user activity logs diff --git a/lib/model_get_account_activity_logs.go b/lib/model_get_account_activity_logs.go index 0f25a7d..f818850 100644 --- a/lib/model_get_account_activity_logs.go +++ b/lib/model_get_account_activity_logs.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAccountActivityLogs struct { // Type of activity in the account. diff --git a/lib/model_get_account_marketing_automation.go b/lib/model_get_account_marketing_automation.go index eb26ddb..14809a0 100644 --- a/lib/model_get_account_marketing_automation.go +++ b/lib/model_get_account_marketing_automation.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAccountMarketingAutomation struct { // Marketing Automation Tracker ID diff --git a/lib/model_get_account_plan.go b/lib/model_get_account_plan.go index 2794e93..e695bb7 100644 --- a/lib/model_get_account_plan.go +++ b/lib/model_get_account_plan.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAccountPlan struct { // Displays the plan type of the user diff --git a/lib/model_get_account_relay.go b/lib/model_get_account_relay.go index 917fd28..ffd4b86 100644 --- a/lib/model_get_account_relay.go +++ b/lib/model_get_account_relay.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Information about your transactional email account type GetAccountRelay struct { // Status of your transactional email Account (true=Enabled, false=Disabled) - Enabled bool `json:"enabled"` - Data *GetAccountRelayData `json:"data"` + Enabled bool `json:"enabled"` + Data *GetAccountRelayData `json:"data"` } diff --git a/lib/model_get_account_relay_data.go b/lib/model_get_account_relay_data.go index b426683..d47d691 100644 --- a/lib/model_get_account_relay_data.go +++ b/lib/model_get_account_relay_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Data regarding the transactional email account type GetAccountRelayData struct { diff --git a/lib/model_get_aggregated_report.go b/lib/model_get_aggregated_report.go index 984f5a3..d6b346e 100644 --- a/lib/model_get_aggregated_report.go +++ b/lib/model_get_aggregated_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAggregatedReport struct { // Time frame of the report diff --git a/lib/model_get_all_external_feeds.go b/lib/model_get_all_external_feeds.go index 4586803..98aa857 100644 --- a/lib/model_get_all_external_feeds.go +++ b/lib/model_get_all_external_feeds.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAllExternalFeeds struct { // Total number of batches - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` Feeds []GetAllExternalFeedsFeeds `json:"feeds,omitempty"` } diff --git a/lib/model_get_all_external_feeds_feeds.go b/lib/model_get_all_external_feeds_feeds.go index c3e5a48..46aeef1 100644 --- a/lib/model_get_all_external_feeds_feeds.go +++ b/lib/model_get_all_external_feeds_feeds.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" @@ -21,7 +21,7 @@ type GetAllExternalFeedsFeeds struct { Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_get_attributes.go b/lib/model_get_attributes.go index cbf5b21..b53f7b6 100644 --- a/lib/model_get_attributes.go +++ b/lib/model_get_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAttributes struct { // Listing of available contact attributes in your account diff --git a/lib/model_get_attributes_attributes.go b/lib/model_get_attributes_attributes.go index f338fff..3ee9779 100644 --- a/lib/model_get_attributes_attributes.go +++ b/lib/model_get_attributes_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAttributesAttributes struct { // Name of the attribute diff --git a/lib/model_get_attributes_enumeration.go b/lib/model_get_attributes_enumeration.go index 31a0627..4269f5e 100644 --- a/lib/model_get_attributes_enumeration.go +++ b/lib/model_get_attributes_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetAttributesEnumeration struct { // ID of Value of the \"category\" type attribute diff --git a/lib/model_get_blocked_domains.go b/lib/model_get_blocked_domains.go index 64a0ed7..e5b750f 100644 --- a/lib/model_get_blocked_domains.go +++ b/lib/model_get_blocked_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // list of blocked domains type GetBlockedDomains struct { diff --git a/lib/model_get_campaign_overview.go b/lib/model_get_campaign_overview.go index 23f01f1..1f348fd 100644 --- a/lib/model_get_campaign_overview.go +++ b/lib/model_get_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCampaignOverview struct { // ID of the campaign diff --git a/lib/model_get_campaign_recipients.go b/lib/model_get_campaign_recipients.go index b99d44f..590b5f5 100644 --- a/lib/model_get_campaign_recipients.go +++ b/lib/model_get_campaign_recipients.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCampaignRecipients struct { - Lists []int64 `json:"lists"` + Lists []int64 `json:"lists"` ExclusionLists []int64 `json:"exclusionLists"` } diff --git a/lib/model_get_campaign_stats.go b/lib/model_get_campaign_stats.go index debacfe..c989478 100644 --- a/lib/model_get_campaign_stats.go +++ b/lib/model_get_campaign_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCampaignStats struct { // List Id of email campaign (only in case of get email campaign(s)(not for global stats)) diff --git a/lib/model_get_categories.go b/lib/model_get_categories.go index b968e56..c510148 100644 --- a/lib/model_get_categories.go +++ b/lib/model_get_categories.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCategories struct { Categories []interface{} `json:"categories"` diff --git a/lib/model_get_category_details.go b/lib/model_get_category_details.go index a6ddf8d..a2a4bde 100644 --- a/lib/model_get_category_details.go +++ b/lib/model_get_category_details.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCategoryDetails struct { // Category ID for which you requested the details diff --git a/lib/model_get_child_account_creation_status.go b/lib/model_get_child_account_creation_status.go index 952d1b9..8625166 100644 --- a/lib/model_get_child_account_creation_status.go +++ b/lib/model_get_child_account_creation_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildAccountCreationStatus struct { // Status of child account creation whether it is successfully created (exists) or not. diff --git a/lib/model_get_child_domain.go b/lib/model_get_child_domain.go index bf85d78..44cb0a9 100644 --- a/lib/model_get_child_domain.go +++ b/lib/model_get_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildDomain struct { // Sender domain diff --git a/lib/model_get_child_domains.go b/lib/model_get_child_domains.go index b9c93b5..c81833e 100644 --- a/lib/model_get_child_domains.go +++ b/lib/model_get_child_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildDomains struct { } diff --git a/lib/model_get_child_info.go b/lib/model_get_child_info.go index e050b2d..a31211f 100644 --- a/lib/model_get_child_info.go +++ b/lib/model_get_child_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildInfo struct { // Login Email @@ -18,12 +18,12 @@ type GetChildInfo struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Credits *GetChildInfoCredits `json:"credits,omitempty"` - Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` + CompanyName string `json:"companyName"` + Credits *GetChildInfoCredits `json:"credits,omitempty"` + Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` // The encrypted password of child account Password string `json:"password"` // IP(s) associated to a child account user - Ips []string `json:"ips,omitempty"` + Ips []string `json:"ips,omitempty"` ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"` } diff --git a/lib/model_get_child_info_api_keys.go b/lib/model_get_child_info_api_keys.go index 37b7e05..c0ed4b5 100644 --- a/lib/model_get_child_info_api_keys.go +++ b/lib/model_get_child_info_api_keys.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // API Keys associated to child account type GetChildInfoApiKeys struct { diff --git a/lib/model_get_child_info_api_keys_v2.go b/lib/model_get_child_info_api_keys_v2.go index a0db018..4996644 100644 --- a/lib/model_get_child_info_api_keys_v2.go +++ b/lib/model_get_child_info_api_keys_v2.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildInfoApiKeysV2 struct { // Name of the key for version 2 diff --git a/lib/model_get_child_info_api_keys_v3.go b/lib/model_get_child_info_api_keys_v3.go index 3075120..7cddabb 100644 --- a/lib/model_get_child_info_api_keys_v3.go +++ b/lib/model_get_child_info_api_keys_v3.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildInfoApiKeysV3 struct { // Name of the key for version 3 diff --git a/lib/model_get_child_info_credits.go b/lib/model_get_child_info_credits.go index f7cd0d5..57dad20 100644 --- a/lib/model_get_child_info_credits.go +++ b/lib/model_get_child_info_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Credits available for your child type GetChildInfoCredits struct { diff --git a/lib/model_get_child_info_statistics.go b/lib/model_get_child_info_statistics.go index 605a0de..5c64359 100644 --- a/lib/model_get_child_info_statistics.go +++ b/lib/model_get_child_info_statistics.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Statistics about your child account activity type GetChildInfoStatistics struct { diff --git a/lib/model_get_children_list.go b/lib/model_get_children_list.go index 14898b7..84d01fe 100644 --- a/lib/model_get_children_list.go +++ b/lib/model_get_children_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetChildrenList struct { // Your children's account information diff --git a/lib/model_get_client.go b/lib/model_get_client.go index 4e9455e..fb2ae57 100644 --- a/lib/model_get_client.go +++ b/lib/model_get_client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetClient struct { // Login Email diff --git a/lib/model_get_contact_campaign_stats.go b/lib/model_get_contact_campaign_stats.go index 941ff6b..406eabf 100644 --- a/lib/model_get_contact_campaign_stats.go +++ b/lib/model_get_contact_campaign_stats.go @@ -1,24 +1,24 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Campaign Statistics for the contact type GetContactCampaignStats struct { - MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` - HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` - SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` - Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` - Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` - Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` - TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` - Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"` + MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` + HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` + SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` + Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` + Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` + TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` + Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"` } diff --git a/lib/model_get_contact_campaign_stats_clicked.go b/lib/model_get_contact_campaign_stats_clicked.go index 5dda146..a0970fd 100644 --- a/lib/model_get_contact_campaign_stats_clicked.go +++ b/lib/model_get_contact_campaign_stats_clicked.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContactCampaignStatsClicked struct { // ID of the campaign which generated the event - CampaignId int64 `json:"campaignId"` - Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` + CampaignId int64 `json:"campaignId"` + Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` } diff --git a/lib/model_get_contact_campaign_stats_opened.go b/lib/model_get_contact_campaign_stats_opened.go index 0623e1d..487bc3f 100644 --- a/lib/model_get_contact_campaign_stats_opened.go +++ b/lib/model_get_contact_campaign_stats_opened.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContactCampaignStatsOpened struct { // ID of the campaign which generated the event diff --git a/lib/model_get_contact_campaign_stats_transac_attributes.go b/lib/model_get_contact_campaign_stats_transac_attributes.go index 63c42b3..01425af 100644 --- a/lib/model_get_contact_campaign_stats_transac_attributes.go +++ b/lib/model_get_contact_campaign_stats_transac_attributes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContactCampaignStatsTransacAttributes struct { // Date of the order diff --git a/lib/model_get_contact_campaign_stats_unsubscriptions.go b/lib/model_get_contact_campaign_stats_unsubscriptions.go index ce67dc2..b07c919 100644 --- a/lib/model_get_contact_campaign_stats_unsubscriptions.go +++ b/lib/model_get_contact_campaign_stats_unsubscriptions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContactCampaignStatsUnsubscriptions struct { // Contact has unsubscribed via the unsubscription link in the email diff --git a/lib/model_get_contact_details.go b/lib/model_get_contact_details.go index b9e1263..55a2a79 100644 --- a/lib/model_get_contact_details.go +++ b/lib/model_get_contact_details.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContactDetails struct { // Email address of the contact for which you requested the details diff --git a/lib/model_get_contacts.go b/lib/model_get_contacts.go index 3a5ac11..71b48e3 100644 --- a/lib/model_get_contacts.go +++ b/lib/model_get_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetContacts struct { Contacts []interface{} `json:"contacts"` diff --git a/lib/model_get_corporate_invited_users_list.go b/lib/model_get_corporate_invited_users_list.go index c1bdb44..888bf28 100644 --- a/lib/model_get_corporate_invited_users_list.go +++ b/lib/model_get_corporate_invited_users_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCorporateInvitedUsersList struct { // Get invited users list diff --git a/lib/model_get_corporate_invited_users_list_feature_access.go b/lib/model_get_corporate_invited_users_list_feature_access.go index cef2d60..049ef96 100644 --- a/lib/model_get_corporate_invited_users_list_feature_access.go +++ b/lib/model_get_corporate_invited_users_list_feature_access.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Feature accessiblity given to the user. (Required only if status is active) type GetCorporateInvitedUsersListFeatureAccess struct { diff --git a/lib/model_get_corporate_invited_users_list_groups.go b/lib/model_get_corporate_invited_users_list_groups.go index 9a235d1..79862a1 100644 --- a/lib/model_get_corporate_invited_users_list_groups.go +++ b/lib/model_get_corporate_invited_users_list_groups.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Admin user groups list type GetCorporateInvitedUsersListGroups struct { diff --git a/lib/model_get_corporate_invited_users_list_users.go b/lib/model_get_corporate_invited_users_list_users.go index a92565b..1d977de 100644 --- a/lib/model_get_corporate_invited_users_list_users.go +++ b/lib/model_get_corporate_invited_users_list_users.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetCorporateInvitedUsersListUsers struct { Groups *GetCorporateInvitedUsersListGroups `json:"groups"` @@ -17,6 +17,6 @@ type GetCorporateInvitedUsersListUsers struct { // Flag for indicating is user owner of the organization. IsOwner string `json:"is_owner"` // Status of the invited user. - Status string `json:"status"` + Status string `json:"status"` FeatureAccess *GetCorporateInvitedUsersListFeatureAccess `json:"feature_access"` } diff --git a/lib/model_get_corporate_user_permission.go b/lib/model_get_corporate_user_permission.go index a88c804..b7ef5fa 100644 --- a/lib/model_get_corporate_user_permission.go +++ b/lib/model_get_corporate_user_permission.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Check admin user permissions type GetCorporateUserPermission struct { // Email address of the user. Email string `json:"email"` // Status of the invited user. - Status string `json:"status"` - Groups []GetCorporateUserPermissionGroups `json:"groups"` + Status string `json:"status"` + Groups []GetCorporateUserPermissionGroups `json:"groups"` FeatureAccess *GetCorporateUserPermissionFeatureAccess `json:"feature_access"` } diff --git a/lib/model_get_corporate_user_permission_feature_access.go b/lib/model_get_corporate_user_permission_feature_access.go index 425a9dd..4a96219 100644 --- a/lib/model_get_corporate_user_permission_feature_access.go +++ b/lib/model_get_corporate_user_permission_feature_access.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Granular feature permissions given to the user. type GetCorporateUserPermissionFeatureAccess struct { diff --git a/lib/model_get_corporate_user_permission_groups.go b/lib/model_get_corporate_user_permission_groups.go index 1fac6ce..6ebfd10 100644 --- a/lib/model_get_corporate_user_permission_groups.go +++ b/lib/model_get_corporate_user_permission_groups.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Groups details type GetCorporateUserPermissionGroups struct { diff --git a/lib/model_get_coupon_collection.go b/lib/model_get_coupon_collection.go index 958bbe2..1395ca6 100644 --- a/lib/model_get_coupon_collection.go +++ b/lib/model_get_coupon_collection.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_get_device_browser_stats.go b/lib/model_get_device_browser_stats.go index 5b12aee..09e53bc 100644 --- a/lib/model_get_device_browser_stats.go +++ b/lib/model_get_device_browser_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetDeviceBrowserStats struct { // Number of total clicks for the campaign using the particular browser diff --git a/lib/model_get_domain_configuration_model.go b/lib/model_get_domain_configuration_model.go index 694b250..c559576 100644 --- a/lib/model_get_domain_configuration_model.go +++ b/lib/model_get_domain_configuration_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetDomainConfigurationModel struct { // Domain @@ -16,6 +16,6 @@ type GetDomainConfigurationModel struct { // Status of domain verification (true=verified, false=non verified) Verified bool `json:"verified"` // Status of domain authentication (true=authenticated, false=non authenticated) - Authenticated bool `json:"authenticated"` - DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"` + Authenticated bool `json:"authenticated"` + DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"` } diff --git a/lib/model_get_domains_list.go b/lib/model_get_domains_list.go index fc9a615..7255f74 100644 --- a/lib/model_get_domains_list.go +++ b/lib/model_get_domains_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetDomainsList struct { // List of the domains available in your account diff --git a/lib/model_get_domains_list_domains.go b/lib/model_get_domains_list_domains.go index 04dd5bb..f61e0cf 100644 --- a/lib/model_get_domains_list_domains.go +++ b/lib/model_get_domains_list_domains.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetDomainsListDomains struct { // Id of the domain diff --git a/lib/model_get_email_campaign.go b/lib/model_get_email_campaign.go index 12af4a4..581e28e 100644 --- a/lib/model_get_email_campaign.go +++ b/lib/model_get_email_campaign.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetEmailCampaign struct { // ID of the campaign diff --git a/lib/model_get_email_campaigns.go b/lib/model_get_email_campaigns.go index 1116f36..b883587 100644 --- a/lib/model_get_email_campaigns.go +++ b/lib/model_get_email_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetEmailCampaigns struct { Campaigns []interface{} `json:"campaigns,omitempty"` diff --git a/lib/model_get_email_event_report.go b/lib/model_get_email_event_report.go index 5dd9b1f..b58a559 100644 --- a/lib/model_get_email_event_report.go +++ b/lib/model_get_email_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetEmailEventReport struct { Events []GetEmailEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_email_event_report_events.go b/lib/model_get_email_event_report_events.go index b0b5945..c1c8e76 100644 --- a/lib/model_get_email_event_report_events.go +++ b/lib/model_get_email_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetEmailEventReportEvents struct { // Email address which generates the event diff --git a/lib/model_get_extended_campaign_overview.go b/lib/model_get_extended_campaign_overview.go index b0f1527..eca4207 100644 --- a/lib/model_get_extended_campaign_overview.go +++ b/lib/model_get_extended_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedCampaignOverview struct { // ID of the campaign @@ -52,7 +52,7 @@ type GetExtendedCampaignOverview struct { // Header of the campaign Header string `json:"header"` // Footer of the campaign - Footer string `json:"footer"` + Footer string `json:"footer"` Sender *GetExtendedCampaignOverviewSender `json:"sender"` // Email defined as the \"Reply to\" of the campaign ReplyTo string `json:"replyTo"` diff --git a/lib/model_get_extended_campaign_overview_sender.go b/lib/model_get_extended_campaign_overview_sender.go index 1eb74f8..1583e4f 100644 --- a/lib/model_get_extended_campaign_overview_sender.go +++ b/lib/model_get_extended_campaign_overview_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedCampaignOverviewSender struct { // Sender name of the campaign diff --git a/lib/model_get_extended_campaign_stats.go b/lib/model_get_extended_campaign_stats.go index 75415c4..ba41d23 100644 --- a/lib/model_get_extended_campaign_stats.go +++ b/lib/model_get_extended_campaign_stats.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedCampaignStats struct { // Overall statistics of the campaign diff --git a/lib/model_get_extended_client.go b/lib/model_get_extended_client.go index 56a54e9..676c134 100644 --- a/lib/model_get_extended_client.go +++ b/lib/model_get_extended_client.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedClient struct { // Login Email @@ -18,6 +18,6 @@ type GetExtendedClient struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Address *GetExtendedClientAddress `json:"address"` + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` } diff --git a/lib/model_get_extended_client_address.go b/lib/model_get_extended_client_address.go index 84c734c..b58e959 100644 --- a/lib/model_get_extended_client_address.go +++ b/lib/model_get_extended_client_address.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Address informations type GetExtendedClientAddress struct { diff --git a/lib/model_get_extended_contact_details.go b/lib/model_get_extended_contact_details.go index 8a28171..3daffbc 100644 --- a/lib/model_get_extended_contact_details.go +++ b/lib/model_get_extended_contact_details.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetails struct { // Email address of the contact for which you requested the details diff --git a/lib/model_get_extended_contact_details_statistics.go b/lib/model_get_extended_contact_details_statistics.go index 0dcc253..10e8f37 100644 --- a/lib/model_get_extended_contact_details_statistics.go +++ b/lib/model_get_extended_contact_details_statistics.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Campaign statistics of the contact type GetExtendedContactDetailsStatistics struct { @@ -19,7 +19,7 @@ type GetExtendedContactDetailsStatistics struct { // Listing of the softbounes generated by the contact SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` // Listing of the complaints generated by the contact - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` Unsubscriptions *GetExtendedContactDetailsStatisticsUnsubscriptions `json:"unsubscriptions,omitempty"` // Listing of the openings generated by the contact Opened []GetExtendedContactDetailsStatisticsOpened `json:"opened,omitempty"` diff --git a/lib/model_get_extended_contact_details_statistics_clicked.go b/lib/model_get_extended_contact_details_statistics_clicked.go index 4b9be39..ea0ba94 100644 --- a/lib/model_get_extended_contact_details_statistics_clicked.go +++ b/lib/model_get_extended_contact_details_statistics_clicked.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsClicked struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_delivered.go b/lib/model_get_extended_contact_details_statistics_delivered.go index 4e9ec16..5495316 100644 --- a/lib/model_get_extended_contact_details_statistics_delivered.go +++ b/lib/model_get_extended_contact_details_statistics_delivered.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsDelivered struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_links.go b/lib/model_get_extended_contact_details_statistics_links.go index 69b46af..155788f 100644 --- a/lib/model_get_extended_contact_details_statistics_links.go +++ b/lib/model_get_extended_contact_details_statistics_links.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsLinks struct { // Number of clicks on this link for the campaign diff --git a/lib/model_get_extended_contact_details_statistics_messages_sent.go b/lib/model_get_extended_contact_details_statistics_messages_sent.go index a742d81..cd3ae30 100644 --- a/lib/model_get_extended_contact_details_statistics_messages_sent.go +++ b/lib/model_get_extended_contact_details_statistics_messages_sent.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsMessagesSent struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_opened.go b/lib/model_get_extended_contact_details_statistics_opened.go index 315fd43..54898bb 100644 --- a/lib/model_get_extended_contact_details_statistics_opened.go +++ b/lib/model_get_extended_contact_details_statistics_opened.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsOpened struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go index 6682be7..84d2858 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Listing of the unsubscription for the contact type GetExtendedContactDetailsStatisticsUnsubscriptions struct { diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go index e7cc382..1a7ec2d 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription struct { // UTC date-time of the event diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go index 002d910..8df417d 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription struct { // ID of the campaign which generated the event diff --git a/lib/model_get_extended_list.go b/lib/model_get_extended_list.go index 93096b6..e2a402c 100644 --- a/lib/model_get_extended_list.go +++ b/lib/model_get_extended_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedList struct { // ID of the list @@ -24,7 +24,7 @@ type GetExtendedList struct { // ID of the folder FolderId int64 `json:"folderId"` // Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` + CreatedAt string `json:"createdAt"` CampaignStats []GetExtendedListCampaignStats `json:"campaignStats,omitempty"` // Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) DynamicList bool `json:"dynamicList,omitempty"` diff --git a/lib/model_get_extended_list_campaign_stats.go b/lib/model_get_extended_list_campaign_stats.go index 1f11612..64dd8de 100644 --- a/lib/model_get_extended_list_campaign_stats.go +++ b/lib/model_get_extended_list_campaign_stats.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExtendedListCampaignStats struct { // ID of the campaign - CampaignId int64 `json:"campaignId"` - Stats *GetCampaignStats `json:"stats"` + CampaignId int64 `json:"campaignId"` + Stats *GetCampaignStats `json:"stats"` } diff --git a/lib/model_get_external_feed_by_uuid.go b/lib/model_get_external_feed_by_uuid.go index a1e75b8..d6a6a1c 100644 --- a/lib/model_get_external_feed_by_uuid.go +++ b/lib/model_get_external_feed_by_uuid.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" @@ -21,7 +21,7 @@ type GetExternalFeedByUuid struct { Name string `json:"name"` // URL of the feed Url string `json:"url"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_get_external_feed_by_uuid_headers.go b/lib/model_get_external_feed_by_uuid_headers.go index 2b51a49..95377ba 100644 --- a/lib/model_get_external_feed_by_uuid_headers.go +++ b/lib/model_get_external_feed_by_uuid_headers.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetExternalFeedByUuidHeaders struct { // Name of the header diff --git a/lib/model_get_folder.go b/lib/model_get_folder.go index f5e9fc5..59366fa 100644 --- a/lib/model_get_folder.go +++ b/lib/model_get_folder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetFolder struct { // ID of the folder diff --git a/lib/model_get_folder_lists.go b/lib/model_get_folder_lists.go index c3e55bf..2aec4d1 100644 --- a/lib/model_get_folder_lists.go +++ b/lib/model_get_folder_lists.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetFolderLists struct { Lists []interface{} `json:"lists,omitempty"` diff --git a/lib/model_get_folders.go b/lib/model_get_folders.go index 79320f7..7f452f9 100644 --- a/lib/model_get_folders.go +++ b/lib/model_get_folders.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetFolders struct { Folders []interface{} `json:"folders,omitempty"` diff --git a/lib/model_get_inbound_email_events.go b/lib/model_get_inbound_email_events.go index b001115..ce0acfb 100644 --- a/lib/model_get_inbound_email_events.go +++ b/lib/model_get_inbound_email_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetInboundEmailEvents struct { Events []GetInboundEmailEventsEvents `json:"events,omitempty"` diff --git a/lib/model_get_inbound_email_events_by_uuid.go b/lib/model_get_inbound_email_events_by_uuid.go index c0f2f2a..cbb57b1 100644 --- a/lib/model_get_inbound_email_events_by_uuid.go +++ b/lib/model_get_inbound_email_events_by_uuid.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" @@ -25,7 +25,7 @@ type GetInboundEmailEventsByUuid struct { Sender string `json:"sender,omitempty"` // Value of the Message-ID header. This will be present only after the processing is done. MessageId string `json:"messageId,omitempty"` - // Value of the Subject header. This will be present only after the processing is done. + // Value of the Subject header. This will be present only after the processing is done. Subject string `json:"subject,omitempty"` // List of attachments of the email. This will be present only after the processing is done. Attachments []GetInboundEmailEventsByUuidAttachments `json:"attachments,omitempty"` diff --git a/lib/model_get_inbound_email_events_by_uuid_attachments.go b/lib/model_get_inbound_email_events_by_uuid_attachments.go index a0ad759..51c7197 100644 --- a/lib/model_get_inbound_email_events_by_uuid_attachments.go +++ b/lib/model_get_inbound_email_events_by_uuid_attachments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetInboundEmailEventsByUuidAttachments struct { // filename specified in the Content-Disposition header of the attachment diff --git a/lib/model_get_inbound_email_events_by_uuid_logs.go b/lib/model_get_inbound_email_events_by_uuid_logs.go index 0ae0469..50536ae 100644 --- a/lib/model_get_inbound_email_events_by_uuid_logs.go +++ b/lib/model_get_inbound_email_events_by_uuid_logs.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_get_inbound_email_events_events.go b/lib/model_get_inbound_email_events_events.go index eecfc5a..a86c0e1 100644 --- a/lib/model_get_inbound_email_events_events.go +++ b/lib/model_get_inbound_email_events_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_get_invited_users_list.go b/lib/model_get_invited_users_list.go index eb9367f..df88e18 100644 --- a/lib/model_get_invited_users_list.go +++ b/lib/model_get_invited_users_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetInvitedUsersList struct { // Get invited users list diff --git a/lib/model_get_invited_users_list_feature_access.go b/lib/model_get_invited_users_list_feature_access.go index a3ce540..0ddead0 100644 --- a/lib/model_get_invited_users_list_feature_access.go +++ b/lib/model_get_invited_users_list_feature_access.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Feature accessiblity given to the user. type GetInvitedUsersListFeatureAccess struct { diff --git a/lib/model_get_invited_users_list_users.go b/lib/model_get_invited_users_list_users.go index 95f40d3..d94ffcf 100644 --- a/lib/model_get_invited_users_list_users.go +++ b/lib/model_get_invited_users_list_users.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetInvitedUsersListUsers struct { // Email address of the user. @@ -16,6 +16,6 @@ type GetInvitedUsersListUsers struct { // Flag for indicating is user owner of the organization. IsOwner string `json:"is_owner"` // Status of the invited user. - Status string `json:"status"` + Status string `json:"status"` FeatureAccess *GetInvitedUsersListFeatureAccess `json:"feature_access"` } diff --git a/lib/model_get_ip.go b/lib/model_get_ip.go index b74311f..5dd1a97 100644 --- a/lib/model_get_ip.go +++ b/lib/model_get_ip.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetIp struct { // ID of the dedicated IP diff --git a/lib/model_get_ip_from_sender.go b/lib/model_get_ip_from_sender.go index 4be45a0..4924628 100644 --- a/lib/model_get_ip_from_sender.go +++ b/lib/model_get_ip_from_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetIpFromSender struct { // ID of the dedicated IP diff --git a/lib/model_get_ips.go b/lib/model_get_ips.go index 29a9175..fe4f77b 100644 --- a/lib/model_get_ips.go +++ b/lib/model_get_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetIps struct { // Dedicated IP(s) available on your account diff --git a/lib/model_get_ips_from_sender.go b/lib/model_get_ips_from_sender.go index fc8a518..764031f 100644 --- a/lib/model_get_ips_from_sender.go +++ b/lib/model_get_ips_from_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetIpsFromSender struct { // Dedicated IP(s) linked to a sender diff --git a/lib/model_get_list.go b/lib/model_get_list.go index 7e0249c..c53aa8f 100644 --- a/lib/model_get_list.go +++ b/lib/model_get_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetList struct { // ID of the list diff --git a/lib/model_get_lists.go b/lib/model_get_lists.go index c40a61a..667ccae 100644 --- a/lib/model_get_lists.go +++ b/lib/model_get_lists.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetLists struct { // Listing of all the lists available in your account diff --git a/lib/model_get_orders.go b/lib/model_get_orders.go index ce778fa..2d02e6d 100644 --- a/lib/model_get_orders.go +++ b/lib/model_get_orders.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetOrders struct { Orders []interface{} `json:"orders,omitempty"` diff --git a/lib/model_get_payment_request.go b/lib/model_get_payment_request.go index 32ce7b5..89aa681 100644 --- a/lib/model_get_payment_request.go +++ b/lib/model_get_payment_request.go @@ -1,25 +1,25 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetPaymentRequest struct { - // Reference of the payment request, it will appear on the payment page. + // Reference of the payment request, it will appear on the payment page. Reference string `json:"reference"` // Status of the payment request. - Status string `json:"status"` + Status string `json:"status"` Configuration *Configuration `json:"configuration,omitempty"` - // Brevo ID of the contact requested to pay. + // Brevo ID of the contact requested to pay. ContactId int64 `json:"contactId,omitempty"` - // number of reminders sent. - NumberOfRemindersSent int64 `json:"numberOfRemindersSent,omitempty"` - Cart *Cart `json:"cart"` - Notification *Notification `json:"notification"` + // number of reminders sent. + NumberOfRemindersSent int64 `json:"numberOfRemindersSent,omitempty"` + Cart *Cart `json:"cart"` + Notification *Notification `json:"notification"` } diff --git a/lib/model_get_process.go b/lib/model_get_process.go index b101c78..4945f40 100644 --- a/lib/model_get_process.go +++ b/lib/model_get_process.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetProcess struct { // Id of the process diff --git a/lib/model_get_processes.go b/lib/model_get_processes.go index 82cca3e..59bb4e8 100644 --- a/lib/model_get_processes.go +++ b/lib/model_get_processes.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetProcesses struct { // List of processes available on your account diff --git a/lib/model_get_product_details.go b/lib/model_get_product_details.go index 0b51ebe..7a60a82 100644 --- a/lib/model_get_product_details.go +++ b/lib/model_get_product_details.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetProductDetails struct { // Product ID for which you requested the details diff --git a/lib/model_get_products.go b/lib/model_get_products.go index 5a6f206..1e4ed09 100644 --- a/lib/model_get_products.go +++ b/lib/model_get_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetProducts struct { Products []interface{} `json:"products"` diff --git a/lib/model_get_reports.go b/lib/model_get_reports.go index 0949d14..2fb8ff4 100644 --- a/lib/model_get_reports.go +++ b/lib/model_get_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetReports struct { Reports []GetReportsReports `json:"reports,omitempty"` diff --git a/lib/model_get_reports_reports.go b/lib/model_get_reports_reports.go index 5d690b9..8ee084a 100644 --- a/lib/model_get_reports_reports.go +++ b/lib/model_get_reports_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetReportsReports struct { // Date of the statistics diff --git a/lib/model_get_scheduled_email_by_batch_id.go b/lib/model_get_scheduled_email_by_batch_id.go index 4482949..da30e91 100644 --- a/lib/model_get_scheduled_email_by_batch_id.go +++ b/lib/model_get_scheduled_email_by_batch_id.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetScheduledEmailByBatchId struct { // Total number of batches - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` Batches []GetScheduledEmailByBatchIdBatches `json:"batches,omitempty"` } diff --git a/lib/model_get_scheduled_email_by_batch_id_batches.go b/lib/model_get_scheduled_email_by_batch_id_batches.go index 321231f..6aab8ee 100644 --- a/lib/model_get_scheduled_email_by_batch_id_batches.go +++ b/lib/model_get_scheduled_email_by_batch_id_batches.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_get_scheduled_email_by_message_id.go b/lib/model_get_scheduled_email_by_message_id.go index 96ce619..076f09d 100644 --- a/lib/model_get_scheduled_email_by_message_id.go +++ b/lib/model_get_scheduled_email_by_message_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_get_segments.go b/lib/model_get_segments.go index ca2c1e3..2d41b7e 100644 --- a/lib/model_get_segments.go +++ b/lib/model_get_segments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSegments struct { Segments *GetSegmentsSegments `json:"segments,omitempty"` diff --git a/lib/model_get_segments_segments.go b/lib/model_get_segments_segments.go index 1505410..a6e27a3 100644 --- a/lib/model_get_segments_segments.go +++ b/lib/model_get_segments_segments.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSegmentsSegments struct { // ID of the list diff --git a/lib/model_get_senders_list.go b/lib/model_get_senders_list.go index 803e50a..63601e7 100644 --- a/lib/model_get_senders_list.go +++ b/lib/model_get_senders_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSendersList struct { // List of the senders available in your account diff --git a/lib/model_get_senders_list_ips.go b/lib/model_get_senders_list_ips.go index 927b31d..01feb32 100644 --- a/lib/model_get_senders_list_ips.go +++ b/lib/model_get_senders_list_ips.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSendersListIps struct { // Dedicated IP available in your account diff --git a/lib/model_get_senders_list_senders.go b/lib/model_get_senders_list_senders.go index 0728a54..27b5808 100644 --- a/lib/model_get_senders_list_senders.go +++ b/lib/model_get_senders_list_senders.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSendersListSenders struct { // Id of the sender diff --git a/lib/model_get_shared_template_url.go b/lib/model_get_shared_template_url.go index f039899..b75ebaa 100644 --- a/lib/model_get_shared_template_url.go +++ b/lib/model_get_shared_template_url.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSharedTemplateUrl struct { // A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. diff --git a/lib/model_get_sms_campaign.go b/lib/model_get_sms_campaign.go index 7b691bf..135681f 100644 --- a/lib/model_get_sms_campaign.go +++ b/lib/model_get_sms_campaign.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsCampaign struct { // ID of the SMS Campaign diff --git a/lib/model_get_sms_campaign_overview.go b/lib/model_get_sms_campaign_overview.go index 30ae7ee..dd415cc 100644 --- a/lib/model_get_sms_campaign_overview.go +++ b/lib/model_get_sms_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsCampaignOverview struct { // ID of the SMS Campaign diff --git a/lib/model_get_sms_campaign_stats.go b/lib/model_get_sms_campaign_stats.go index 63369ca..d315d6a 100644 --- a/lib/model_get_sms_campaign_stats.go +++ b/lib/model_get_sms_campaign_stats.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsCampaignStats struct { // Number of delivered SMS diff --git a/lib/model_get_sms_campaigns.go b/lib/model_get_sms_campaigns.go index 85bf3f3..443d404 100644 --- a/lib/model_get_sms_campaigns.go +++ b/lib/model_get_sms_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsCampaigns struct { Campaigns []interface{} `json:"campaigns,omitempty"` diff --git a/lib/model_get_sms_event_report.go b/lib/model_get_sms_event_report.go index 825b4df..baa4b22 100644 --- a/lib/model_get_sms_event_report.go +++ b/lib/model_get_sms_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsEventReport struct { Events []GetSmsEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_sms_event_report_events.go b/lib/model_get_sms_event_report_events.go index d31404b..c442e21 100644 --- a/lib/model_get_sms_event_report_events.go +++ b/lib/model_get_sms_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmsEventReportEvents struct { // Phone number which has generated the event @@ -21,7 +21,7 @@ type GetSmsEventReportEvents struct { Event string `json:"event,omitempty"` // Reason of bounce (only available if the event is hardbounce or softbounce) Reason string `json:"reason,omitempty"` - Reply string `json:"reply,omitempty"` + Reply string `json:"reply,omitempty"` // Tag of the SMS which generated the event Tag string `json:"tag,omitempty"` } diff --git a/lib/model_get_smtp_template_overview.go b/lib/model_get_smtp_template_overview.go index a6f548a..8c718e6 100644 --- a/lib/model_get_smtp_template_overview.go +++ b/lib/model_get_smtp_template_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmtpTemplateOverview struct { // ID of the template @@ -20,8 +20,8 @@ type GetSmtpTemplateOverview struct { // Status of template (true=active, false=inactive) IsActive bool `json:"isActive"` // Status of test sending for the template (true=test email has been sent, false=test email has not been sent) - TestSent bool `json:"testSent"` - Sender *GetSmtpTemplateOverviewSender `json:"sender"` + TestSent bool `json:"testSent"` + Sender *GetSmtpTemplateOverviewSender `json:"sender"` // Email defined as the \"Reply to\" for the template ReplyTo string `json:"replyTo"` // Customisation of the \"to\" field for the template diff --git a/lib/model_get_smtp_template_overview_sender.go b/lib/model_get_smtp_template_overview_sender.go index b6e2049..592a27e 100644 --- a/lib/model_get_smtp_template_overview_sender.go +++ b/lib/model_get_smtp_template_overview_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmtpTemplateOverviewSender struct { // From email for the template diff --git a/lib/model_get_smtp_templates.go b/lib/model_get_smtp_templates.go index 718c846..3346598 100644 --- a/lib/model_get_smtp_templates.go +++ b/lib/model_get_smtp_templates.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSmtpTemplates struct { // Count of transactional email templates - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Templates []GetSmtpTemplateOverview `json:"templates,omitempty"` } diff --git a/lib/model_get_sso_token.go b/lib/model_get_sso_token.go index b91f6ff..7993e8b 100644 --- a/lib/model_get_sso_token.go +++ b/lib/model_get_sso_token.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetSsoToken struct { // Session token, it will remain valid for 15 days. diff --git a/lib/model_get_stats_by_browser.go b/lib/model_get_stats_by_browser.go index 81882b1..00d9c1d 100644 --- a/lib/model_get_stats_by_browser.go +++ b/lib/model_get_stats_by_browser.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetStatsByBrowser struct { } diff --git a/lib/model_get_stats_by_device.go b/lib/model_get_stats_by_device.go index a9f07bd..9d05f7e 100644 --- a/lib/model_get_stats_by_device.go +++ b/lib/model_get_stats_by_device.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetStatsByDevice struct { // Statistics of the campaign on the basis of desktop devices diff --git a/lib/model_get_stats_by_domain.go b/lib/model_get_stats_by_domain.go index 029e8e5..639c290 100644 --- a/lib/model_get_stats_by_domain.go +++ b/lib/model_get_stats_by_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetStatsByDomain struct { } diff --git a/lib/model_get_transac_aggregated_sms_report.go b/lib/model_get_transac_aggregated_sms_report.go index ab40dba..2dae503 100644 --- a/lib/model_get_transac_aggregated_sms_report.go +++ b/lib/model_get_transac_aggregated_sms_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacAggregatedSmsReport struct { // Time frame of the report diff --git a/lib/model_get_transac_blocked_contacts.go b/lib/model_get_transac_blocked_contacts.go index aa3d250..7ee0a9e 100644 --- a/lib/model_get_transac_blocked_contacts.go +++ b/lib/model_get_transac_blocked_contacts.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacBlockedContacts struct { // Count of blocked or unsubscribed contact - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Contacts []GetTransacBlockedContactsContacts `json:"contacts,omitempty"` } diff --git a/lib/model_get_transac_blocked_contacts_contacts.go b/lib/model_get_transac_blocked_contacts_contacts.go index 29aacc1..843975f 100644 --- a/lib/model_get_transac_blocked_contacts_contacts.go +++ b/lib/model_get_transac_blocked_contacts_contacts.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacBlockedContactsContacts struct { // Email address of the blocked or unsubscribed contact Email string `json:"email"` // Sender email address of the blocked or unsubscribed contact - SenderEmail string `json:"senderEmail"` - Reason *GetTransacBlockedContactsReason `json:"reason"` + SenderEmail string `json:"senderEmail"` + Reason *GetTransacBlockedContactsReason `json:"reason"` // Date when the contact was blocked or unsubscribed on BlockedAt string `json:"blockedAt"` } diff --git a/lib/model_get_transac_blocked_contacts_reason.go b/lib/model_get_transac_blocked_contacts_reason.go index d054287..5aac5f1 100644 --- a/lib/model_get_transac_blocked_contacts_reason.go +++ b/lib/model_get_transac_blocked_contacts_reason.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Reason for blocking / unsubscribing type GetTransacBlockedContactsReason struct { diff --git a/lib/model_get_transac_email_content.go b/lib/model_get_transac_email_content.go index 7d1a5bc..99d19f4 100644 --- a/lib/model_get_transac_email_content.go +++ b/lib/model_get_transac_email_content.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacEmailContent struct { // Email address to which transactional email has been sent diff --git a/lib/model_get_transac_email_content_events.go b/lib/model_get_transac_email_content_events.go index 273b493..98f8f00 100644 --- a/lib/model_get_transac_email_content_events.go +++ b/lib/model_get_transac_email_content_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacEmailContentEvents struct { // Name of the event that occurred on the sent email diff --git a/lib/model_get_transac_emails_list.go b/lib/model_get_transac_emails_list.go index b69ff28..3ecddb7 100644 --- a/lib/model_get_transac_emails_list.go +++ b/lib/model_get_transac_emails_list.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacEmailsList struct { // Total number of transactional emails available on your account according to the passed filter - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` TransactionalEmails []GetTransacEmailsListTransactionalEmails `json:"transactionalEmails,omitempty"` } diff --git a/lib/model_get_transac_emails_list_transactional_emails.go b/lib/model_get_transac_emails_list_transactional_emails.go index 46b08b6..a83d19c 100644 --- a/lib/model_get_transac_emails_list_transactional_emails.go +++ b/lib/model_get_transac_emails_list_transactional_emails.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacEmailsListTransactionalEmails struct { // Email address to which transactional email has been sent diff --git a/lib/model_get_transac_sms_report.go b/lib/model_get_transac_sms_report.go index 6159a19..7570348 100644 --- a/lib/model_get_transac_sms_report.go +++ b/lib/model_get_transac_sms_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacSmsReport struct { Reports []GetTransacSmsReportReports `json:"reports,omitempty"` diff --git a/lib/model_get_transac_sms_report_reports.go b/lib/model_get_transac_sms_report_reports.go index 3debb83..2c04dda 100644 --- a/lib/model_get_transac_sms_report_reports.go +++ b/lib/model_get_transac_sms_report_reports.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetTransacSmsReportReports struct { // Date for which statistics are retrieved diff --git a/lib/model_get_user_permission.go b/lib/model_get_user_permission.go index 5eb9082..411850d 100644 --- a/lib/model_get_user_permission.go +++ b/lib/model_get_user_permission.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Check user permission type GetUserPermission struct { diff --git a/lib/model_get_user_permission_privileges.go b/lib/model_get_user_permission_privileges.go index c69a200..6395752 100644 --- a/lib/model_get_user_permission_privileges.go +++ b/lib/model_get_user_permission_privileges.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetUserPermissionPrivileges struct { - Feature string `json:"feature"` + Feature string `json:"feature"` Permissions []string `json:"permissions"` } diff --git a/lib/model_get_wa_templates.go b/lib/model_get_wa_templates.go index 7c70bf1..e83e5c6 100644 --- a/lib/model_get_wa_templates.go +++ b/lib/model_get_wa_templates.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWaTemplates struct { Templates []GetWaTemplatesTemplates `json:"templates"` diff --git a/lib/model_get_wa_templates_templates.go b/lib/model_get_wa_templates_templates.go index c075be9..075e428 100644 --- a/lib/model_get_wa_templates_templates.go +++ b/lib/model_get_wa_templates_templates.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWaTemplatesTemplates struct { // id of the template diff --git a/lib/model_get_webhook.go b/lib/model_get_webhook.go index 836f469..93061d3 100644 --- a/lib/model_get_webhook.go +++ b/lib/model_get_webhook.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWebhook struct { // URL of the webhook @@ -16,8 +16,8 @@ type GetWebhook struct { // ID of the webhook Id int64 `json:"id"` // Description of the webhook - Description string `json:"description"` - Events []string `json:"events"` + Description string `json:"description"` + Events []string `json:"events"` // Type of webhook (marketing or transactional) Type_ string `json:"type"` // Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) @@ -25,8 +25,8 @@ type GetWebhook struct { // Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) ModifiedAt string `json:"modifiedAt"` // To send batched webhooks - Batched bool `json:"batched,omitempty"` - Auth *GetWebhookAuth `json:"auth,omitempty"` + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` // Custom headers to be send with webhooks Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_get_webhook_auth.go b/lib/model_get_webhook_auth.go index 9f5b717..f6abb62 100644 --- a/lib/model_get_webhook_auth.go +++ b/lib/model_get_webhook_auth.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Add authentication on webhook url type GetWebhookAuth struct { diff --git a/lib/model_get_webhook_headers.go b/lib/model_get_webhook_headers.go index d99d56d..82a4928 100644 --- a/lib/model_get_webhook_headers.go +++ b/lib/model_get_webhook_headers.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWebhookHeaders struct { // Header key name diff --git a/lib/model_get_webhooks.go b/lib/model_get_webhooks.go index 4e92d54..65fcf33 100644 --- a/lib/model_get_webhooks.go +++ b/lib/model_get_webhooks.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWebhooks struct { Webhooks []interface{} `json:"webhooks"` diff --git a/lib/model_get_whats_app_config.go b/lib/model_get_whats_app_config.go index 989faab..9b15f4f 100644 --- a/lib/model_get_whats_app_config.go +++ b/lib/model_get_whats_app_config.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsAppConfig struct { // Id of the WhatsApp business account diff --git a/lib/model_get_whatsapp_campaign_overview.go b/lib/model_get_whatsapp_campaign_overview.go index 4f6d8ba..e5ae210 100644 --- a/lib/model_get_whatsapp_campaign_overview.go +++ b/lib/model_get_whatsapp_campaign_overview.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsappCampaignOverview struct { // ID of the WhatsApp Campaign @@ -20,9 +20,9 @@ type GetWhatsappCampaignOverview struct { // UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format ScheduledAt string `json:"scheduledAt,omitempty"` // Sender of the WhatsApp Campaign - SenderNumber string `json:"senderNumber"` - Stats *WhatsappCampStats `json:"stats,omitempty"` - Template *WhatsappCampTemplate `json:"template"` + SenderNumber string `json:"senderNumber"` + Stats *WhatsappCampStats `json:"stats,omitempty"` + Template *WhatsappCampTemplate `json:"template"` // Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) diff --git a/lib/model_get_whatsapp_campaigns.go b/lib/model_get_whatsapp_campaigns.go index 900eb0f..9b4e5d1 100644 --- a/lib/model_get_whatsapp_campaigns.go +++ b/lib/model_get_whatsapp_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsappCampaigns struct { Campaigns []GetWhatsappCampaignsCampaigns `json:"campaigns,omitempty"` diff --git a/lib/model_get_whatsapp_campaigns_campaigns.go b/lib/model_get_whatsapp_campaigns_campaigns.go index bf10f3c..c1ae843 100644 --- a/lib/model_get_whatsapp_campaigns_campaigns.go +++ b/lib/model_get_whatsapp_campaigns_campaigns.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsappCampaignsCampaigns struct { // ID of the WhatsApp Campaign @@ -26,8 +26,8 @@ type GetWhatsappCampaignsCampaigns struct { // Count of invalidated contacts InvalidatedContacts int64 `json:"invalidatedContacts,omitempty"` // Read percentage of the the WhatsApp campaign created - ReadPercentage float32 `json:"readPercentage,omitempty"` - Stats *WhatsappCampStats `json:"stats,omitempty"` + ReadPercentage float32 `json:"readPercentage,omitempty"` + Stats *WhatsappCampStats `json:"stats,omitempty"` // Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ) diff --git a/lib/model_get_whatsapp_event_report.go b/lib/model_get_whatsapp_event_report.go index 1fd4e24..5276072 100644 --- a/lib/model_get_whatsapp_event_report.go +++ b/lib/model_get_whatsapp_event_report.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsappEventReport struct { Events []GetWhatsappEventReportEvents `json:"events,omitempty"` diff --git a/lib/model_get_whatsapp_event_report_events.go b/lib/model_get_whatsapp_event_report_events.go index e226927..5d1c0bd 100644 --- a/lib/model_get_whatsapp_event_report_events.go +++ b/lib/model_get_whatsapp_event_report_events.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type GetWhatsappEventReportEvents struct { // WhatsApp Number with country code. Example, 85264318721 diff --git a/lib/model_inline_response_200.go b/lib/model_inline_response_200.go index c0c7d9a..4294c5f 100644 --- a/lib/model_inline_response_200.go +++ b/lib/model_inline_response_200.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse200 struct { Message string `json:"message,omitempty"` diff --git a/lib/model_inline_response_200_1.go b/lib/model_inline_response_200_1.go index 002c099..2d16707 100644 --- a/lib/model_inline_response_200_1.go +++ b/lib/model_inline_response_200_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2001 struct { // Unique id of the group diff --git a/lib/model_inline_response_200_2.go b/lib/model_inline_response_200_2.go index b0ea723..3a87853 100644 --- a/lib/model_inline_response_200_2.go +++ b/lib/model_inline_response_200_2.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Created company id type InlineResponse2002 struct { diff --git a/lib/model_inline_response_200_3.go b/lib/model_inline_response_200_3.go index 940939a..aff3b6d 100644 --- a/lib/model_inline_response_200_3.go +++ b/lib/model_inline_response_200_3.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2003 struct { // The ID of the import process diff --git a/lib/model_inline_response_200_4.go b/lib/model_inline_response_200_4.go index f8519cc..40824eb 100644 --- a/lib/model_inline_response_200_4.go +++ b/lib/model_inline_response_200_4.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2004 struct { // ISO 4217 compliant display currency code diff --git a/lib/model_inline_response_200_5.go b/lib/model_inline_response_200_5.go index d386e43..807dced 100644 --- a/lib/model_inline_response_200_5.go +++ b/lib/model_inline_response_200_5.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2005 struct { // List of conversion attribution metrics Results []ConversionSourceMetrics `json:"results"` - Totals *InlineResponse2005Totals `json:"totals"` + Totals *InlineResponse2005Totals `json:"totals"` } diff --git a/lib/model_inline_response_200_5_totals.go b/lib/model_inline_response_200_5_totals.go index c80987d..92b19f1 100644 --- a/lib/model_inline_response_200_5_totals.go +++ b/lib/model_inline_response_200_5_totals.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Attribution list aggregated totals type InlineResponse2005Totals struct { - OrdersCount float32 `json:"ordersCount"` - Revenue float32 `json:"revenue"` + OrdersCount float32 `json:"ordersCount"` + Revenue float32 `json:"revenue"` AverageBasket float32 `json:"averageBasket"` } diff --git a/lib/model_inline_response_200_6.go b/lib/model_inline_response_200_6.go index bc81359..2facec6 100644 --- a/lib/model_inline_response_200_6.go +++ b/lib/model_inline_response_200_6.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2006 struct { ConversionSourceMetrics *ConversionSourceMetrics `json:"ConversionSourceMetrics,omitempty"` - NewCustomersCount float32 `json:"newCustomersCount"` + NewCustomersCount float32 `json:"newCustomersCount"` } diff --git a/lib/model_inline_response_200_7.go b/lib/model_inline_response_200_7.go index aa21df5..b674576 100644 --- a/lib/model_inline_response_200_7.go +++ b/lib/model_inline_response_200_7.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2007 struct { // List of attributed products diff --git a/lib/model_inline_response_200_8.go b/lib/model_inline_response_200_8.go index eb0ca7f..08c7628 100644 --- a/lib/model_inline_response_200_8.go +++ b/lib/model_inline_response_200_8.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2008 struct { // The id of the collection diff --git a/lib/model_inline_response_201.go b/lib/model_inline_response_201.go index fd228ea..aa82c8b 100644 --- a/lib/model_inline_response_201.go +++ b/lib/model_inline_response_201.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse201 struct { Id string `json:"id,omitempty"` diff --git a/lib/model_inline_response_201_1.go b/lib/model_inline_response_201_1.go index d4ea1de..a276a9a 100644 --- a/lib/model_inline_response_201_1.go +++ b/lib/model_inline_response_201_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Created deal id type InlineResponse2011 struct { diff --git a/lib/model_inline_response_201_2.go b/lib/model_inline_response_201_2.go index 0716696..b33a0a0 100644 --- a/lib/model_inline_response_201_2.go +++ b/lib/model_inline_response_201_2.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Task Details type InlineResponse2012 struct { diff --git a/lib/model_inline_response_201_3.go b/lib/model_inline_response_201_3.go index 8b1ad48..7d556f6 100644 --- a/lib/model_inline_response_201_3.go +++ b/lib/model_inline_response_201_3.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2013 struct { // The id of the created collection diff --git a/lib/model_inline_response_201_4.go b/lib/model_inline_response_201_4.go index 99b1a08..8a90a33 100644 --- a/lib/model_inline_response_201_4.go +++ b/lib/model_inline_response_201_4.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2014 struct { // messageId of sent message diff --git a/lib/model_inline_response_201_5.go b/lib/model_inline_response_201_5.go index 51aa964..58d2282 100644 --- a/lib/model_inline_response_201_5.go +++ b/lib/model_inline_response_201_5.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse2015 struct { // ID of the object created diff --git a/lib/model_inline_response_400.go b/lib/model_inline_response_400.go index 3332ad8..8f27c33 100644 --- a/lib/model_inline_response_400.go +++ b/lib/model_inline_response_400.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InlineResponse400 struct { Message string `json:"message,omitempty"` diff --git a/lib/model_invite_admin_user.go b/lib/model_invite_admin_user.go index c1b88c8..bfacd4a 100644 --- a/lib/model_invite_admin_user.go +++ b/lib/model_invite_admin_user.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type InviteAdminUser struct { // Email address for the organization @@ -16,6 +16,6 @@ type InviteAdminUser struct { // All access to the features AllFeaturesAccess bool `json:"all_features_access"` // Ids of Group - GroupIds []string `json:"groupIds,omitempty"` + GroupIds []string `json:"groupIds,omitempty"` Privileges []InviteAdminUserPrivileges `json:"privileges"` } diff --git a/lib/model_invite_admin_user_privileges.go b/lib/model_invite_admin_user_privileges.go index 49b592b..6263cfb 100644 --- a/lib/model_invite_admin_user_privileges.go +++ b/lib/model_invite_admin_user_privileges.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Privileges given to the user type InviteAdminUserPrivileges struct { diff --git a/lib/model_inviteuser.go b/lib/model_inviteuser.go index 011b405..8910c59 100644 --- a/lib/model_inviteuser.go +++ b/lib/model_inviteuser.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Inviteuser struct { // Email address for the organization Email string `json:"email"` // All access to the features - AllFeaturesAccess bool `json:"all_features_access"` - Privileges []InviteuserPrivileges `json:"privileges"` + AllFeaturesAccess bool `json:"all_features_access"` + Privileges []InviteuserPrivileges `json:"privileges"` } diff --git a/lib/model_inviteuser_privileges.go b/lib/model_inviteuser_privileges.go index e3748d8..e0701b8 100644 --- a/lib/model_inviteuser_privileges.go +++ b/lib/model_inviteuser_privileges.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Privileges given to the user type InviteuserPrivileges struct { diff --git a/lib/model_manage_ip.go b/lib/model_manage_ip.go index 67e3b29..b85369e 100644 --- a/lib/model_manage_ip.go +++ b/lib/model_manage_ip.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ManageIp struct { // Dedicated ID diff --git a/lib/model_master_details_response.go b/lib/model_master_details_response.go index 6576675..2564247 100644 --- a/lib/model_master_details_response.go +++ b/lib/model_master_details_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type MasterDetailsResponse struct { // Email id of master account @@ -20,7 +20,7 @@ type MasterDetailsResponse struct { // Currency code of the master account organization CurrencyCode string `json:"currencyCode,omitempty"` // Timezone of the master account organization - Timezone string `json:"timezone,omitempty"` + Timezone string `json:"timezone,omitempty"` BillingInfo *MasterDetailsResponseBillingInfo `json:"billingInfo,omitempty"` - PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"` + PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"` } diff --git a/lib/model_master_details_response_billing_info.go b/lib/model_master_details_response_billing_info.go index 246039b..a1a4323 100644 --- a/lib/model_master_details_response_billing_info.go +++ b/lib/model_master_details_response_billing_info.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Billing details of the master account organization type MasterDetailsResponseBillingInfo struct { // Billing email id of master account Email string `json:"email,omitempty"` // Company name of master account - CompanyName string `json:"companyName,omitempty"` - Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"` - Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"` + CompanyName string `json:"companyName,omitempty"` + Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"` + Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"` } diff --git a/lib/model_master_details_response_billing_info_address.go b/lib/model_master_details_response_billing_info_address.go index 1568c09..4909e43 100644 --- a/lib/model_master_details_response_billing_info_address.go +++ b/lib/model_master_details_response_billing_info_address.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Billing address of master account type MasterDetailsResponseBillingInfoAddress struct { diff --git a/lib/model_master_details_response_billing_info_name.go b/lib/model_master_details_response_billing_info_name.go index 1bc9228..d919574 100644 --- a/lib/model_master_details_response_billing_info_name.go +++ b/lib/model_master_details_response_billing_info_name.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Billing name of master account holder type MasterDetailsResponseBillingInfoName struct { diff --git a/lib/model_master_details_response_plan_info.go b/lib/model_master_details_response_plan_info.go index a12f4b2..2124c0e 100644 --- a/lib/model_master_details_response_plan_info.go +++ b/lib/model_master_details_response_plan_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Plan details type MasterDetailsResponsePlanInfo struct { diff --git a/lib/model_master_details_response_plan_info_features.go b/lib/model_master_details_response_plan_info_features.go index 58e495a..ed71a4c 100644 --- a/lib/model_master_details_response_plan_info_features.go +++ b/lib/model_master_details_response_plan_info_features.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type MasterDetailsResponsePlanInfoFeatures struct { // Name of the feature diff --git a/lib/model_note.go b/lib/model_note.go index 9c449b8..2f1d533 100644 --- a/lib/model_note.go +++ b/lib/model_note.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_note_data.go b/lib/model_note_data.go index 34a28b4..c496185 100644 --- a/lib/model_note_data.go +++ b/lib/model_note_data.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Note data to be saved type NoteData struct { diff --git a/lib/model_note_id.go b/lib/model_note_id.go index 97708cb..2d3a67f 100644 --- a/lib/model_note_id.go +++ b/lib/model_note_id.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Updated Note ID type NoteId struct { diff --git a/lib/model_note_list.go b/lib/model_note_list.go index f377e37..ca4c23c 100644 --- a/lib/model_note_list.go +++ b/lib/model_note_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of notes type NoteList struct { diff --git a/lib/model_notification.go b/lib/model_notification.go index 3f77b10..346f4cf 100644 --- a/lib/model_notification.go +++ b/lib/model_notification.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib -// Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. +// Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent. type Notification struct { - // Channel used to send the notifications. + // Channel used to send the notifications. Channel string `json:"channel"` - // Use this field if you want to give more context to your contact about the payment request. + // Use this field if you want to give more context to your contact about the payment request. Text string `json:"text"` } diff --git a/lib/model_order.go b/lib/model_order.go index d4083e1..725930a 100644 --- a/lib/model_order.go +++ b/lib/model_order.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Order struct { // Unique ID of the order. @@ -22,10 +22,10 @@ type Order struct { // Total amount of the order, including all shipping expenses, tax and the price of items. Amount float32 `json:"amount"` // ID of store where the order is placed - StoreId string `json:"storeId,omitempty"` + StoreId string `json:"storeId,omitempty"` Products []OrderProducts `json:"products"` // Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. - Email string `json:"email,omitempty"` + Email string `json:"email,omitempty"` Billing *OrderBilling `json:"billing,omitempty"` // Coupons applied to the order. Stored case insensitive. Coupons []string `json:"coupons,omitempty"` diff --git a/lib/model_order_batch.go b/lib/model_order_batch.go index ac5dd95..1c7b72d 100644 --- a/lib/model_order_batch.go +++ b/lib/model_order_batch.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type OrderBatch struct { // array of order objects diff --git a/lib/model_order_billing.go b/lib/model_order_billing.go index 3a8dd9b..04a5bf3 100644 --- a/lib/model_order_billing.go +++ b/lib/model_order_billing.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Billing details of an order. type OrderBilling struct { diff --git a/lib/model_order_products.go b/lib/model_order_products.go index e42049c..6a51421 100644 --- a/lib/model_order_products.go +++ b/lib/model_order_products.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Details for the Products in an order. type OrderProducts struct { diff --git a/lib/model_otp.go b/lib/model_otp.go index 10208f7..bde9561 100644 --- a/lib/model_otp.go +++ b/lib/model_otp.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type Otp struct { // 6 digit OTP received on email diff --git a/lib/model_pipeline.go b/lib/model_pipeline.go index e970895..dce08f4 100644 --- a/lib/model_pipeline.go +++ b/lib/model_pipeline.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of stages type Pipeline struct { diff --git a/lib/model_pipeline_stage.go b/lib/model_pipeline_stage.go index b9c62c5..39aaa38 100644 --- a/lib/model_pipeline_stage.go +++ b/lib/model_pipeline_stage.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of stages type PipelineStage struct { diff --git a/lib/model_pipelines.go b/lib/model_pipelines.go index b607a08..6f81262 100644 --- a/lib/model_pipelines.go +++ b/lib/model_pipelines.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of pipeline type Pipelines struct { diff --git a/lib/model_post_contact_info.go b/lib/model_post_contact_info.go index 532bc8e..9cecc8d 100644 --- a/lib/model_post_contact_info.go +++ b/lib/model_post_contact_info.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type PostContactInfo struct { Contacts *PostContactInfoContacts `json:"contacts"` diff --git a/lib/model_post_contact_info_contacts.go b/lib/model_post_contact_info_contacts.go index 823c9a6..84ef6fc 100644 --- a/lib/model_post_contact_info_contacts.go +++ b/lib/model_post_contact_info_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type PostContactInfoContacts struct { Success []string `json:"success,omitempty"` diff --git a/lib/model_post_send_failed.go b/lib/model_post_send_failed.go index b398814..dee6736 100644 --- a/lib/model_post_send_failed.go +++ b/lib/model_post_send_failed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type PostSendFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingEmails []string `json:"unexistingEmails,omitempty"` + Message string `json:"message"` + UnexistingEmails []string `json:"unexistingEmails,omitempty"` WithoutListEmails []string `json:"withoutListEmails,omitempty"` BlackListedEmails []string `json:"blackListedEmails,omitempty"` } diff --git a/lib/model_post_send_sms_test_failed.go b/lib/model_post_send_sms_test_failed.go index 53a0031..49a5f11 100644 --- a/lib/model_post_send_sms_test_failed.go +++ b/lib/model_post_send_sms_test_failed.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type PostSendSmsTestFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingSms []string `json:"unexistingSms,omitempty"` + Message string `json:"message"` + UnexistingSms []string `json:"unexistingSms,omitempty"` WithoutListSms []string `json:"withoutListSms,omitempty"` } diff --git a/lib/model_put_revoke_user_permission.go b/lib/model_put_revoke_user_permission.go index d067755..9e7eb1a 100644 --- a/lib/model_put_revoke_user_permission.go +++ b/lib/model_put_revoke_user_permission.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Revoke user permission type PutRevokeUserPermission struct { diff --git a/lib/model_putresendcancelinvitation.go b/lib/model_putresendcancelinvitation.go index 996acd4..9570a95 100644 --- a/lib/model_putresendcancelinvitation.go +++ b/lib/model_putresendcancelinvitation.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Revoke user permission type Putresendcancelinvitation struct { diff --git a/lib/model_remaining_credit_model.go b/lib/model_remaining_credit_model.go index c1cfa37..83c6fc2 100644 --- a/lib/model_remaining_credit_model.go +++ b/lib/model_remaining_credit_model.go @@ -1,16 +1,16 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RemainingCreditModel struct { - Child *RemainingCreditModelChild `json:"child"` + Child *RemainingCreditModelChild `json:"child"` Reseller *RemainingCreditModelReseller `json:"reseller"` } diff --git a/lib/model_remaining_credit_model_child.go b/lib/model_remaining_credit_model_child.go index cdba385..9307e14 100644 --- a/lib/model_remaining_credit_model_child.go +++ b/lib/model_remaining_credit_model_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Credits remaining for child account type RemainingCreditModelChild struct { diff --git a/lib/model_remaining_credit_model_reseller.go b/lib/model_remaining_credit_model_reseller.go index 7104545..57612ae 100644 --- a/lib/model_remaining_credit_model_reseller.go +++ b/lib/model_remaining_credit_model_reseller.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RemainingCreditModelReseller struct { // SMS Credits remaining for reseller account diff --git a/lib/model_remove_contact_from_list.go b/lib/model_remove_contact_from_list.go index 0800bb2..79ee8ed 100644 --- a/lib/model_remove_contact_from_list.go +++ b/lib/model_remove_contact_from_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RemoveContactFromList struct { // Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. diff --git a/lib/model_remove_credits.go b/lib/model_remove_credits.go index ce5f14e..9c29a34 100644 --- a/lib/model_remove_credits.go +++ b/lib/model_remove_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RemoveCredits struct { // Required if email credits are empty. SMS credits to be removed from the child account diff --git a/lib/model_request_contact_export.go b/lib/model_request_contact_export.go index 0d99042..6a5752e 100644 --- a/lib/model_request_contact_export.go +++ b/lib/model_request_contact_export.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RequestContactExport struct { // List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. - ExportAttributes []string `json:"exportAttributes,omitempty"` + ExportAttributes []string `json:"exportAttributes,omitempty"` CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter"` // Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 NotifyUrl string `json:"notifyUrl,omitempty"` diff --git a/lib/model_request_contact_export_custom_contact_filter.go b/lib/model_request_contact_export_custom_contact_filter.go index 0d83c2d..9c242dc 100644 --- a/lib/model_request_contact_export_custom_contact_filter.go +++ b/lib/model_request_contact_export_custom_contact_filter.go @@ -1,22 +1,22 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Set the filter for the contacts to be exported. type RequestContactExportCustomContactFilter struct { - // 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. + // 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. ActionForContacts string `json:"actionForContacts,omitempty"` - // 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). + // 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). ActionForEmailCampaigns string `json:"actionForEmailCampaigns,omitempty"` - // 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. + // 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. ActionForSmsCampaigns string `json:"actionForSmsCampaigns,omitempty"` // Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. ListId int64 `json:"listId,omitempty"` diff --git a/lib/model_request_contact_import.go b/lib/model_request_contact_import.go index 0ac0c9c..a621161 100644 --- a/lib/model_request_contact_import.go +++ b/lib/model_request_contact_import.go @@ -1,27 +1,27 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RequestContactImport struct { // Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json FileUrl string `json:"fileUrl,omitempty"` // 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. FileBody string `json:"fileBody,omitempty"` - // **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. + // **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. JsonBody []RequestContactImportJsonBody `json:"jsonBody,omitempty"` // Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. ListIds []int64 `json:"listIds,omitempty"` // URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 - NotifyUrl string `json:"notifyUrl,omitempty"` - NewList *RequestContactImportNewList `json:"newList,omitempty"` + NotifyUrl string `json:"notifyUrl,omitempty"` + NewList *RequestContactImportNewList `json:"newList,omitempty"` // To blacklist all the contacts for email EmailBlacklist bool `json:"emailBlacklist,omitempty"` // To disable email notification diff --git a/lib/model_request_contact_import_json_body.go b/lib/model_request_contact_import_json_body.go index e617c3a..f8c99b5 100644 --- a/lib/model_request_contact_import_json_body.go +++ b/lib/model_request_contact_import_json_body.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RequestContactImportJsonBody struct { Email string `json:"email,omitempty"` diff --git a/lib/model_request_contact_import_new_list.go b/lib/model_request_contact_import_new_list.go index 148756f..dc6db89 100644 --- a/lib/model_request_contact_import_new_list.go +++ b/lib/model_request_contact_import_new_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // To create a new list and import the contacts into it, pass the listName and an optional folderId. type RequestContactImportNewList struct { diff --git a/lib/model_request_sms_recipient_export.go b/lib/model_request_sms_recipient_export.go index 3c69b50..79c1bce 100644 --- a/lib/model_request_sms_recipient_export.go +++ b/lib/model_request_sms_recipient_export.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type RequestSmsRecipientExport struct { // URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 diff --git a/lib/model_schedule_smtp_email.go b/lib/model_schedule_smtp_email.go index d0f5e7c..35e323d 100644 --- a/lib/model_schedule_smtp_email.go +++ b/lib/model_schedule_smtp_email.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type ScheduleSmtpEmail struct { // Message ID of the transactional email scheduled - MessageId string `json:"messageId,omitempty"` + MessageId string `json:"messageId,omitempty"` MessageIds []string `json:"messageIds,omitempty"` // Batch ID of the batch transactional email scheduled BatchId string `json:"batchId,omitempty"` diff --git a/lib/model_send_report.go b/lib/model_send_report.go index f7e0a3f..a99da9f 100644 --- a/lib/model_send_report.go +++ b/lib/model_send_report.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendReport struct { // Language of email content for campaign report sending. - Language string `json:"language,omitempty"` - Email *SendReportEmail `json:"email"` + Language string `json:"language,omitempty"` + Email *SendReportEmail `json:"email"` } diff --git a/lib/model_send_report_email.go b/lib/model_send_report_email.go index af5e286..314787d 100644 --- a/lib/model_send_report_email.go +++ b/lib/model_send_report_email.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Custom attributes for the report email. type SendReportEmail struct { diff --git a/lib/model_send_sms.go b/lib/model_send_sms.go index 3622762..f48f01d 100644 --- a/lib/model_send_sms.go +++ b/lib/model_send_sms.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSms struct { Reference string `json:"reference"` - MessageId int64 `json:"messageId"` + MessageId int64 `json:"messageId"` // Count of SMS's to send multiple text messages SmsCount int64 `json:"smsCount,omitempty"` // SMS credits used per text message diff --git a/lib/model_send_smtp_email.go b/lib/model_send_smtp_email.go index 7d0578f..3d7f5ba 100644 --- a/lib/model_send_smtp_email.go +++ b/lib/model_send_smtp_email.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_send_smtp_email_attachment.go b/lib/model_send_smtp_email_attachment.go index 74dd39c..05b09de 100644 --- a/lib/model_send_smtp_email_attachment.go +++ b/lib/model_send_smtp_email_attachment.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailAttachment struct { // Absolute url of the attachment (no local file). diff --git a/lib/model_send_smtp_email_bcc.go b/lib/model_send_smtp_email_bcc.go index 2403769..2de9369 100644 --- a/lib/model_send_smtp_email_bcc.go +++ b/lib/model_send_smtp_email_bcc.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailBcc struct { // Email address of the recipient in bcc diff --git a/lib/model_send_smtp_email_cc.go b/lib/model_send_smtp_email_cc.go index da957e7..dc8bf99 100644 --- a/lib/model_send_smtp_email_cc.go +++ b/lib/model_send_smtp_email_cc.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailCc struct { // Email address of the recipient in cc diff --git a/lib/model_send_smtp_email_message_versions.go b/lib/model_send_smtp_email_message_versions.go index d35aa17..77361e1 100644 --- a/lib/model_send_smtp_email_message_versions.go +++ b/lib/model_send_smtp_email_message_versions.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailMessageVersions struct { // List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] @@ -18,12 +18,12 @@ type SendSmtpEmailMessageVersions struct { // List of email addresses and names (optional) of the recipients in bcc Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"` // List of email addresses and names (optional) of the recipients in cc - Cc []SendSmtpEmailCc `json:"cc,omitempty"` + Cc []SendSmtpEmailCc `json:"cc,omitempty"` ReplyTo *SendSmtpEmailReplyTo1 `json:"replyTo,omitempty"` - // Custom subject specific to message version + // Custom subject specific to message version Subject string `json:"subject,omitempty"` - // HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** + // HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed** HtmlContent string `json:"htmlContent,omitempty"` - // Plain Text body of the message. **Ignored if 'templateId' is passed** + // Plain Text body of the message. **Ignored if 'templateId' is passed** TextContent string `json:"textContent,omitempty"` } diff --git a/lib/model_send_smtp_email_reply_to.go b/lib/model_send_smtp_email_reply_to.go index 5cf211e..03a09df 100644 --- a/lib/model_send_smtp_email_reply_to.go +++ b/lib/model_send_smtp_email_reply_to.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. type SendSmtpEmailReplyTo struct { diff --git a/lib/model_send_smtp_email_reply_to_1.go b/lib/model_send_smtp_email_reply_to_1.go index 59da7c9..e0ac92c 100644 --- a/lib/model_send_smtp_email_reply_to_1.go +++ b/lib/model_send_smtp_email_reply_to_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"} type SendSmtpEmailReplyTo1 struct { diff --git a/lib/model_send_smtp_email_sender.go b/lib/model_send_smtp_email_sender.go index 86ff659..bd9a8bf 100644 --- a/lib/model_send_smtp_email_sender.go +++ b/lib/model_send_smtp_email_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2} type SendSmtpEmailSender struct { diff --git a/lib/model_send_smtp_email_to.go b/lib/model_send_smtp_email_to.go index 68b1b29..265cd30 100644 --- a/lib/model_send_smtp_email_to.go +++ b/lib/model_send_smtp_email_to.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailTo struct { // Email address of the recipient diff --git a/lib/model_send_smtp_email_to_1.go b/lib/model_send_smtp_email_to_1.go index 02d9761..c8bb6a1 100644 --- a/lib/model_send_smtp_email_to_1.go +++ b/lib/model_send_smtp_email_to_1.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendSmtpEmailTo1 struct { // Email address of the recipient diff --git a/lib/model_send_test_email.go b/lib/model_send_test_email.go index 447d967..e757755 100644 --- a/lib/model_send_test_email.go +++ b/lib/model_send_test_email.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendTestEmail struct { // 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. diff --git a/lib/model_send_test_sms.go b/lib/model_send_test_sms.go index 5a68431..0635ea0 100644 --- a/lib/model_send_test_sms.go +++ b/lib/model_send_test_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendTestSms struct { // 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 diff --git a/lib/model_send_transac_sms.go b/lib/model_send_transac_sms.go index 86186cc..c2367f3 100644 --- a/lib/model_send_transac_sms.go +++ b/lib/model_send_transac_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendTransacSms struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** diff --git a/lib/model_send_whatsapp_message.go b/lib/model_send_whatsapp_message.go index 96d98e9..07329f0 100644 --- a/lib/model_send_whatsapp_message.go +++ b/lib/model_send_whatsapp_message.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SendWhatsappMessage struct { // ID of the template to send diff --git a/lib/model_set_config_display_currency.go b/lib/model_set_config_display_currency.go index bb1924b..6436c1c 100644 --- a/lib/model_set_config_display_currency.go +++ b/lib/model_set_config_display_currency.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SetConfigDisplayCurrency struct { // ISO 4217 compliant display currency code diff --git a/lib/model_sso_token_request.go b/lib/model_sso_token_request.go index d1fa0ac..15cf076 100644 --- a/lib/model_sso_token_request.go +++ b/lib/model_sso_token_request.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SsoTokenRequest struct { // Id of the sub-account organization Id int64 `json:"id"` // User email of sub-account organization Email string `json:"email,omitempty"` - // 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 + // 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 Target string `json:"target,omitempty"` // Set the full target URL after login success. The user will land directly on this target URL after login Url string `json:"url,omitempty"` diff --git a/lib/model_sso_token_request_corporate.go b/lib/model_sso_token_request_corporate.go index 3fae21b..23e05e3 100644 --- a/lib/model_sso_token_request_corporate.go +++ b/lib/model_sso_token_request_corporate.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SsoTokenRequestCorporate struct { // User email of sub-account organization diff --git a/lib/model_sub_account_apps_toggle_request.go b/lib/model_sub_account_apps_toggle_request.go index 383ffd9..3932d33 100644 --- a/lib/model_sub_account_apps_toggle_request.go +++ b/lib/model_sub_account_apps_toggle_request.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of enable/disable applications on the sub-account type SubAccountAppsToggleRequest struct { diff --git a/lib/model_sub_account_details_response.go b/lib/model_sub_account_details_response.go index e0bc355..6787d31 100644 --- a/lib/model_sub_account_details_response.go +++ b/lib/model_sub_account_details_response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SubAccountDetailsResponse struct { // Name of the sub-account user @@ -18,6 +18,6 @@ type SubAccountDetailsResponse struct { // Sub-account company name CompanyName string `json:"companyName,omitempty"` // List of group(s) associated with the sub-account - Groups []SubAccountDetailsResponseGroups `json:"groups,omitempty"` + Groups []SubAccountDetailsResponseGroups `json:"groups,omitempty"` PlanInfo *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"` } diff --git a/lib/model_sub_account_details_response_groups.go b/lib/model_sub_account_details_response_groups.go index fc57349..c4d09da 100644 --- a/lib/model_sub_account_details_response_groups.go +++ b/lib/model_sub_account_details_response_groups.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SubAccountDetailsResponseGroups struct { // Group id diff --git a/lib/model_sub_account_details_response_plan_info.go b/lib/model_sub_account_details_response_plan_info.go index ca86578..4fe21e3 100644 --- a/lib/model_sub_account_details_response_plan_info.go +++ b/lib/model_sub_account_details_response_plan_info.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Sub-account plan details type SubAccountDetailsResponsePlanInfo struct { - Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"` + Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"` Features *SubAccountDetailsResponsePlanInfoFeatures `json:"features,omitempty"` // type of the plan PlanType string `json:"planType,omitempty"` diff --git a/lib/model_sub_account_details_response_plan_info_credits.go b/lib/model_sub_account_details_response_plan_info_credits.go index 3524d88..9eeccd6 100644 --- a/lib/model_sub_account_details_response_plan_info_credits.go +++ b/lib/model_sub_account_details_response_plan_info_credits.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Credits quota and remaining credits on the sub-account type SubAccountDetailsResponsePlanInfoCredits struct { - Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"` - Sms *SubAccountDetailsResponsePlanInfoCreditsSms `json:"sms,omitempty"` + Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"` + Sms *SubAccountDetailsResponsePlanInfoCreditsSms `json:"sms,omitempty"` WpSubscribers *SubAccountDetailsResponsePlanInfoCreditsWpSubscribers `json:"wpSubscribers,omitempty"` } diff --git a/lib/model_sub_account_details_response_plan_info_credits_emails.go b/lib/model_sub_account_details_response_plan_info_credits_emails.go index 30a61cd..836ff97 100644 --- a/lib/model_sub_account_details_response_plan_info_credits_emails.go +++ b/lib/model_sub_account_details_response_plan_info_credits_emails.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Email credits remaining on the sub-account type SubAccountDetailsResponsePlanInfoCreditsEmails struct { diff --git a/lib/model_sub_account_details_response_plan_info_credits_sms.go b/lib/model_sub_account_details_response_plan_info_credits_sms.go index 04f9ba1..c2991d3 100644 --- a/lib/model_sub_account_details_response_plan_info_credits_sms.go +++ b/lib/model_sub_account_details_response_plan_info_credits_sms.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // SMS credits remaining on the sub-account type SubAccountDetailsResponsePlanInfoCreditsSms struct { diff --git a/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go index 8c604da..38ede07 100644 --- a/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go +++ b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Push credits remaining on the sub-account type SubAccountDetailsResponsePlanInfoCreditsWpSubscribers struct { diff --git a/lib/model_sub_account_details_response_plan_info_features.go b/lib/model_sub_account_details_response_plan_info_features.go index 07982b9..62cebe2 100644 --- a/lib/model_sub_account_details_response_plan_info_features.go +++ b/lib/model_sub_account_details_response_plan_info_features.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Features available on the sub-account type SubAccountDetailsResponsePlanInfoFeatures struct { - Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"` + Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"` LandingPage *SubAccountDetailsResponsePlanInfoFeaturesLandingPage `json:"landingPage,omitempty"` - Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"` + Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"` } diff --git a/lib/model_sub_account_details_response_plan_info_features_inbox.go b/lib/model_sub_account_details_response_plan_info_features_inbox.go index 2df6257..d0a82dd 100644 --- a/lib/model_sub_account_details_response_plan_info_features_inbox.go +++ b/lib/model_sub_account_details_response_plan_info_features_inbox.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Inbox details / Not available on ENTv2 type SubAccountDetailsResponsePlanInfoFeaturesInbox struct { diff --git a/lib/model_sub_account_details_response_plan_info_features_landing_page.go b/lib/model_sub_account_details_response_plan_info_features_landing_page.go index 598a249..77d4ed7 100644 --- a/lib/model_sub_account_details_response_plan_info_features_landing_page.go +++ b/lib/model_sub_account_details_response_plan_info_features_landing_page.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Landing page details / Not available on ENTv2 type SubAccountDetailsResponsePlanInfoFeaturesLandingPage struct { diff --git a/lib/model_sub_account_details_response_plan_info_features_users.go b/lib/model_sub_account_details_response_plan_info_features_users.go index fd1924a..03e55cd 100644 --- a/lib/model_sub_account_details_response_plan_info_features_users.go +++ b/lib/model_sub_account_details_response_plan_info_features_users.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Multi-account details type SubAccountDetailsResponsePlanInfoFeaturesUsers struct { diff --git a/lib/model_sub_account_update_plan_request.go b/lib/model_sub_account_update_plan_request.go index fb4668b..31f0cef 100644 --- a/lib/model_sub_account_update_plan_request.go +++ b/lib/model_sub_account_update_plan_request.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Details of the plan to be changed type SubAccountUpdatePlanRequest struct { - Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"` + Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"` Features *SubAccountUpdatePlanRequestFeatures `json:"features,omitempty"` } diff --git a/lib/model_sub_account_update_plan_request_credits.go b/lib/model_sub_account_update_plan_request_credits.go index 982e352..7557ff7 100644 --- a/lib/model_sub_account_update_plan_request_credits.go +++ b/lib/model_sub_account_update_plan_request_credits.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Credit details to update type SubAccountUpdatePlanRequestCredits struct { diff --git a/lib/model_sub_account_update_plan_request_features.go b/lib/model_sub_account_update_plan_request_features.go index 361a28e..ef109ee 100644 --- a/lib/model_sub_account_update_plan_request_features.go +++ b/lib/model_sub_account_update_plan_request_features.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Features details to update type SubAccountUpdatePlanRequestFeatures struct { diff --git a/lib/model_sub_accounts_response.go b/lib/model_sub_accounts_response.go index 1491c90..302d82c 100644 --- a/lib/model_sub_accounts_response.go +++ b/lib/model_sub_accounts_response.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SubAccountsResponse struct { // Total number of subaccounts - Count int32 `json:"count,omitempty"` + Count int32 `json:"count,omitempty"` SubAccounts []SubAccountsResponseSubAccounts `json:"subAccounts,omitempty"` } diff --git a/lib/model_sub_accounts_response_groups.go b/lib/model_sub_accounts_response_groups.go index 636519f..35bc6bb 100644 --- a/lib/model_sub_accounts_response_groups.go +++ b/lib/model_sub_accounts_response_groups.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SubAccountsResponseGroups struct { // Group identifier diff --git a/lib/model_sub_accounts_response_sub_accounts.go b/lib/model_sub_accounts_response_sub_accounts.go index 9468b7e..4caf405 100644 --- a/lib/model_sub_accounts_response_sub_accounts.go +++ b/lib/model_sub_accounts_response_sub_accounts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type SubAccountsResponseSubAccounts struct { // id of the sub-account diff --git a/lib/model_task.go b/lib/model_task.go index f751885..3f4e971 100644 --- a/lib/model_task.go +++ b/lib/model_task.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Task Details type Task struct { diff --git a/lib/model_task_list.go b/lib/model_task_list.go index 5a71b86..8009681 100644 --- a/lib/model_task_list.go +++ b/lib/model_task_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // List of tasks type TaskList struct { diff --git a/lib/model_task_reminder.go b/lib/model_task_reminder.go index 5cb28fb..51442a2 100644 --- a/lib/model_task_reminder.go +++ b/lib/model_task_reminder.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Task reminder date/time for a task type TaskReminder struct { diff --git a/lib/model_task_types.go b/lib/model_task_types.go index ecfe48c..18fb9ed 100644 --- a/lib/model_task_types.go +++ b/lib/model_task_types.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Task types details type TaskTypes struct { diff --git a/lib/model_update_attribute.go b/lib/model_update_attribute.go index 34e7cba..bfb75a2 100644 --- a/lib/model_update_attribute.go +++ b/lib/model_update_attribute.go @@ -1,20 +1,20 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateAttribute struct { // Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' Value string `json:"value,omitempty"` // 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\"}] Enumeration []UpdateAttributeEnumeration `json:"enumeration,omitempty"` - // Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** + // Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"` } diff --git a/lib/model_update_attribute_enumeration.go b/lib/model_update_attribute_enumeration.go index dffd1d1..b4bf604 100644 --- a/lib/model_update_attribute_enumeration.go +++ b/lib/model_update_attribute_enumeration.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateAttributeEnumeration struct { // Id of the value diff --git a/lib/model_update_batch_contacts.go b/lib/model_update_batch_contacts.go index 39299f1..9a4a152 100644 --- a/lib/model_update_batch_contacts.go +++ b/lib/model_update_batch_contacts.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateBatchContacts struct { // List of contacts to be updated diff --git a/lib/model_update_batch_contacts_contacts.go b/lib/model_update_batch_contacts_contacts.go index 4105c2d..592fcb7 100644 --- a/lib/model_update_batch_contacts_contacts.go +++ b/lib/model_update_batch_contacts_contacts.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateBatchContactsContacts struct { // Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) diff --git a/lib/model_update_batch_contacts_model.go b/lib/model_update_batch_contacts_model.go index dc6aea0..2e71d2e 100644 --- a/lib/model_update_batch_contacts_model.go +++ b/lib/model_update_batch_contacts_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateBatchContactsModel struct { SuccessIds []int64 `json:"successIds,omitempty"` diff --git a/lib/model_update_campaign_status.go b/lib/model_update_campaign_status.go index c58f6e6..7b527d6 100644 --- a/lib/model_update_campaign_status.go +++ b/lib/model_update_campaign_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Status of the campaign type UpdateCampaignStatus struct { diff --git a/lib/model_update_child.go b/lib/model_update_child.go index cb37e29..487e957 100644 --- a/lib/model_update_child.go +++ b/lib/model_update_child.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateChild struct { // New Email address to update the child account diff --git a/lib/model_update_child_account_status.go b/lib/model_update_child_account_status.go index b7337f0..1400d0b 100644 --- a/lib/model_update_child_account_status.go +++ b/lib/model_update_child_account_status.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateChildAccountStatus struct { // Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) diff --git a/lib/model_update_child_domain.go b/lib/model_update_child_domain.go index 06d48e5..71d9be0 100644 --- a/lib/model_update_child_domain.go +++ b/lib/model_update_child_domain.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateChildDomain struct { // Value for the sender domain that will replace the existing domain diff --git a/lib/model_update_contact.go b/lib/model_update_contact.go index c02781b..bddfb84 100644 --- a/lib/model_update_contact.go +++ b/lib/model_update_contact.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateContact struct { // 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\"} diff --git a/lib/model_update_coupon_collection.go b/lib/model_update_coupon_collection.go index 9c727dd..b675ab7 100644 --- a/lib/model_update_coupon_collection.go +++ b/lib/model_update_coupon_collection.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "time" diff --git a/lib/model_update_email_campaign.go b/lib/model_update_email_campaign.go index b6b2228..07869ea 100644 --- a/lib/model_update_email_campaign.go +++ b/lib/model_update_email_campaign.go @@ -8,7 +8,7 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateEmailCampaign struct { // Tag of the campaign diff --git a/lib/model_update_email_campaign_recipients.go b/lib/model_update_email_campaign_recipients.go index e7a075f..8fc5bd7 100644 --- a/lib/model_update_email_campaign_recipients.go +++ b/lib/model_update_email_campaign_recipients.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Segment ids and List ids to include/exclude from campaign type UpdateEmailCampaignRecipients struct { diff --git a/lib/model_update_email_campaign_sender.go b/lib/model_update_email_campaign_sender.go index 89ed165..ce78bfa 100644 --- a/lib/model_update_email_campaign_sender.go +++ b/lib/model_update_email_campaign_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type UpdateEmailCampaignSender struct { diff --git a/lib/model_update_external_feed.go b/lib/model_update_external_feed.go index 67f8680..5984c21 100644 --- a/lib/model_update_external_feed.go +++ b/lib/model_update_external_feed.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateExternalFeed struct { // Name of the feed Name string `json:"name,omitempty"` // URL of the feed Url string `json:"url,omitempty"` - // Auth type of the feed: * `basic` * `token` * `noAuth` + // Auth type of the feed: * `basic` * `token` * `noAuth` AuthType string `json:"authType,omitempty"` // Username for authType `basic` Username string `json:"username,omitempty"` diff --git a/lib/model_update_list.go b/lib/model_update_list.go index db2899a..dcff918 100644 --- a/lib/model_update_list.go +++ b/lib/model_update_list.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateList struct { // Name of the list. Either of the two parameters (name, folderId) can be updated at a time. diff --git a/lib/model_update_sender.go b/lib/model_update_sender.go index 212f06e..c3dd89a 100644 --- a/lib/model_update_sender.go +++ b/lib/model_update_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateSender struct { // From Name to update the sender diff --git a/lib/model_update_sms_campaign.go b/lib/model_update_sms_campaign.go index aa8315a..0f2d0bd 100644 --- a/lib/model_update_sms_campaign.go +++ b/lib/model_update_sms_campaign.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateSmsCampaign struct { // Name of the campaign @@ -16,7 +16,7 @@ type UpdateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender,omitempty"` // 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 - Content string `json:"content,omitempty"` + Content string `json:"content,omitempty"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // 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. ScheduledAt string `json:"scheduledAt,omitempty"` diff --git a/lib/model_update_smtp_template.go b/lib/model_update_smtp_template.go index 70b7b19..1171027 100644 --- a/lib/model_update_smtp_template.go +++ b/lib/model_update_smtp_template.go @@ -1,18 +1,18 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *UpdateSmtpTemplateSender `json:"sender,omitempty"` // Name of the template TemplateName string `json:"templateName,omitempty"` diff --git a/lib/model_update_smtp_template_sender.go b/lib/model_update_smtp_template_sender.go index 23c406e..d15a96f 100644 --- a/lib/model_update_smtp_template_sender.go +++ b/lib/model_update_smtp_template_sender.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` type UpdateSmtpTemplateSender struct { diff --git a/lib/model_update_webhook.go b/lib/model_update_webhook.go index edf8f15..b1b441c 100644 --- a/lib/model_update_webhook.go +++ b/lib/model_update_webhook.go @@ -1,27 +1,27 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateWebhook struct { // URL of the webhook Url string `json:"url,omitempty"` // Description of the webhook Description string `json:"description,omitempty"` - // - 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` + // - 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` Events []string `json:"events,omitempty"` // Inbound domain of webhook, used in case of event type `inbound` Domain string `json:"domain,omitempty"` // To send batched webhooks - Batched bool `json:"batched,omitempty"` - Auth *GetWebhookAuth `json:"auth,omitempty"` + Batched bool `json:"batched,omitempty"` + Auth *GetWebhookAuth `json:"auth,omitempty"` // Custom headers to be send with webhooks Headers []GetWebhookHeaders `json:"headers,omitempty"` } diff --git a/lib/model_update_whats_app_campaign.go b/lib/model_update_whats_app_campaign.go index 140581f..29963ae 100644 --- a/lib/model_update_whats_app_campaign.go +++ b/lib/model_update_whats_app_campaign.go @@ -1,21 +1,21 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UpdateWhatsAppCampaign struct { // Name of the campaign CampaignName string `json:"campaignName,omitempty"` // Status of the campaign CampaignStatus string `json:"campaignStatus,omitempty"` - // 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. - RescheduleFor string `json:"rescheduleFor,omitempty"` - Recipients *CreateWhatsAppCampaignRecipients `json:"recipients,omitempty"` + // 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. + RescheduleFor string `json:"rescheduleFor,omitempty"` + Recipients *CreateWhatsAppCampaignRecipients `json:"recipients,omitempty"` } diff --git a/lib/model_upload_image_model.go b/lib/model_upload_image_model.go index adaf280..564c436 100644 --- a/lib/model_upload_image_model.go +++ b/lib/model_upload_image_model.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UploadImageModel struct { // URL of the image uploaded diff --git a/lib/model_upload_image_to_gallery.go b/lib/model_upload_image_to_gallery.go index d6e2ac1..e36fb6d 100644 --- a/lib/model_upload_image_to_gallery.go +++ b/lib/model_upload_image_to_gallery.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type UploadImageToGallery struct { // 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. diff --git a/lib/model_variables_items.go b/lib/model_variables_items.go index 02d8229..2852f96 100644 --- a/lib/model_variables_items.go +++ b/lib/model_variables_items.go @@ -1,17 +1,17 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type VariablesItems struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` Default_ string `json:"default,omitempty"` Datatype string `json:"datatype,omitempty"` } diff --git a/lib/model_whatsapp_camp_stats.go b/lib/model_whatsapp_camp_stats.go index 46c7517..5878763 100644 --- a/lib/model_whatsapp_camp_stats.go +++ b/lib/model_whatsapp_camp_stats.go @@ -1,19 +1,19 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type WhatsappCampStats struct { - Sent int32 `json:"sent"` - Delivered int32 `json:"delivered"` - Read int32 `json:"read"` + Sent int32 `json:"sent"` + Delivered int32 `json:"delivered"` + Read int32 `json:"read"` Unsubscribe int32 `json:"unsubscribe"` - NotSent int32 `json:"not_sent"` + NotSent int32 `json:"not_sent"` } diff --git a/lib/model_whatsapp_camp_template.go b/lib/model_whatsapp_camp_template.go index 39b7834..cc0a10c 100644 --- a/lib/model_whatsapp_camp_template.go +++ b/lib/model_whatsapp_camp_template.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib type WhatsappCampTemplate struct { // name of the template @@ -16,9 +16,9 @@ type WhatsappCampTemplate struct { // description of the template Category string `json:"category,omitempty"` // language of the template - Language string `json:"language,omitempty"` - ContainsButton bool `json:"contains_button,omitempty"` - DisplayHeader bool `json:"display_header,omitempty"` + Language string `json:"language,omitempty"` + ContainsButton bool `json:"contains_button,omitempty"` + DisplayHeader bool `json:"display_header,omitempty"` // type of header HeaderType string `json:"header_type,omitempty"` // array of component item objects @@ -27,6 +27,6 @@ type WhatsappCampTemplate struct { HeaderVariables []VariablesItems `json:"header_variables,omitempty"` // array of variables item variables BodyVariables []VariablesItems `json:"body_variables,omitempty"` - ButtonType string `json:"button_type,omitempty"` - HideFooter bool `json:"hide_footer,omitempty"` + ButtonType string `json:"button_type,omitempty"` + HideFooter bool `json:"hide_footer,omitempty"` } diff --git a/lib/response.go b/lib/response.go index 3d2adb2..49238cc 100644 --- a/lib/response.go +++ b/lib/response.go @@ -1,14 +1,14 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ -package swagger +package lib import ( "net/http"