brevo 2.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +263 -40
- data/brevo-3.0.0.gem +0 -0
- data/brevo.gemspec +1 -1
- data/docs/AccountApi.md +2 -0
- data/docs/AddContactToList.md +3 -2
- data/docs/AddSubscriptionMemberPayload.md +10 -0
- data/docs/AggregateBalance.md +9 -0
- data/docs/Balance.md +16 -0
- data/docs/BalanceApi.md +1203 -0
- data/docs/BalanceDataPerContact.md +11 -0
- data/docs/BalanceDefinition.md +27 -0
- data/docs/BalanceDefinitionPage.md +8 -0
- data/docs/BalanceLimit.md +17 -0
- data/docs/BalanceOrder.md +19 -0
- data/docs/Body.md +2 -3
- data/docs/Body1.md +2 -3
- data/docs/Body10.md +4 -4
- data/docs/Body11.md +4 -1
- data/docs/Body12.md +4 -4
- data/docs/Body13.md +18 -0
- data/docs/Body14.md +17 -0
- data/docs/Body15.md +13 -0
- data/docs/{ManageIp.md → Body16.md} +2 -2
- data/docs/Body17.md +11 -0
- data/docs/Body18.md +8 -0
- data/docs/Body19.md +11 -0
- data/docs/Body2.md +2 -4
- data/docs/Body3.md +2 -2
- data/docs/Body4.md +1 -2
- data/docs/Body5.md +2 -4
- data/docs/Body6.md +5 -11
- data/docs/Body7.md +5 -10
- data/docs/Body8.md +4 -6
- data/docs/Body9.md +5 -1
- data/docs/Cart.md +9 -0
- data/docs/CompaniesApi.md +185 -60
- data/docs/Configuration.md +8 -0
- data/docs/ContactBalancesResp.md +11 -0
- data/docs/ContactErrorModel.md +10 -0
- data/docs/ContactsApi.md +116 -27
- data/docs/ConversationsApi.md +10 -10
- data/docs/ConversationsMessage.md +15 -0
- data/docs/ConversationsMessageAttachments.md +13 -0
- data/docs/ConversationsMessageForwardedToSourceStatus.md +9 -0
- data/docs/ConversationsMessageFrom.md +9 -0
- data/docs/ConversationsMessageReplyTo.md +9 -0
- data/docs/ConversationsMessageTo.md +9 -0
- data/docs/ConversionSourceMetrics.md +12 -0
- data/docs/ConversionSourceProduct.md +15 -0
- data/docs/CorporateGroupDetailsResponse.md +10 -0
- data/docs/CorporateGroupDetailsResponseGroup.md +10 -0
- data/docs/CorporateGroupDetailsResponseSubaccounts.md +10 -0
- data/docs/CorporateGroupDetailsResponseUsers.md +10 -0
- data/docs/CorporateuseremailpermissionsPrivileges.md +9 -0
- data/docs/CouponsApi.md +12 -9
- data/docs/CreateAttribute.md +3 -2
- data/docs/CreateBalanceDefinitionPayload.md +23 -0
- data/docs/CreateBalanceLimitPayload.md +13 -0
- data/docs/CreateBalancePayload.md +8 -0
- data/docs/CreateContact.md +2 -2
- data/docs/CreateCouponCollection.md +5 -2
- data/docs/CreateDoiContact.md +1 -1
- data/docs/CreateDomainModel.md +1 -0
- data/docs/CreateDomainModelDnsRecords.md +1 -0
- data/docs/CreateEmailCampaign.md +1 -0
- data/docs/CreateEmailCampaignEmailExpirationDate.md +9 -0
- data/docs/CreateEmailCampaignRecipients.md +1 -0
- data/docs/CreateLoyaltyProgramPayload.md +11 -0
- data/docs/CreateOrderPayload.md +14 -0
- data/docs/CreatePaymentRequest.md +13 -0
- data/docs/CreatePaymentResponse.md +9 -0
- data/docs/CreateSubAccount.md +1 -0
- data/docs/CreateSubscriptionPayload.md +10 -0
- data/docs/CreateSubscriptionResponse.md +14 -0
- data/docs/CreateTierGroupRequest.md +11 -0
- data/docs/CreateTransactionPayload.md +16 -0
- data/docs/CreateUpdateCategories.md +1 -0
- data/docs/CreateUpdateCategory.md +1 -0
- data/docs/CreateUpdateProduct.md +2 -1
- data/docs/CreateUpdateProducts.md +2 -1
- data/docs/CreateWebhook.md +5 -1
- data/docs/CreateWhatsAppTemplate.md +1 -0
- data/docs/DealsApi.md +135 -10
- data/docs/EcommerceApi.md +380 -2
- data/docs/EmailCampaignsApi.md +3 -5
- data/docs/ErrorResponse.md +8 -0
- data/docs/Event.md +12 -0
- data/docs/EventIdentifiers.md +12 -0
- data/docs/EventsApi.md +67 -0
- data/docs/ExportWebhooksHistory.md +2 -1
- data/docs/ExternalFeedsApi.md +2 -2
- data/docs/FetchTemplatePreview.md +10 -0
- data/docs/GetAccountPlan.md +2 -3
- data/docs/GetAttributesAttributes.md +1 -0
- data/docs/GetCampaignStats.md +2 -0
- data/docs/GetContactDetails.md +1 -1
- data/docs/GetCorporateInvitedUsersList.md +8 -0
- data/docs/GetCorporateInvitedUsersListFeatureAccess.md +16 -0
- data/docs/GetCorporateInvitedUsersListGroups.md +9 -0
- data/docs/GetCorporateInvitedUsersListUsers.md +12 -0
- data/docs/GetCorporateUserPermission.md +11 -0
- data/docs/GetCorporateUserPermissionFeatureAccess.md +16 -0
- data/docs/GetCorporateUserPermissionGroups.md +9 -0
- data/docs/GetCouponCollection.md +9 -6
- data/docs/GetEmailCampaign.md +4 -0
- data/docs/GetExtendedCampaignOverview.md +4 -0
- data/docs/GetExtendedContactDetails.md +1 -1
- data/docs/GetOrders.md +9 -0
- data/docs/GetPaymentRequest.md +14 -0
- data/docs/{GetSegmentsSegments.md → GetSegment.md} +4 -4
- data/docs/GetSegments.md +1 -1
- data/docs/GetTransacAggregatedSmsReport.md +3 -2
- data/docs/GetTransacSmsReportReports.md +3 -2
- data/docs/GetWebhook.md +3 -0
- data/docs/GetWebhookAuth.md +9 -0
- data/docs/GetWebhookHeaders.md +9 -0
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +2 -3
- data/docs/InlineResponse2002.md +8 -0
- data/docs/InlineResponse2003.md +8 -0
- data/docs/InlineResponse2004.md +8 -0
- data/docs/InlineResponse2005.md +8 -0
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2006Totals.md +10 -0
- data/docs/InlineResponse2007.md +9 -0
- data/docs/InlineResponse2008.md +8 -0
- data/docs/InlineResponse2009.md +10 -0
- data/docs/InlineResponse201.md +1 -1
- data/docs/InlineResponse2011.md +1 -1
- data/docs/InlineResponse2012.md +1 -1
- data/docs/InlineResponse2013.md +1 -1
- data/docs/InlineResponse2014.md +1 -1
- data/docs/InlineResponse2015.md +8 -0
- data/docs/InlineResponse400.md +8 -0
- data/docs/InviteAdminUser.md +11 -0
- data/docs/InviteAdminUserPrivileges.md +9 -0
- data/docs/Inviteuser.md +10 -0
- data/docs/InviteuserPrivileges.md +9 -0
- data/docs/LoyaltyProgram.md +19 -0
- data/docs/LoyaltyProgramPage.md +8 -0
- data/docs/LoyaltyProgramValidationError.md +10 -0
- data/docs/LoyaltyTierPage.md +8 -0
- data/docs/MainAttributeRewardPayload.md +14 -0
- data/docs/MainBillingPayload.md +14 -0
- data/docs/MainCodeCountHttpResponse.md +8 -0
- data/docs/MainCreateRedeemPayload.md +15 -0
- data/docs/MainCreateRedeemPayloadOrder.md +7 -0
- data/docs/MainCreateRewardPayload.md +11 -0
- data/docs/MainCreateRewardResponse.md +15 -0
- data/docs/MainErrorResponse.md +8 -0
- data/docs/MainFilter.md +9 -0
- data/docs/MainGenerator.md +13 -0
- data/docs/MainGetContactRewardsPayload.md +14 -0
- data/docs/MainIdentifiersPayload.md +9 -0
- data/docs/MainLimit.md +15 -0
- data/docs/MainModelContactReward.md +17 -0
- data/docs/MainModelContactRewardsResp.md +12 -0
- data/docs/MainNodeResponse.md +15 -0
- data/docs/MainOrderPayload.md +19 -0
- data/docs/MainOrderPayloadBilling.md +7 -0
- data/docs/MainOrderPayloadIdentifiers.md +7 -0
- data/docs/MainProduct.md +11 -0
- data/docs/MainProductPayload.md +12 -0
- data/docs/MainRedeem.md +21 -0
- data/docs/MainResultParameterResponse.md +9 -0
- data/docs/MainResultParameterResponseValue.md +7 -0
- data/docs/MainReward.md +47 -0
- data/docs/MainRewardAttribution.md +18 -0
- data/docs/MainRewardConfigurations.md +10 -0
- data/docs/MainRewardGenerator.md +7 -0
- data/docs/MainRewardPage.md +9 -0
- data/docs/MainRewardPageObj.md +16 -0
- data/docs/{GetChildDomains.md → MainRewardRule.md} +1 -1
- data/docs/MainRewardValidate.md +8 -0
- data/docs/MainRule.md +20 -0
- data/docs/MainRuleCondition.md +7 -0
- data/docs/MainRuleConditionResponse.md +12 -0
- data/docs/MainRuleConditionResponseLhs.md +7 -0
- data/docs/MainRuleConditionResponseRhs.md +7 -0
- data/docs/MainRuleEvent.md +7 -0
- data/docs/MainRuleEventResponse.md +9 -0
- data/docs/MainRuleResultResponse.md +10 -0
- data/docs/MainValidateRewardPayload.md +13 -0
- data/docs/MainValueResponse.md +15 -0
- data/docs/MainValueResponseExpression.md +7 -0
- data/docs/MainVoucherRevokePayload.md +8 -0
- data/docs/MasterAccountApi.md +1123 -115
- data/docs/MasterDetailsResponsePlanInfoFeatures.md +2 -0
- data/docs/MemberContact.md +10 -0
- data/docs/ModelSubscriptionBalanceResp.md +8 -0
- data/docs/Notification.md +9 -0
- data/docs/Order.md +3 -1
- data/docs/OrderBatch.md +1 -0
- data/docs/OrderBilling.md +2 -1
- data/docs/OrderIdentifiers.md +11 -0
- data/docs/PatchLoyaltyProgramPayload.md +10 -0
- data/docs/PaymentsApi.md +181 -0
- data/docs/ProgramApi.md +695 -0
- data/docs/PutRevokeUserPermission.md +8 -0
- data/docs/Putresendcancelinvitation.md +8 -0
- data/docs/RemoveContactFromList.md +4 -3
- data/docs/RequestContactExport.md +5 -1
- data/docs/RequestContactExportCustomContactFilter.md +2 -1
- data/docs/RequestContactImport.md +1 -0
- data/docs/RewardApi.md +664 -0
- data/docs/SendSmtpEmail.md +3 -3
- data/docs/SendSmtpEmailMessageVersions.md +2 -0
- data/docs/SendTransacSms.md +1 -1
- data/docs/SendTransacSmsTag.md +8 -0
- data/docs/SendWhatsappMessage.md +1 -0
- data/docs/SetConfigDisplayCurrency.md +8 -0
- data/docs/SsoTokenRequestCorporate.md +8 -0
- data/docs/SubAccountAppsToggleRequest.md +1 -1
- data/docs/SubAccountDetailsResponse.md +1 -0
- data/docs/SubAccountDetailsResponseGroups.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +4 -1
- data/docs/SubAccountDetailsResponsePlanInfoCreditsExternalFeeds.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsSms.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsWhatsapp.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsWpSubscribers.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +1 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesSalesUsers.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +2 -2
- data/docs/SubAccountUpdatePlanRequestCredits.md +5 -1
- data/docs/SubAccountUpdatePlanRequestFeatures.md +2 -1
- data/docs/SubAccountsResponseGroups.md +9 -0
- data/docs/SubAccountsResponseSubAccounts.md +1 -0
- data/docs/SubAccountsUpdatePlanRequest.md +10 -0
- data/docs/SubAccountsUpdatePlanRequestCredits.md +12 -0
- data/docs/SubAccountsUpdatePlanRequestFeatures.md +10 -0
- data/docs/Subscription.md +14 -0
- data/docs/SubscriptionAggregateBalance.md +9 -0
- data/docs/SubscriptionAttributedReward.md +16 -0
- data/docs/SubscriptionBalances.md +10 -0
- data/docs/SubscriptionHandlerInfo.md +11 -0
- data/docs/SubscriptionHandlerInfoBalance.md +7 -0
- data/docs/SubscriptionMember.md +12 -0
- data/docs/SubscriptionTier.md +14 -0
- data/docs/TasksApi.md +8 -8
- data/docs/TemplatePreview.md +13 -0
- data/docs/Tier.md +16 -0
- data/docs/TierAccessConditions.md +11 -0
- data/docs/TierApi.md +656 -0
- data/docs/TierForContact.md +14 -0
- data/docs/TierGroup.md +15 -0
- data/docs/TierGroupPage.md +8 -0
- data/docs/TierRequest.md +11 -0
- data/docs/TierRequestAccessConditions.md +9 -0
- data/docs/TierRequestPutPayload.md +11 -0
- data/docs/TierRequestTierRewards.md +8 -0
- data/docs/TierTierRewards.md +10 -0
- data/docs/Transaction.md +22 -0
- data/docs/TransactionHistory.md +17 -0
- data/docs/TransactionHistoryResp.md +12 -0
- data/docs/TransactionalEmailsApi.md +65 -7
- data/docs/TransactionalSMSApi.md +51 -0
- data/docs/TransactionalWhatsAppApi.md +2 -2
- data/docs/UnauthorizedResponse.md +8 -0
- data/docs/UpdateAttribute.md +2 -1
- data/docs/UpdateBalanceDefinitionPayload.md +23 -0
- data/docs/UpdateBalanceLimitPayload.md +13 -0
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateCouponCollection.md +4 -1
- data/docs/UpdateEmailCampaign.md +1 -0
- data/docs/UpdateEmailCampaignEmailExpirationDate.md +9 -0
- data/docs/UpdateEmailCampaignRecipients.md +1 -0
- data/docs/UpdateLoyaltyProgramPayload.md +10 -0
- data/docs/UpdateTierGroupRequest.md +11 -0
- data/docs/UpdateWebhook.md +3 -0
- data/docs/UserApi.md +239 -0
- data/docs/ValidationErrors.md +7 -0
- data/docs/WebhooksApi.md +4 -4
- data/docs/WhatsAppCampaignsApi.md +3 -1
- data/lib/brevo/api/account_api.rb +4 -1
- data/lib/brevo/api/balance_api.rb +1244 -0
- data/lib/brevo/api/companies_api.rb +170 -50
- data/lib/brevo/api/contacts_api.rb +136 -38
- data/lib/brevo/api/conversations_api.rb +3 -3
- data/lib/brevo/api/coupons_api.rb +19 -17
- data/lib/brevo/api/deals_api.rb +126 -6
- data/lib/brevo/api/domains_api.rb +1 -1
- data/lib/brevo/api/ecommerce_api.rb +369 -1
- data/lib/brevo/api/email_campaigns_api.rb +5 -8
- data/lib/brevo/api/events_api.rb +86 -0
- data/lib/brevo/api/external_feeds_api.rb +4 -4
- data/lib/brevo/api/files_api.rb +1 -1
- data/lib/brevo/api/inbound_parsing_api.rb +1 -1
- data/lib/brevo/api/master_account_api.rb +1111 -192
- data/lib/brevo/api/notes_api.rb +1 -1
- data/lib/brevo/api/payments_api.rb +188 -0
- data/lib/brevo/api/process_api.rb +1 -1
- data/lib/brevo/api/program_api.rb +663 -0
- data/lib/brevo/api/reward_api.rb +684 -0
- data/lib/brevo/api/senders_api.rb +1 -1
- data/lib/brevo/api/sms_campaigns_api.rb +1 -1
- data/lib/brevo/api/tasks_api.rb +6 -6
- data/lib/brevo/api/tier_api.rb +653 -0
- data/lib/brevo/api/transactional_emails_api.rb +64 -12
- data/lib/brevo/api/transactional_sms_api.rb +48 -3
- data/lib/brevo/api/transactional_whats_app_api.rb +6 -6
- data/lib/brevo/api/user_api.rb +223 -1
- data/lib/brevo/api/webhooks_api.rb +5 -5
- data/lib/brevo/api/whats_app_campaigns_api.rb +7 -1
- data/lib/brevo/api_client.rb +1 -1
- data/lib/brevo/api_error.rb +1 -1
- data/lib/brevo/configuration.rb +1 -1
- data/lib/brevo/models/ab_test_campaign_result.rb +1 -1
- data/lib/brevo/models/ab_test_campaign_result_clicked_links.rb +1 -1
- data/lib/brevo/models/ab_test_campaign_result_statistics.rb +1 -1
- data/lib/brevo/models/ab_test_version_clicks.rb +1 -1
- data/lib/brevo/models/ab_test_version_clicks_inner.rb +1 -1
- data/lib/brevo/models/ab_test_version_stats.rb +1 -1
- data/lib/brevo/models/add_child_domain.rb +1 -1
- data/lib/brevo/models/add_contact_to_list.rb +19 -7
- data/lib/brevo/models/add_subscription_member_payload.rb +227 -0
- data/lib/brevo/models/aggregate_balance.rb +195 -0
- data/lib/brevo/models/authenticate_domain_model.rb +1 -1
- data/lib/brevo/models/balance.rb +265 -0
- data/lib/brevo/models/balance_data_per_contact.rb +211 -0
- data/lib/brevo/models/balance_definition.rb +411 -0
- data/lib/brevo/models/balance_definition_page.rb +187 -0
- data/lib/brevo/models/balance_limit.rb +285 -0
- data/lib/brevo/models/balance_order.rb +345 -0
- data/lib/brevo/models/block_domain.rb +1 -1
- data/lib/brevo/models/body.rb +21 -29
- data/lib/brevo/models/body_1.rb +28 -26
- data/lib/brevo/models/body_10.rb +37 -38
- data/lib/brevo/models/body_11.rb +43 -14
- data/lib/brevo/models/body_12.rb +38 -30
- data/lib/brevo/models/body_13.rb +320 -0
- data/lib/brevo/models/body_14.rb +281 -0
- data/lib/brevo/models/body_15.rb +245 -0
- data/lib/brevo/models/body_16.rb +190 -0
- data/lib/brevo/models/body_17.rb +225 -0
- data/lib/brevo/models/body_18.rb +190 -0
- data/lib/brevo/models/body_19.rb +215 -0
- data/lib/brevo/models/body_2.rb +27 -43
- data/lib/brevo/models/body_3.rb +21 -19
- data/lib/brevo/models/body_4.rb +16 -19
- data/lib/brevo/models/body_5.rb +26 -43
- data/lib/brevo/models/body_6.rb +33 -119
- data/lib/brevo/models/body_7.rb +33 -85
- data/lib/brevo/models/body_8.rb +38 -60
- data/lib/brevo/models/body_9.rb +110 -12
- data/lib/brevo/models/body_variables_items.rb +1 -1
- data/lib/brevo/models/cart.rb +240 -0
- data/lib/brevo/models/companies_list.rb +1 -1
- data/lib/brevo/models/company.rb +1 -1
- data/lib/brevo/models/company_attributes.rb +1 -1
- data/lib/brevo/models/company_attributes_inner.rb +1 -1
- data/lib/brevo/models/component_items.rb +1 -1
- data/lib/brevo/models/configuration.rb +191 -0
- data/lib/brevo/models/contact_balances_resp.rb +213 -0
- data/lib/brevo/models/contact_error_model.rb +249 -0
- data/lib/brevo/models/conversations_message.rb +160 -5
- data/lib/brevo/models/conversations_message_attachments.rb +235 -0
- data/lib/brevo/models/conversations_message_file.rb +1 -1
- data/lib/brevo/models/conversations_message_file_image_info.rb +1 -1
- data/lib/brevo/models/conversations_message_forwarded_to_source_status.rb +194 -0
- data/lib/brevo/models/conversations_message_from.rb +194 -0
- data/lib/brevo/models/conversations_message_reply_to.rb +194 -0
- data/lib/brevo/models/conversations_message_to.rb +193 -0
- data/lib/brevo/models/conversion_source_metrics.rb +279 -0
- data/lib/brevo/models/conversion_source_product.rb +252 -0
- data/lib/brevo/models/corporate_group_details_response.rb +206 -0
- data/lib/brevo/models/corporate_group_details_response_group.rb +205 -0
- data/lib/brevo/models/corporate_group_details_response_subaccounts.rb +205 -0
- data/lib/brevo/models/{remaining_credit_model_child.rb → corporate_group_details_response_users.rb} +27 -28
- data/lib/brevo/models/corporateuseremailpermissions_privileges.rb +232 -0
- data/lib/brevo/models/create_api_key_request.rb +1 -1
- data/lib/brevo/models/create_api_key_response.rb +1 -1
- data/lib/brevo/models/create_attribute.rb +18 -6
- data/lib/brevo/models/create_attribute_enumeration.rb +1 -1
- data/lib/brevo/models/create_balance_definition_payload.rb +474 -0
- data/lib/brevo/models/create_balance_limit_payload.rb +319 -0
- data/lib/brevo/models/create_balance_payload.rb +191 -0
- data/lib/brevo/models/create_category_model.rb +1 -1
- data/lib/brevo/models/create_child.rb +1 -1
- data/lib/brevo/models/create_contact.rb +7 -5
- data/lib/brevo/models/create_coupon_collection.rb +38 -8
- data/lib/brevo/models/create_coupons.rb +1 -1
- data/lib/brevo/models/create_doi_contact.rb +6 -4
- data/lib/brevo/models/create_domain.rb +1 -1
- data/lib/brevo/models/create_domain_model.rb +12 -2
- data/lib/brevo/models/create_domain_model_dns_records.rb +14 -5
- data/lib/brevo/models/create_domain_model_dns_records_dkim_record.rb +1 -1
- data/lib/brevo/models/create_email_campaign.rb +14 -5
- data/lib/brevo/models/create_email_campaign_email_expiration_date.rb +254 -0
- data/lib/brevo/models/create_email_campaign_recipients.rb +17 -5
- data/lib/brevo/models/create_email_campaign_sender.rb +1 -1
- data/lib/brevo/models/create_external_feed.rb +1 -1
- data/lib/brevo/models/create_list.rb +1 -1
- data/lib/brevo/models/create_loyalty_program_payload.rb +256 -0
- data/lib/brevo/models/create_model.rb +1 -1
- data/lib/brevo/models/create_order_payload.rb +290 -0
- data/lib/brevo/models/create_payment_request.rb +247 -0
- data/lib/brevo/models/create_payment_response.rb +200 -0
- data/lib/brevo/models/create_product_model.rb +1 -1
- data/lib/brevo/models/create_sender.rb +1 -1
- data/lib/brevo/models/create_sender_ips.rb +1 -1
- data/lib/brevo/models/create_sender_model.rb +1 -1
- data/lib/brevo/models/create_sms_campaign.rb +1 -1
- data/lib/brevo/models/create_sms_campaign_recipients.rb +1 -1
- data/lib/brevo/models/create_smtp_email.rb +1 -1
- data/lib/brevo/models/create_smtp_template.rb +1 -1
- data/lib/brevo/models/create_smtp_template_sender.rb +1 -1
- data/lib/brevo/models/create_sub_account.rb +17 -5
- data/lib/brevo/models/create_sub_account_response.rb +1 -1
- data/lib/brevo/models/create_subscription_payload.rb +225 -0
- data/lib/brevo/models/create_subscription_response.rb +245 -0
- data/lib/brevo/models/create_tier_group_request.rb +272 -0
- data/lib/brevo/models/create_transaction_payload.rb +291 -0
- data/lib/brevo/models/create_update_batch_category.rb +1 -1
- data/lib/brevo/models/create_update_batch_category_model.rb +1 -1
- data/lib/brevo/models/create_update_batch_products.rb +1 -1
- data/lib/brevo/models/create_update_batch_products_model.rb +1 -1
- data/lib/brevo/models/create_update_categories.rb +15 -5
- data/lib/brevo/models/create_update_category.rb +15 -5
- data/lib/brevo/models/create_update_contact_model.rb +1 -1
- data/lib/brevo/models/create_update_folder.rb +1 -1
- data/lib/brevo/models/create_update_product.rb +16 -6
- data/lib/brevo/models/create_update_products.rb +16 -6
- data/lib/brevo/models/create_webhook.rb +61 -6
- data/lib/brevo/models/create_whats_app_campaign.rb +1 -1
- data/lib/brevo/models/create_whats_app_campaign_recipients.rb +1 -1
- data/lib/brevo/models/create_whats_app_template.rb +29 -7
- data/lib/brevo/models/created_batch_id.rb +1 -1
- data/lib/brevo/models/created_process_id.rb +1 -1
- data/lib/brevo/models/deal.rb +1 -1
- data/lib/brevo/models/deal_attributes.rb +1 -1
- data/lib/brevo/models/deal_attributes_inner.rb +1 -1
- data/lib/brevo/models/deals_list.rb +1 -1
- data/lib/brevo/models/delete_hardbounces.rb +1 -1
- data/lib/brevo/models/email_export_recipients.rb +1 -1
- data/lib/brevo/models/error_model.rb +3 -3
- data/lib/brevo/models/{update_child_domain.rb → error_response.rb} +9 -10
- data/lib/brevo/models/event.rb +234 -0
- data/lib/brevo/models/event_identifiers.rb +226 -0
- data/lib/brevo/models/export_webhooks_history.rb +32 -5
- data/lib/brevo/models/{remaining_credit_model_reseller.rb → fetch_template_preview.rb} +27 -22
- data/lib/brevo/models/file_data.rb +1 -1
- data/lib/brevo/models/file_downloadable_link.rb +1 -1
- data/lib/brevo/models/file_list.rb +1 -1
- data/lib/brevo/models/get_account.rb +1 -1
- data/lib/brevo/models/get_account_activity.rb +1 -1
- data/lib/brevo/models/get_account_activity_logs.rb +1 -1
- data/lib/brevo/models/get_account_marketing_automation.rb +1 -1
- data/lib/brevo/models/get_account_plan.rb +9 -19
- data/lib/brevo/models/get_account_relay.rb +1 -1
- data/lib/brevo/models/get_account_relay_data.rb +1 -1
- data/lib/brevo/models/get_aggregated_report.rb +1 -1
- data/lib/brevo/models/get_all_external_feeds.rb +1 -1
- data/lib/brevo/models/get_all_external_feeds_feeds.rb +1 -1
- data/lib/brevo/models/get_attributes.rb +1 -1
- data/lib/brevo/models/get_attributes_attributes.rb +19 -7
- data/lib/brevo/models/get_attributes_enumeration.rb +1 -1
- data/lib/brevo/models/get_blocked_domains.rb +1 -1
- data/lib/brevo/models/get_campaign_overview.rb +1 -1
- data/lib/brevo/models/get_campaign_recipients.rb +1 -1
- data/lib/brevo/models/get_campaign_stats.rb +35 -5
- data/lib/brevo/models/get_categories.rb +1 -1
- data/lib/brevo/models/get_category_details.rb +1 -1
- data/lib/brevo/models/get_child_domain.rb +1 -1
- data/lib/brevo/models/get_client.rb +1 -1
- data/lib/brevo/models/get_contact_campaign_stats.rb +1 -1
- data/lib/brevo/models/get_contact_campaign_stats_clicked.rb +1 -1
- data/lib/brevo/models/get_contact_campaign_stats_opened.rb +1 -1
- data/lib/brevo/models/get_contact_campaign_stats_transac_attributes.rb +1 -1
- data/lib/brevo/models/get_contact_campaign_stats_unsubscriptions.rb +1 -1
- data/lib/brevo/models/get_contact_details.rb +1 -6
- data/lib/brevo/models/get_contacts.rb +1 -1
- data/lib/brevo/models/get_corporate_invited_users_list.rb +187 -0
- data/lib/brevo/models/get_corporate_invited_users_list_feature_access.rb +284 -0
- data/lib/brevo/models/get_corporate_invited_users_list_groups.rb +196 -0
- data/lib/brevo/models/get_corporate_invited_users_list_users.rb +248 -0
- data/lib/brevo/models/get_corporate_user_permission.rb +236 -0
- data/lib/brevo/models/get_corporate_user_permission_feature_access.rb +284 -0
- data/lib/brevo/models/get_corporate_user_permission_groups.rb +196 -0
- data/lib/brevo/models/get_coupon_collection.rb +41 -11
- data/lib/brevo/models/get_device_browser_stats.rb +1 -1
- data/lib/brevo/models/get_domain_configuration_model.rb +1 -1
- data/lib/brevo/models/get_domains_list.rb +1 -1
- data/lib/brevo/models/get_domains_list_domains.rb +1 -1
- data/lib/brevo/models/get_email_campaign.rb +42 -2
- data/lib/brevo/models/get_email_campaigns.rb +1 -1
- data/lib/brevo/models/get_email_event_report.rb +1 -1
- data/lib/brevo/models/get_email_event_report_events.rb +1 -1
- data/lib/brevo/models/get_extended_campaign_overview.rb +42 -2
- data/lib/brevo/models/get_extended_campaign_overview_sender.rb +1 -1
- data/lib/brevo/models/get_extended_campaign_stats.rb +1 -1
- data/lib/brevo/models/get_extended_campaign_stats_global_stats.rb +1 -1
- data/lib/brevo/models/get_extended_client.rb +1 -1
- data/lib/brevo/models/get_extended_client_address.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details.rb +1 -6
- data/lib/brevo/models/get_extended_contact_details_statistics.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_clicked.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_delivered.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_links.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_messages_sent.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_opened.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_unsubscriptions.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +1 -1
- data/lib/brevo/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +1 -1
- data/lib/brevo/models/get_extended_list.rb +1 -1
- data/lib/brevo/models/get_extended_list_campaign_stats.rb +1 -1
- data/lib/brevo/models/get_external_feed_by_uuid.rb +1 -1
- data/lib/brevo/models/get_external_feed_by_uuid_headers.rb +1 -1
- data/lib/brevo/models/get_folder.rb +1 -1
- data/lib/brevo/models/get_folder_lists.rb +1 -1
- data/lib/brevo/models/get_folders.rb +1 -1
- data/lib/brevo/models/get_inbound_email_events.rb +1 -1
- data/lib/brevo/models/get_inbound_email_events_by_uuid.rb +1 -1
- data/lib/brevo/models/get_inbound_email_events_by_uuid_attachments.rb +1 -1
- data/lib/brevo/models/get_inbound_email_events_by_uuid_logs.rb +1 -1
- data/lib/brevo/models/get_inbound_email_events_events.rb +1 -1
- data/lib/brevo/models/get_invited_users_list.rb +1 -1
- data/lib/brevo/models/get_invited_users_list_feature_access.rb +1 -1
- data/lib/brevo/models/get_invited_users_list_users.rb +1 -1
- data/lib/brevo/models/get_ip.rb +1 -1
- data/lib/brevo/models/get_ip_from_sender.rb +1 -1
- data/lib/brevo/models/get_ips.rb +1 -1
- data/lib/brevo/models/get_ips_from_sender.rb +1 -1
- data/lib/brevo/models/get_list.rb +1 -1
- data/lib/brevo/models/get_lists.rb +1 -1
- data/lib/brevo/models/{get_children_list.rb → get_orders.rb} +11 -12
- data/lib/brevo/models/get_payment_request.rb +296 -0
- data/lib/brevo/models/get_process.rb +1 -1
- data/lib/brevo/models/get_processes.rb +1 -1
- data/lib/brevo/models/get_product_details.rb +1 -1
- data/lib/brevo/models/get_products.rb +1 -1
- data/lib/brevo/models/get_reports.rb +1 -1
- data/lib/brevo/models/get_reports_reports.rb +1 -1
- data/lib/brevo/models/get_scheduled_email_by_batch_id.rb +1 -1
- data/lib/brevo/models/get_scheduled_email_by_batch_id_batches.rb +1 -1
- data/lib/brevo/models/get_scheduled_email_by_message_id.rb +1 -1
- data/lib/brevo/models/{get_segments_segments.rb → get_segment.rb} +18 -3
- data/lib/brevo/models/get_segments.rb +5 -3
- data/lib/brevo/models/get_senders_list.rb +1 -1
- data/lib/brevo/models/get_senders_list_ips.rb +1 -1
- data/lib/brevo/models/get_senders_list_senders.rb +1 -1
- data/lib/brevo/models/get_shared_template_url.rb +1 -1
- data/lib/brevo/models/get_sms_campaign.rb +1 -1
- data/lib/brevo/models/get_sms_campaign_overview.rb +1 -1
- data/lib/brevo/models/get_sms_campaign_recipients.rb +1 -1
- data/lib/brevo/models/get_sms_campaign_stats.rb +1 -1
- data/lib/brevo/models/get_sms_campaigns.rb +1 -1
- data/lib/brevo/models/get_sms_event_report.rb +1 -1
- data/lib/brevo/models/get_sms_event_report_events.rb +3 -3
- data/lib/brevo/models/get_smtp_template_overview.rb +1 -1
- data/lib/brevo/models/get_smtp_template_overview_sender.rb +1 -1
- data/lib/brevo/models/get_smtp_templates.rb +1 -1
- data/lib/brevo/models/get_sso_token.rb +1 -1
- data/lib/brevo/models/get_stats_by_browser.rb +1 -1
- data/lib/brevo/models/get_stats_by_device.rb +1 -1
- data/lib/brevo/models/get_stats_by_domain.rb +1 -1
- data/lib/brevo/models/get_transac_aggregated_sms_report.rb +17 -7
- data/lib/brevo/models/get_transac_blocked_contacts.rb +1 -1
- data/lib/brevo/models/get_transac_blocked_contacts_contacts.rb +1 -1
- data/lib/brevo/models/get_transac_blocked_contacts_reason.rb +1 -1
- data/lib/brevo/models/get_transac_email_content.rb +1 -1
- data/lib/brevo/models/get_transac_email_content_events.rb +1 -1
- data/lib/brevo/models/get_transac_emails_list.rb +1 -1
- data/lib/brevo/models/get_transac_emails_list_transactional_emails.rb +1 -1
- data/lib/brevo/models/get_transac_sms_report.rb +1 -1
- data/lib/brevo/models/get_transac_sms_report_reports.rb +17 -7
- data/lib/brevo/models/get_user_permission.rb +1 -1
- data/lib/brevo/models/get_user_permission_privileges.rb +1 -1
- data/lib/brevo/models/get_wa_templates.rb +1 -1
- data/lib/brevo/models/get_wa_templates_templates.rb +1 -1
- data/lib/brevo/models/get_webhook.rb +36 -5
- data/lib/brevo/models/get_webhook_auth.rb +196 -0
- data/lib/brevo/models/get_webhook_headers.rb +195 -0
- data/lib/brevo/models/get_webhooks.rb +1 -1
- data/lib/brevo/models/get_whats_app_config.rb +1 -1
- data/lib/brevo/models/get_whatsapp_campaign_overview.rb +1 -1
- data/lib/brevo/models/get_whatsapp_campaigns.rb +1 -1
- data/lib/brevo/models/get_whatsapp_campaigns_campaigns.rb +1 -1
- data/lib/brevo/models/get_whatsapp_event_report.rb +1 -1
- data/lib/brevo/models/get_whatsapp_event_report_events.rb +1 -1
- data/lib/brevo/models/inline_response_200.rb +8 -15
- data/lib/brevo/models/inline_response_200_1.rb +10 -35
- data/lib/brevo/models/{create_reseller.rb → inline_response_200_2.rb} +9 -18
- data/lib/brevo/models/inline_response_200_3.rb +190 -0
- data/lib/brevo/models/inline_response_200_4.rb +185 -0
- data/lib/brevo/models/inline_response_200_5.rb +190 -0
- data/lib/brevo/models/inline_response_200_6.rb +206 -0
- data/lib/brevo/models/inline_response_200_6_totals.rb +218 -0
- data/lib/brevo/models/inline_response_200_7.rb +198 -0
- data/lib/brevo/models/inline_response_200_8.rb +192 -0
- data/lib/brevo/models/inline_response_200_9.rb +215 -0
- data/lib/brevo/models/inline_response_201.rb +1 -8
- data/lib/brevo/models/inline_response_201_1.rb +3 -3
- data/lib/brevo/models/inline_response_201_2.rb +3 -2
- data/lib/brevo/models/inline_response_201_3.rb +12 -12
- data/lib/brevo/models/inline_response_201_4.rb +12 -12
- data/lib/brevo/models/inline_response_201_5.rb +190 -0
- data/lib/brevo/models/inline_response_400.rb +184 -0
- data/lib/brevo/models/invite_admin_user.rb +233 -0
- data/lib/brevo/models/invite_admin_user_privileges.rb +232 -0
- data/lib/brevo/models/inviteuser.rb +221 -0
- data/lib/brevo/models/inviteuser_privileges.rb +232 -0
- data/lib/brevo/models/loyalty_program.rb +331 -0
- data/lib/brevo/models/loyalty_program_page.rb +187 -0
- data/lib/brevo/models/loyalty_program_validation_error.rb +205 -0
- data/lib/brevo/models/loyalty_tier_page.rb +186 -0
- data/lib/brevo/models/main_attribute_reward_payload.rb +282 -0
- data/lib/brevo/models/main_billing_payload.rb +245 -0
- data/lib/brevo/models/main_code_count_http_response.rb +185 -0
- data/lib/brevo/models/main_create_redeem_payload.rb +286 -0
- data/lib/brevo/models/{manage_ip.rb → main_create_redeem_payload_order.rb} +5 -14
- data/lib/brevo/models/main_create_reward_payload.rb +269 -0
- data/lib/brevo/models/main_create_reward_response.rb +255 -0
- data/lib/brevo/models/main_error_response.rb +185 -0
- data/lib/brevo/models/main_filter.rb +205 -0
- data/lib/brevo/models/main_generator.rb +235 -0
- data/lib/brevo/models/main_get_contact_rewards_payload.rb +356 -0
- data/lib/brevo/models/main_identifiers_payload.rb +195 -0
- data/lib/brevo/models/main_limit.rb +255 -0
- data/lib/brevo/models/main_model_contact_reward.rb +277 -0
- data/lib/brevo/models/main_model_contact_rewards_resp.rb +227 -0
- data/lib/brevo/models/main_node_response.rb +259 -0
- data/lib/brevo/models/{get_child_info.rb → main_order_payload.rb} +94 -86
- data/lib/brevo/models/main_order_payload_billing.rb +176 -0
- data/lib/brevo/models/main_order_payload_identifiers.rb +176 -0
- data/lib/brevo/models/main_product.rb +215 -0
- data/lib/brevo/models/main_product_payload.rb +227 -0
- data/lib/brevo/models/main_redeem.rb +317 -0
- data/lib/brevo/models/{get_child_info_api_keys_v3.rb → main_result_parameter_response.rb} +10 -21
- data/lib/brevo/models/main_result_parameter_response_value.rb +176 -0
- data/lib/brevo/models/main_reward.rb +616 -0
- data/lib/brevo/models/main_reward_attribution.rb +287 -0
- data/lib/brevo/models/main_reward_configurations.rb +205 -0
- data/lib/brevo/models/main_reward_generator.rb +176 -0
- data/lib/brevo/models/{get_child_info_api_keys.rb → main_reward_page.rb} +18 -24
- data/lib/brevo/models/main_reward_page_obj.rb +265 -0
- data/lib/brevo/models/main_reward_rule.rb +176 -0
- data/lib/brevo/models/main_reward_validate.rb +185 -0
- data/lib/brevo/models/main_rule.rb +305 -0
- data/lib/brevo/models/main_rule_condition.rb +176 -0
- data/lib/brevo/models/main_rule_condition_response.rb +227 -0
- data/lib/brevo/models/main_rule_condition_response_lhs.rb +176 -0
- data/lib/brevo/models/main_rule_condition_response_rhs.rb +176 -0
- data/lib/brevo/models/main_rule_event.rb +176 -0
- data/lib/brevo/models/{get_child_info_api_keys_v2.rb → main_rule_event_response.rb} +11 -21
- data/lib/brevo/models/main_rule_result_response.rb +207 -0
- data/lib/brevo/models/main_validate_reward_payload.rb +250 -0
- data/lib/brevo/models/main_value_response.rb +256 -0
- data/lib/brevo/models/main_value_response_expression.rb +176 -0
- data/lib/brevo/models/{get_child_account_creation_status.rb → main_voucher_revoke_payload.rb} +15 -13
- data/lib/brevo/models/master_details_response.rb +1 -1
- data/lib/brevo/models/master_details_response_billing_info.rb +1 -1
- data/lib/brevo/models/master_details_response_billing_info_address.rb +1 -1
- data/lib/brevo/models/master_details_response_billing_info_name.rb +1 -1
- data/lib/brevo/models/master_details_response_plan_info.rb +1 -1
- data/lib/brevo/models/master_details_response_plan_info_features.rb +22 -2
- data/lib/brevo/models/member_contact.rb +205 -0
- data/lib/brevo/models/model_subscription_balance_resp.rb +186 -0
- data/lib/brevo/models/note.rb +1 -1
- data/lib/brevo/models/note_data.rb +1 -1
- data/lib/brevo/models/note_id.rb +1 -1
- data/lib/brevo/models/note_list.rb +1 -1
- data/lib/brevo/models/notification.rb +240 -0
- data/lib/brevo/models/order.rb +36 -15
- data/lib/brevo/models/order_batch.rb +17 -5
- data/lib/brevo/models/order_billing.rb +13 -3
- data/lib/brevo/models/order_identifiers.rb +216 -0
- data/lib/brevo/models/order_products.rb +1 -1
- data/lib/brevo/models/otp.rb +1 -1
- data/lib/brevo/models/{remaining_credit_model.rb → patch_loyalty_program_payload.rb} +27 -25
- data/lib/brevo/models/pipeline.rb +1 -1
- data/lib/brevo/models/pipeline_stage.rb +1 -1
- data/lib/brevo/models/pipelines.rb +1 -1
- data/lib/brevo/models/post_contact_info.rb +1 -1
- data/lib/brevo/models/post_contact_info_contacts.rb +1 -1
- data/lib/brevo/models/post_send_failed.rb +1 -1
- data/lib/brevo/models/post_send_sms_test_failed.rb +1 -1
- data/lib/brevo/models/{add_credits.rb → put_revoke_user_permission.rb} +11 -15
- data/lib/brevo/models/{remove_credits.rb → putresendcancelinvitation.rb} +11 -15
- data/lib/brevo/models/remove_contact_from_list.rb +17 -5
- data/lib/brevo/models/request_contact_export.rb +54 -6
- data/lib/brevo/models/request_contact_export_custom_contact_filter.rb +13 -3
- data/lib/brevo/models/request_contact_import.rb +14 -2
- data/lib/brevo/models/request_contact_import_json_body.rb +1 -1
- data/lib/brevo/models/request_contact_import_new_list.rb +1 -1
- data/lib/brevo/models/request_sms_recipient_export.rb +1 -1
- data/lib/brevo/models/schedule_smtp_email.rb +1 -1
- data/lib/brevo/models/send_report.rb +1 -1
- data/lib/brevo/models/send_report_email.rb +1 -1
- data/lib/brevo/models/send_sms.rb +1 -1
- data/lib/brevo/models/send_smtp_email.rb +2 -2
- data/lib/brevo/models/send_smtp_email_attachment.rb +1 -1
- data/lib/brevo/models/send_smtp_email_bcc.rb +1 -1
- data/lib/brevo/models/send_smtp_email_cc.rb +1 -1
- data/lib/brevo/models/send_smtp_email_message_versions.rb +25 -5
- data/lib/brevo/models/send_smtp_email_reply_to.rb +1 -1
- data/lib/brevo/models/send_smtp_email_reply_to_1.rb +1 -1
- data/lib/brevo/models/send_smtp_email_sender.rb +1 -1
- data/lib/brevo/models/send_smtp_email_to.rb +1 -1
- data/lib/brevo/models/send_smtp_email_to_1.rb +1 -1
- data/lib/brevo/models/send_test_email.rb +1 -1
- data/lib/brevo/models/send_test_sms.rb +1 -1
- data/lib/brevo/models/send_transac_sms.rb +2 -3
- data/lib/brevo/models/send_transac_sms_tag.rb +186 -0
- data/lib/brevo/models/send_whatsapp_message.rb +12 -2
- data/lib/brevo/models/set_config_display_currency.rb +190 -0
- data/lib/brevo/models/sso_token_request.rb +1 -1
- data/lib/brevo/models/sso_token_request_corporate.rb +190 -0
- data/lib/brevo/models/sub_account_apps_toggle_request.rb +2 -2
- data/lib/brevo/models/sub_account_details_response.rb +14 -2
- data/lib/brevo/models/sub_account_details_response_groups.rb +195 -0
- data/lib/brevo/models/sub_account_details_response_plan_info.rb +1 -1
- data/lib/brevo/models/sub_account_details_response_plan_info_credits.rb +36 -10
- data/lib/brevo/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
- data/lib/brevo/models/sub_account_details_response_plan_info_credits_external_feeds.rb +196 -0
- data/lib/brevo/models/{get_child_info_credits.rb → sub_account_details_response_plan_info_credits_sms.rb} +18 -18
- data/lib/brevo/models/sub_account_details_response_plan_info_credits_whatsapp.rb +196 -0
- data/lib/brevo/models/sub_account_details_response_plan_info_credits_wp_subscribers.rb +196 -0
- data/lib/brevo/models/sub_account_details_response_plan_info_features.rb +14 -5
- data/lib/brevo/models/sub_account_details_response_plan_info_features_inbox.rb +2 -2
- data/lib/brevo/models/sub_account_details_response_plan_info_features_landing_page.rb +2 -2
- data/lib/brevo/models/sub_account_details_response_plan_info_features_sales_users.rb +196 -0
- data/lib/brevo/models/sub_account_details_response_plan_info_features_users.rb +4 -4
- data/lib/brevo/models/sub_account_update_plan_request.rb +1 -1
- data/lib/brevo/models/sub_account_update_plan_request_credits.rb +46 -6
- data/lib/brevo/models/sub_account_update_plan_request_features.rb +16 -6
- data/lib/brevo/models/sub_accounts_response.rb +1 -1
- data/lib/brevo/models/sub_accounts_response_groups.rb +195 -0
- data/lib/brevo/models/sub_accounts_response_sub_accounts.rb +22 -5
- data/lib/brevo/models/sub_accounts_update_plan_request.rb +206 -0
- data/lib/brevo/models/sub_accounts_update_plan_request_credits.rb +226 -0
- data/lib/brevo/models/sub_accounts_update_plan_request_features.rb +206 -0
- data/lib/brevo/models/subscription.rb +245 -0
- data/lib/brevo/models/subscription_aggregate_balance.rb +195 -0
- data/lib/brevo/models/subscription_attributed_reward.rb +267 -0
- data/lib/brevo/models/subscription_balances.rb +207 -0
- data/lib/brevo/models/subscription_handler_info.rb +220 -0
- data/lib/brevo/models/subscription_handler_info_balance.rb +176 -0
- data/lib/brevo/models/subscription_member.rb +227 -0
- data/lib/brevo/models/subscription_tier.rb +247 -0
- data/lib/brevo/models/task.rb +1 -1
- data/lib/brevo/models/task_list.rb +1 -1
- data/lib/brevo/models/task_reminder.rb +1 -1
- data/lib/brevo/models/task_types.rb +1 -1
- data/lib/brevo/models/{update_child_account_status.rb → template_preview.rb} +52 -31
- data/lib/brevo/models/tier.rb +267 -0
- data/lib/brevo/models/tier_access_conditions.rb +213 -0
- data/lib/brevo/models/tier_for_contact.rb +245 -0
- data/lib/brevo/models/tier_group.rb +307 -0
- data/lib/brevo/models/tier_group_page.rb +186 -0
- data/lib/brevo/models/tier_request.rb +227 -0
- data/lib/brevo/models/tier_request_access_conditions.rb +195 -0
- data/lib/brevo/models/tier_request_put_payload.rb +232 -0
- data/lib/brevo/models/tier_request_tier_rewards.rb +185 -0
- data/lib/brevo/models/tier_tier_rewards.rb +203 -0
- data/lib/brevo/models/transaction.rb +326 -0
- data/lib/brevo/models/transaction_history.rb +276 -0
- data/lib/brevo/models/transaction_history_resp.rb +228 -0
- data/lib/brevo/models/unauthorized_response.rb +185 -0
- data/lib/brevo/models/update_attribute.rb +18 -6
- data/lib/brevo/models/update_attribute_enumeration.rb +1 -1
- data/lib/brevo/models/update_balance_definition_payload.rb +474 -0
- data/lib/brevo/models/update_balance_limit_payload.rb +319 -0
- data/lib/brevo/models/update_batch_contacts.rb +1 -1
- data/lib/brevo/models/update_batch_contacts_contacts.rb +1 -1
- data/lib/brevo/models/update_batch_contacts_model.rb +1 -1
- data/lib/brevo/models/update_campaign_status.rb +1 -1
- data/lib/brevo/models/update_child.rb +1 -1
- data/lib/brevo/models/update_contact.rb +6 -4
- data/lib/brevo/models/update_coupon_collection.rb +35 -10
- data/lib/brevo/models/update_email_campaign.rb +14 -5
- data/lib/brevo/models/update_email_campaign_email_expiration_date.rb +254 -0
- data/lib/brevo/models/update_email_campaign_recipients.rb +17 -5
- data/lib/brevo/models/update_email_campaign_sender.rb +1 -1
- data/lib/brevo/models/update_external_feed.rb +1 -1
- data/lib/brevo/models/update_list.rb +1 -1
- data/lib/brevo/models/update_loyalty_program_payload.rb +210 -0
- data/lib/brevo/models/update_sender.rb +1 -1
- data/lib/brevo/models/update_sms_campaign.rb +1 -1
- data/lib/brevo/models/update_smtp_template.rb +1 -1
- data/lib/brevo/models/update_smtp_template_sender.rb +1 -1
- data/lib/brevo/models/update_tier_group_request.rb +287 -0
- data/lib/brevo/models/update_webhook.rb +36 -5
- data/lib/brevo/models/update_whats_app_campaign.rb +1 -1
- data/lib/brevo/models/upload_image_model.rb +1 -1
- data/lib/brevo/models/upload_image_to_gallery.rb +1 -1
- data/lib/brevo/models/{get_child_domains.rb → validation_errors.rb} +2 -2
- data/lib/brevo/models/variables_items.rb +1 -1
- data/lib/brevo/models/whatsapp_camp_stats.rb +1 -1
- data/lib/brevo/models/whatsapp_camp_template.rb +1 -1
- data/lib/brevo/version.rb +2 -2
- data/lib/brevo.rb +178 -21
- data/spec/api/account_api_spec.rb +2 -1
- data/spec/api/balance_api_spec.rb +292 -0
- data/spec/api/companies_api_spec.rb +38 -12
- data/spec/api/contacts_api_spec.rb +34 -10
- data/spec/api/conversations_api_spec.rb +2 -2
- data/spec/api/coupons_api_spec.rb +5 -4
- data/spec/api/deals_api_spec.rb +29 -3
- data/spec/api/domains_api_spec.rb +1 -1
- data/spec/api/ecommerce_api_spec.rb +82 -1
- data/spec/api/email_campaigns_api_spec.rb +2 -3
- data/spec/api/events_api_spec.rb +47 -0
- data/spec/api/external_feeds_api_spec.rb +2 -2
- data/spec/api/files_api_spec.rb +1 -1
- data/spec/api/inbound_parsing_api_spec.rb +1 -1
- data/spec/api/master_account_api_spec.rb +209 -3
- data/spec/api/notes_api_spec.rb +1 -1
- data/spec/api/payments_api_spec.rb +68 -0
- data/spec/api/process_api_spec.rb +1 -1
- data/spec/api/program_api_spec.rb +178 -0
- data/spec/api/reward_api_spec.rb +175 -0
- data/spec/api/senders_api_spec.rb +1 -1
- data/spec/api/sms_campaigns_api_spec.rb +1 -1
- data/spec/api/tasks_api_spec.rb +3 -3
- data/spec/api/tier_api_spec.rb +170 -0
- data/spec/api/transactional_emails_api_spec.rb +15 -4
- data/spec/api/transactional_sms_api_spec.rb +11 -1
- data/spec/api/transactional_whats_app_api_spec.rb +2 -2
- data/spec/api/user_api_spec.rb +48 -1
- data/spec/api/webhooks_api_spec.rb +3 -3
- data/spec/api/whats_app_campaigns_api_spec.rb +2 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/ab_test_campaign_result_clicked_links_spec.rb +1 -1
- data/spec/models/ab_test_campaign_result_spec.rb +1 -1
- data/spec/models/ab_test_campaign_result_statistics_spec.rb +1 -1
- data/spec/models/ab_test_version_clicks_inner_spec.rb +1 -1
- data/spec/models/ab_test_version_clicks_spec.rb +1 -1
- data/spec/models/ab_test_version_stats_spec.rb +1 -1
- data/spec/models/add_child_domain_spec.rb +1 -1
- data/spec/models/add_contact_to_list_spec.rb +7 -1
- data/spec/models/add_subscription_member_payload_spec.rb +53 -0
- data/spec/models/aggregate_balance_spec.rb +47 -0
- data/spec/models/authenticate_domain_model_spec.rb +1 -1
- data/spec/models/balance_data_per_contact_spec.rb +59 -0
- data/spec/models/balance_definition_page_spec.rb +41 -0
- data/spec/models/balance_definition_spec.rb +159 -0
- data/spec/models/balance_limit_spec.rb +95 -0
- data/spec/models/balance_order_spec.rb +107 -0
- data/spec/models/{get_child_info_spec.rb → balance_spec.rb} +16 -16
- data/spec/models/block_domain_spec.rb +1 -1
- data/spec/models/body_10_spec.rb +5 -5
- data/spec/models/body_11_spec.rb +20 -2
- data/spec/models/body_12_spec.rb +5 -5
- data/spec/models/body_13_spec.rb +101 -0
- data/spec/models/body_14_spec.rb +95 -0
- data/spec/models/body_15_spec.rb +71 -0
- data/spec/models/{manage_ip_spec.rb → body_16_spec.rb} +8 -8
- data/spec/models/{update_child_account_status_spec.rb → body_17_spec.rb} +11 -11
- data/spec/models/{update_child_domain_spec.rb → body_18_spec.rb} +8 -8
- data/spec/models/body_19_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +3 -9
- data/spec/models/body_2_spec.rb +3 -15
- data/spec/models/body_3_spec.rb +3 -3
- data/spec/models/body_4_spec.rb +2 -8
- data/spec/models/body_5_spec.rb +3 -15
- data/spec/models/body_6_spec.rb +5 -41
- data/spec/models/body_7_spec.rb +5 -35
- data/spec/models/body_8_spec.rb +5 -17
- data/spec/models/body_9_spec.rb +34 -2
- data/spec/models/body_spec.rb +3 -9
- data/spec/models/body_variables_items_spec.rb +1 -1
- data/spec/models/cart_spec.rb +51 -0
- data/spec/models/companies_list_spec.rb +1 -1
- data/spec/models/company_attributes_inner_spec.rb +1 -1
- data/spec/models/company_attributes_spec.rb +1 -1
- data/spec/models/company_spec.rb +1 -1
- data/spec/models/component_items_spec.rb +1 -1
- data/spec/models/configuration_spec.rb +41 -0
- data/spec/models/contact_balances_resp_spec.rb +59 -0
- data/spec/models/contact_error_model_spec.rb +57 -0
- data/spec/models/conversations_message_attachments_spec.rb +71 -0
- data/spec/models/conversations_message_file_image_info_spec.rb +1 -1
- data/spec/models/conversations_message_file_spec.rb +1 -1
- data/spec/models/conversations_message_forwarded_to_source_status_spec.rb +47 -0
- data/spec/models/{remove_credits_spec.rb → conversations_message_from_spec.rb} +9 -9
- data/spec/models/{remaining_credit_model_child_spec.rb → conversations_message_reply_to_spec.rb} +9 -9
- data/spec/models/conversations_message_spec.rb +91 -1
- data/spec/models/{remaining_credit_model_reseller_spec.rb → conversations_message_to_spec.rb} +9 -9
- data/spec/models/conversion_source_metrics_spec.rb +69 -0
- data/spec/models/conversion_source_product_spec.rb +83 -0
- data/spec/models/corporate_group_details_response_group_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_subaccounts_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_users_spec.rb +53 -0
- data/spec/models/corporateuseremailpermissions_privileges_spec.rb +55 -0
- data/spec/models/create_api_key_request_spec.rb +1 -1
- data/spec/models/create_api_key_response_spec.rb +1 -1
- data/spec/models/create_attribute_enumeration_spec.rb +1 -1
- data/spec/models/create_attribute_spec.rb +8 -2
- data/spec/models/create_balance_definition_payload_spec.rb +155 -0
- data/spec/models/create_balance_limit_payload_spec.rb +83 -0
- data/spec/models/create_balance_payload_spec.rb +41 -0
- data/spec/models/create_category_model_spec.rb +1 -1
- data/spec/models/create_child_spec.rb +1 -1
- data/spec/models/create_contact_spec.rb +1 -1
- data/spec/models/create_coupon_collection_spec.rb +19 -1
- data/spec/models/create_coupons_spec.rb +1 -1
- data/spec/models/create_doi_contact_spec.rb +1 -1
- data/spec/models/create_domain_model_dns_records_dkim_record_spec.rb +1 -1
- data/spec/models/create_domain_model_dns_records_spec.rb +7 -1
- data/spec/models/create_domain_model_spec.rb +7 -1
- data/spec/models/create_domain_spec.rb +1 -1
- data/spec/models/create_email_campaign_email_expiration_date_spec.rb +51 -0
- data/spec/models/create_email_campaign_recipients_spec.rb +7 -1
- data/spec/models/create_email_campaign_sender_spec.rb +1 -1
- data/spec/models/create_email_campaign_spec.rb +7 -1
- data/spec/models/create_external_feed_spec.rb +1 -1
- data/spec/models/create_list_spec.rb +1 -1
- data/spec/models/create_loyalty_program_payload_spec.rb +59 -0
- data/spec/models/create_model_spec.rb +1 -1
- data/spec/models/create_order_payload_spec.rb +77 -0
- data/spec/models/create_payment_request_spec.rb +71 -0
- data/spec/models/{create_reseller_spec.rb → create_payment_response_spec.rb} +9 -9
- data/spec/models/create_product_model_spec.rb +1 -1
- data/spec/models/create_sender_ips_spec.rb +1 -1
- data/spec/models/create_sender_model_spec.rb +1 -1
- data/spec/models/create_sender_spec.rb +1 -1
- data/spec/models/create_sms_campaign_recipients_spec.rb +1 -1
- data/spec/models/create_sms_campaign_spec.rb +1 -1
- data/spec/models/create_smtp_email_spec.rb +1 -1
- data/spec/models/create_smtp_template_sender_spec.rb +1 -1
- data/spec/models/create_smtp_template_spec.rb +1 -1
- data/spec/models/create_sub_account_response_spec.rb +1 -1
- data/spec/models/create_sub_account_spec.rb +7 -1
- data/spec/models/create_subscription_payload_spec.rb +53 -0
- data/spec/models/create_subscription_response_spec.rb +77 -0
- data/spec/models/create_tier_group_request_spec.rb +67 -0
- data/spec/models/create_transaction_payload_spec.rb +89 -0
- data/spec/models/create_update_batch_category_model_spec.rb +1 -1
- data/spec/models/create_update_batch_category_spec.rb +1 -1
- data/spec/models/create_update_batch_products_model_spec.rb +1 -1
- data/spec/models/create_update_batch_products_spec.rb +1 -1
- data/spec/models/create_update_categories_spec.rb +7 -1
- data/spec/models/create_update_category_spec.rb +7 -1
- data/spec/models/create_update_contact_model_spec.rb +1 -1
- data/spec/models/create_update_folder_spec.rb +1 -1
- data/spec/models/create_update_product_spec.rb +7 -1
- data/spec/models/create_update_products_spec.rb +7 -1
- data/spec/models/create_webhook_spec.rb +29 -1
- data/spec/models/create_whats_app_campaign_recipients_spec.rb +1 -1
- data/spec/models/create_whats_app_campaign_spec.rb +1 -1
- data/spec/models/create_whats_app_template_spec.rb +12 -2
- data/spec/models/created_batch_id_spec.rb +1 -1
- data/spec/models/created_process_id_spec.rb +1 -1
- data/spec/models/deal_attributes_inner_spec.rb +1 -1
- data/spec/models/deal_attributes_spec.rb +1 -1
- data/spec/models/deal_spec.rb +1 -1
- data/spec/models/deals_list_spec.rb +1 -1
- data/spec/models/delete_hardbounces_spec.rb +1 -1
- data/spec/models/email_export_recipients_spec.rb +1 -1
- data/spec/models/error_model_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +41 -0
- data/spec/models/event_identifiers_spec.rb +65 -0
- data/spec/models/event_spec.rb +65 -0
- data/spec/models/export_webhooks_history_spec.rb +12 -2
- data/spec/models/{get_child_info_statistics_spec.rb → fetch_template_preview_spec.rb} +10 -10
- data/spec/models/file_data_spec.rb +1 -1
- data/spec/models/file_downloadable_link_spec.rb +1 -1
- data/spec/models/file_list_spec.rb +1 -1
- data/spec/models/get_account_activity_logs_spec.rb +1 -1
- data/spec/models/get_account_activity_spec.rb +1 -1
- data/spec/models/get_account_marketing_automation_spec.rb +1 -1
- data/spec/models/get_account_plan_spec.rb +2 -8
- data/spec/models/get_account_relay_data_spec.rb +1 -1
- data/spec/models/get_account_relay_spec.rb +1 -1
- data/spec/models/get_account_spec.rb +1 -1
- data/spec/models/get_aggregated_report_spec.rb +1 -1
- data/spec/models/get_all_external_feeds_feeds_spec.rb +1 -1
- data/spec/models/get_all_external_feeds_spec.rb +1 -1
- data/spec/models/get_attributes_attributes_spec.rb +8 -2
- data/spec/models/get_attributes_enumeration_spec.rb +1 -1
- data/spec/models/get_attributes_spec.rb +1 -1
- data/spec/models/get_blocked_domains_spec.rb +1 -1
- data/spec/models/get_campaign_overview_spec.rb +1 -1
- data/spec/models/get_campaign_recipients_spec.rb +1 -1
- data/spec/models/get_campaign_stats_spec.rb +13 -1
- data/spec/models/get_categories_spec.rb +1 -1
- data/spec/models/get_category_details_spec.rb +1 -1
- data/spec/models/get_child_domain_spec.rb +1 -1
- data/spec/models/get_client_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_clicked_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_opened_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_transac_attributes_spec.rb +1 -1
- data/spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb +1 -1
- data/spec/models/get_contact_details_spec.rb +1 -1
- data/spec/models/get_contacts_spec.rb +1 -1
- data/spec/models/get_corporate_invited_users_list_feature_access_spec.rb +89 -0
- data/spec/models/get_corporate_invited_users_list_groups_spec.rb +47 -0
- data/spec/models/get_corporate_invited_users_list_spec.rb +41 -0
- data/spec/models/get_corporate_invited_users_list_users_spec.rb +65 -0
- data/spec/models/get_corporate_user_permission_feature_access_spec.rb +89 -0
- data/spec/models/get_corporate_user_permission_groups_spec.rb +47 -0
- data/spec/models/get_corporate_user_permission_spec.rb +59 -0
- data/spec/models/get_coupon_collection_spec.rb +19 -1
- data/spec/models/get_device_browser_stats_spec.rb +1 -1
- data/spec/models/get_domain_configuration_model_spec.rb +1 -1
- data/spec/models/get_domains_list_domains_spec.rb +1 -1
- data/spec/models/get_domains_list_spec.rb +1 -1
- data/spec/models/get_email_campaign_spec.rb +25 -1
- data/spec/models/get_email_campaigns_spec.rb +1 -1
- data/spec/models/get_email_event_report_events_spec.rb +1 -1
- data/spec/models/get_email_event_report_spec.rb +1 -1
- data/spec/models/get_extended_campaign_overview_sender_spec.rb +1 -1
- data/spec/models/get_extended_campaign_overview_spec.rb +25 -1
- data/spec/models/get_extended_campaign_stats_global_stats_spec.rb +1 -1
- data/spec/models/get_extended_campaign_stats_spec.rb +1 -1
- data/spec/models/get_extended_client_address_spec.rb +1 -1
- data/spec/models/get_extended_client_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_clicked_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_links_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_messages_sent_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +1 -1
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb +1 -1
- data/spec/models/get_extended_list_campaign_stats_spec.rb +1 -1
- data/spec/models/get_extended_list_spec.rb +1 -1
- data/spec/models/get_external_feed_by_uuid_headers_spec.rb +1 -1
- data/spec/models/get_external_feed_by_uuid_spec.rb +1 -1
- data/spec/models/get_folder_lists_spec.rb +1 -1
- data/spec/models/get_folder_spec.rb +1 -1
- data/spec/models/get_folders_spec.rb +1 -1
- data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +1 -1
- data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +1 -1
- data/spec/models/get_inbound_email_events_by_uuid_spec.rb +1 -1
- data/spec/models/get_inbound_email_events_events_spec.rb +1 -1
- data/spec/models/get_inbound_email_events_spec.rb +1 -1
- data/spec/models/get_invited_users_list_feature_access_spec.rb +1 -1
- data/spec/models/get_invited_users_list_spec.rb +1 -1
- data/spec/models/get_invited_users_list_users_spec.rb +1 -1
- data/spec/models/get_ip_from_sender_spec.rb +1 -1
- data/spec/models/get_ip_spec.rb +1 -1
- data/spec/models/get_ips_from_sender_spec.rb +1 -1
- data/spec/models/get_ips_spec.rb +1 -1
- data/spec/models/get_list_spec.rb +1 -1
- data/spec/models/get_lists_spec.rb +1 -1
- data/spec/models/{get_children_list_spec.rb → get_orders_spec.rb} +8 -8
- data/spec/models/get_payment_request_spec.rb +81 -0
- data/spec/models/get_process_spec.rb +1 -1
- data/spec/models/get_processes_spec.rb +1 -1
- data/spec/models/get_product_details_spec.rb +1 -1
- data/spec/models/get_products_spec.rb +1 -1
- data/spec/models/get_reports_reports_spec.rb +1 -1
- data/spec/models/get_reports_spec.rb +1 -1
- data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +1 -1
- data/spec/models/get_scheduled_email_by_batch_id_spec.rb +1 -1
- data/spec/models/get_scheduled_email_by_message_id_spec.rb +1 -1
- data/spec/models/{get_segments_segments_spec.rb → get_segment_spec.rb} +7 -7
- data/spec/models/get_segments_spec.rb +1 -1
- data/spec/models/get_senders_list_ips_spec.rb +1 -1
- data/spec/models/get_senders_list_senders_spec.rb +1 -1
- data/spec/models/get_senders_list_spec.rb +1 -1
- data/spec/models/get_shared_template_url_spec.rb +1 -1
- data/spec/models/get_sms_campaign_overview_spec.rb +1 -1
- data/spec/models/get_sms_campaign_recipients_spec.rb +1 -1
- data/spec/models/get_sms_campaign_spec.rb +1 -1
- data/spec/models/get_sms_campaign_stats_spec.rb +1 -1
- data/spec/models/get_sms_campaigns_spec.rb +1 -1
- data/spec/models/get_sms_event_report_events_spec.rb +2 -2
- data/spec/models/get_sms_event_report_spec.rb +1 -1
- data/spec/models/get_smtp_template_overview_sender_spec.rb +1 -1
- data/spec/models/get_smtp_template_overview_spec.rb +1 -1
- data/spec/models/get_smtp_templates_spec.rb +1 -1
- data/spec/models/get_sso_token_spec.rb +1 -1
- data/spec/models/get_stats_by_browser_spec.rb +1 -1
- data/spec/models/get_stats_by_device_spec.rb +1 -1
- data/spec/models/get_stats_by_domain_spec.rb +1 -1
- data/spec/models/get_transac_aggregated_sms_report_spec.rb +7 -1
- data/spec/models/get_transac_blocked_contacts_contacts_spec.rb +1 -1
- data/spec/models/get_transac_blocked_contacts_reason_spec.rb +1 -1
- data/spec/models/get_transac_blocked_contacts_spec.rb +1 -1
- data/spec/models/get_transac_email_content_events_spec.rb +1 -1
- data/spec/models/get_transac_email_content_spec.rb +1 -1
- data/spec/models/get_transac_emails_list_spec.rb +1 -1
- data/spec/models/get_transac_emails_list_transactional_emails_spec.rb +1 -1
- data/spec/models/get_transac_sms_report_reports_spec.rb +7 -1
- data/spec/models/get_transac_sms_report_spec.rb +1 -1
- data/spec/models/get_user_permission_privileges_spec.rb +1 -1
- data/spec/models/get_user_permission_spec.rb +1 -1
- data/spec/models/get_wa_templates_spec.rb +1 -1
- data/spec/models/get_wa_templates_templates_spec.rb +1 -1
- data/spec/models/{get_child_info_api_keys_spec.rb → get_webhook_auth_spec.rb} +9 -9
- data/spec/models/{get_child_info_api_keys_v3_spec.rb → get_webhook_headers_spec.rb} +9 -9
- data/spec/models/get_webhook_spec.rb +19 -1
- data/spec/models/get_webhooks_spec.rb +1 -1
- data/spec/models/get_whats_app_config_spec.rb +1 -1
- data/spec/models/get_whatsapp_campaign_overview_spec.rb +1 -1
- data/spec/models/get_whatsapp_campaigns_campaigns_spec.rb +1 -1
- data/spec/models/get_whatsapp_campaigns_spec.rb +1 -1
- data/spec/models/get_whatsapp_event_report_events_spec.rb +1 -1
- data/spec/models/get_whatsapp_event_report_spec.rb +1 -1
- data/spec/models/inline_response_200_1_spec.rb +2 -8
- data/spec/models/inline_response_200_2_spec.rb +41 -0
- data/spec/models/inline_response_200_3_spec.rb +41 -0
- data/spec/models/inline_response_200_4_spec.rb +41 -0
- data/spec/models/inline_response_200_5_spec.rb +41 -0
- data/spec/models/inline_response_200_6_spec.rb +47 -0
- data/spec/models/inline_response_200_6_totals_spec.rb +53 -0
- data/spec/models/inline_response_200_7_spec.rb +47 -0
- data/spec/models/inline_response_200_8_spec.rb +41 -0
- data/spec/models/inline_response_200_9_spec.rb +53 -0
- data/spec/models/inline_response_200_spec.rb +2 -2
- data/spec/models/inline_response_201_1_spec.rb +1 -1
- data/spec/models/inline_response_201_2_spec.rb +1 -1
- data/spec/models/inline_response_201_3_spec.rb +2 -2
- data/spec/models/inline_response_201_4_spec.rb +2 -2
- data/spec/models/inline_response_201_5_spec.rb +41 -0
- data/spec/models/inline_response_201_spec.rb +1 -1
- data/spec/models/inline_response_400_spec.rb +41 -0
- data/spec/models/invite_admin_user_privileges_spec.rb +55 -0
- data/spec/models/invite_admin_user_spec.rb +59 -0
- data/spec/models/inviteuser_privileges_spec.rb +55 -0
- data/spec/models/inviteuser_spec.rb +53 -0
- data/spec/models/loyalty_program_page_spec.rb +41 -0
- data/spec/models/loyalty_program_spec.rb +111 -0
- data/spec/models/loyalty_program_validation_error_spec.rb +53 -0
- data/spec/models/loyalty_tier_page_spec.rb +41 -0
- data/spec/models/main_attribute_reward_payload_spec.rb +77 -0
- data/spec/models/main_billing_payload_spec.rb +77 -0
- data/spec/models/main_code_count_http_response_spec.rb +41 -0
- data/spec/models/main_create_redeem_payload_order_spec.rb +35 -0
- data/spec/models/main_create_redeem_payload_spec.rb +83 -0
- data/spec/models/main_create_reward_payload_spec.rb +59 -0
- data/spec/models/main_create_reward_response_spec.rb +83 -0
- data/spec/models/main_error_response_spec.rb +41 -0
- data/spec/models/{add_credits_spec.rb → main_filter_spec.rb} +9 -9
- data/spec/models/main_generator_spec.rb +71 -0
- data/spec/models/main_get_contact_rewards_payload_spec.rb +85 -0
- data/spec/models/main_identifiers_payload_spec.rb +47 -0
- data/spec/models/main_limit_spec.rb +83 -0
- data/spec/models/main_model_contact_reward_spec.rb +95 -0
- data/spec/models/main_model_contact_rewards_resp_spec.rb +65 -0
- data/spec/models/main_node_response_spec.rb +83 -0
- data/spec/models/main_order_payload_billing_spec.rb +35 -0
- data/spec/models/main_order_payload_identifiers_spec.rb +35 -0
- data/spec/models/main_order_payload_spec.rb +107 -0
- data/spec/models/main_product_payload_spec.rb +65 -0
- data/spec/models/main_product_spec.rb +59 -0
- data/spec/models/main_redeem_spec.rb +119 -0
- data/spec/models/main_result_parameter_response_spec.rb +47 -0
- data/spec/models/main_result_parameter_response_value_spec.rb +35 -0
- data/spec/models/main_reward_attribution_spec.rb +101 -0
- data/spec/models/main_reward_configurations_spec.rb +53 -0
- data/spec/models/main_reward_generator_spec.rb +35 -0
- data/spec/models/main_reward_page_obj_spec.rb +89 -0
- data/spec/models/main_reward_page_spec.rb +47 -0
- data/spec/models/main_reward_rule_spec.rb +35 -0
- data/spec/models/main_reward_spec.rb +279 -0
- data/spec/models/main_reward_validate_spec.rb +41 -0
- data/spec/models/main_rule_condition_response_lhs_spec.rb +35 -0
- data/spec/models/main_rule_condition_response_rhs_spec.rb +35 -0
- data/spec/models/main_rule_condition_response_spec.rb +65 -0
- data/spec/models/main_rule_condition_spec.rb +35 -0
- data/spec/models/{get_child_info_api_keys_v2_spec.rb → main_rule_event_response_spec.rb} +8 -8
- data/spec/models/{get_child_domains_spec.rb → main_rule_event_spec.rb} +7 -7
- data/spec/models/main_rule_result_response_spec.rb +53 -0
- data/spec/models/main_rule_spec.rb +113 -0
- data/spec/models/main_validate_reward_payload_spec.rb +71 -0
- data/spec/models/main_value_response_expression_spec.rb +35 -0
- data/spec/models/main_value_response_spec.rb +83 -0
- data/spec/models/main_voucher_revoke_payload_spec.rb +41 -0
- data/spec/models/master_details_response_billing_info_address_spec.rb +1 -1
- data/spec/models/master_details_response_billing_info_name_spec.rb +1 -1
- data/spec/models/master_details_response_billing_info_spec.rb +1 -1
- data/spec/models/master_details_response_plan_info_features_spec.rb +13 -1
- data/spec/models/master_details_response_plan_info_spec.rb +1 -1
- data/spec/models/master_details_response_spec.rb +1 -1
- data/spec/models/member_contact_spec.rb +53 -0
- data/spec/models/model_subscription_balance_resp_spec.rb +41 -0
- data/spec/models/note_data_spec.rb +1 -1
- data/spec/models/note_id_spec.rb +1 -1
- data/spec/models/note_list_spec.rb +1 -1
- data/spec/models/note_spec.rb +1 -1
- data/spec/models/notification_spec.rb +51 -0
- data/spec/models/order_batch_spec.rb +7 -1
- data/spec/models/order_billing_spec.rb +7 -1
- data/spec/models/order_identifiers_spec.rb +59 -0
- data/spec/models/order_products_spec.rb +1 -1
- data/spec/models/order_spec.rb +15 -3
- data/spec/models/otp_spec.rb +1 -1
- data/spec/models/patch_loyalty_program_payload_spec.rb +53 -0
- data/spec/models/pipeline_spec.rb +1 -1
- data/spec/models/pipeline_stage_spec.rb +1 -1
- data/spec/models/pipelines_spec.rb +1 -1
- data/spec/models/post_contact_info_contacts_spec.rb +1 -1
- data/spec/models/post_contact_info_spec.rb +1 -1
- data/spec/models/post_send_failed_spec.rb +1 -1
- data/spec/models/post_send_sms_test_failed_spec.rb +1 -1
- data/spec/models/put_revoke_user_permission_spec.rb +41 -0
- data/spec/models/putresendcancelinvitation_spec.rb +41 -0
- data/spec/models/remove_contact_from_list_spec.rb +7 -1
- data/spec/models/request_contact_export_custom_contact_filter_spec.rb +7 -1
- data/spec/models/request_contact_export_spec.rb +25 -1
- data/spec/models/request_contact_import_json_body_spec.rb +1 -1
- data/spec/models/request_contact_import_new_list_spec.rb +1 -1
- data/spec/models/request_contact_import_spec.rb +7 -1
- data/spec/models/request_sms_recipient_export_spec.rb +1 -1
- data/spec/models/schedule_smtp_email_spec.rb +1 -1
- data/spec/models/send_report_email_spec.rb +1 -1
- data/spec/models/send_report_spec.rb +1 -1
- data/spec/models/send_sms_spec.rb +1 -1
- data/spec/models/send_smtp_email_attachment_spec.rb +1 -1
- data/spec/models/send_smtp_email_bcc_spec.rb +1 -1
- data/spec/models/send_smtp_email_cc_spec.rb +1 -1
- data/spec/models/send_smtp_email_message_versions_spec.rb +13 -1
- data/spec/models/send_smtp_email_reply_to_1_spec.rb +1 -1
- data/spec/models/send_smtp_email_reply_to_spec.rb +1 -1
- data/spec/models/send_smtp_email_sender_spec.rb +1 -1
- data/spec/models/send_smtp_email_spec.rb +1 -1
- data/spec/models/send_smtp_email_to_1_spec.rb +1 -1
- data/spec/models/send_smtp_email_to_spec.rb +1 -1
- data/spec/models/send_test_email_spec.rb +1 -1
- data/spec/models/send_test_sms_spec.rb +1 -1
- data/spec/models/send_transac_sms_spec.rb +1 -1
- data/spec/models/send_transac_sms_tag_spec.rb +41 -0
- data/spec/models/send_whatsapp_message_spec.rb +7 -1
- data/spec/models/{get_child_account_creation_status_spec.rb → set_config_display_currency_spec.rb} +8 -8
- data/spec/models/sso_token_request_corporate_spec.rb +41 -0
- data/spec/models/sso_token_request_spec.rb +1 -1
- data/spec/models/sub_account_apps_toggle_request_spec.rb +1 -1
- data/spec/models/sub_account_details_response_groups_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +1 -1
- data/spec/models/sub_account_details_response_plan_info_credits_external_feeds_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_sms_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +20 -2
- data/spec/models/sub_account_details_response_plan_info_credits_whatsapp_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_wp_subscribers_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +1 -1
- data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +1 -1
- data/spec/models/sub_account_details_response_plan_info_features_sales_users_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_spec.rb +7 -1
- data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +1 -1
- data/spec/models/sub_account_details_response_plan_info_spec.rb +1 -1
- data/spec/models/sub_account_details_response_spec.rb +7 -1
- data/spec/models/sub_account_update_plan_request_credits_spec.rb +25 -1
- data/spec/models/sub_account_update_plan_request_features_spec.rb +7 -1
- data/spec/models/sub_account_update_plan_request_spec.rb +1 -1
- data/spec/models/sub_accounts_response_groups_spec.rb +47 -0
- data/spec/models/sub_accounts_response_spec.rb +1 -1
- data/spec/models/sub_accounts_response_sub_accounts_spec.rb +7 -1
- data/spec/models/sub_accounts_update_plan_request_credits_spec.rb +65 -0
- data/spec/models/sub_accounts_update_plan_request_features_spec.rb +53 -0
- data/spec/models/sub_accounts_update_plan_request_spec.rb +53 -0
- data/spec/models/subscription_aggregate_balance_spec.rb +47 -0
- data/spec/models/subscription_attributed_reward_spec.rb +89 -0
- data/spec/models/subscription_balances_spec.rb +53 -0
- data/spec/models/subscription_handler_info_balance_spec.rb +35 -0
- data/spec/models/subscription_handler_info_spec.rb +59 -0
- data/spec/models/subscription_member_spec.rb +65 -0
- data/spec/models/subscription_spec.rb +77 -0
- data/spec/models/subscription_tier_spec.rb +77 -0
- data/spec/models/task_list_spec.rb +1 -1
- data/spec/models/task_reminder_spec.rb +1 -1
- data/spec/models/task_spec.rb +1 -1
- data/spec/models/task_types_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +71 -0
- data/spec/models/tier_access_conditions_spec.rb +59 -0
- data/spec/models/tier_for_contact_spec.rb +77 -0
- data/spec/models/tier_group_page_spec.rb +41 -0
- data/spec/models/tier_group_spec.rb +91 -0
- data/spec/models/tier_request_access_conditions_spec.rb +47 -0
- data/spec/models/tier_request_put_payload_spec.rb +59 -0
- data/spec/models/tier_request_spec.rb +59 -0
- data/spec/models/tier_request_tier_rewards_spec.rb +41 -0
- data/spec/models/tier_spec.rb +89 -0
- data/spec/models/tier_tier_rewards_spec.rb +53 -0
- data/spec/models/transaction_history_resp_spec.rb +65 -0
- data/spec/models/transaction_history_spec.rb +95 -0
- data/spec/models/transaction_spec.rb +125 -0
- data/spec/models/unauthorized_response_spec.rb +41 -0
- data/spec/models/update_attribute_enumeration_spec.rb +1 -1
- data/spec/models/update_attribute_spec.rb +7 -1
- data/spec/models/update_balance_definition_payload_spec.rb +155 -0
- data/spec/models/update_balance_limit_payload_spec.rb +83 -0
- data/spec/models/update_batch_contacts_contacts_spec.rb +1 -1
- data/spec/models/update_batch_contacts_model_spec.rb +1 -1
- data/spec/models/update_batch_contacts_spec.rb +1 -1
- data/spec/models/update_campaign_status_spec.rb +1 -1
- data/spec/models/update_child_spec.rb +1 -1
- data/spec/models/update_contact_spec.rb +1 -1
- data/spec/models/update_coupon_collection_spec.rb +19 -1
- data/spec/models/update_email_campaign_email_expiration_date_spec.rb +51 -0
- data/spec/models/update_email_campaign_recipients_spec.rb +7 -1
- data/spec/models/update_email_campaign_sender_spec.rb +1 -1
- data/spec/models/update_email_campaign_spec.rb +7 -1
- data/spec/models/update_external_feed_spec.rb +1 -1
- data/spec/models/update_list_spec.rb +1 -1
- data/spec/models/update_loyalty_program_payload_spec.rb +53 -0
- data/spec/models/update_sender_spec.rb +1 -1
- data/spec/models/update_sms_campaign_spec.rb +1 -1
- data/spec/models/update_smtp_template_sender_spec.rb +1 -1
- data/spec/models/update_smtp_template_spec.rb +1 -1
- data/spec/models/update_tier_group_request_spec.rb +67 -0
- data/spec/models/update_webhook_spec.rb +19 -1
- data/spec/models/update_whats_app_campaign_spec.rb +1 -1
- data/spec/models/upload_image_model_spec.rb +1 -1
- data/spec/models/upload_image_to_gallery_spec.rb +1 -1
- data/spec/models/validation_errors_spec.rb +35 -0
- data/spec/models/variables_items_spec.rb +1 -1
- data/spec/models/whatsapp_camp_stats_spec.rb +1 -1
- data/spec/models/whatsapp_camp_template_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +1013 -387
- data/docs/AddCredits.md +0 -9
- data/docs/CreateReseller.md +0 -9
- data/docs/GetChildAccountCreationStatus.md +0 -8
- data/docs/GetChildInfo.md +0 -16
- data/docs/GetChildInfoApiKeys.md +0 -9
- data/docs/GetChildInfoApiKeysV2.md +0 -9
- data/docs/GetChildInfoApiKeysV3.md +0 -9
- data/docs/GetChildInfoCredits.md +0 -9
- data/docs/GetChildInfoStatistics.md +0 -10
- data/docs/GetChildrenList.md +0 -9
- data/docs/RemainingCreditModel.md +0 -9
- data/docs/RemainingCreditModelChild.md +0 -9
- data/docs/RemainingCreditModelReseller.md +0 -9
- data/docs/RemoveCredits.md +0 -9
- data/docs/ResellerApi.md +0 -964
- data/docs/UpdateChildAccountStatus.md +0 -11
- data/docs/UpdateChildDomain.md +0 -8
- data/lib/brevo/api/reseller_api.rb +0 -923
- data/lib/brevo/models/get_child_info_statistics.rb +0 -206
- data/spec/api/reseller_api_spec.rb +0 -223
- data/spec/models/get_child_info_credits_spec.rb +0 -47
- data/spec/models/remaining_credit_model_spec.rb +0 -47
|
@@ -0,0 +1,1244 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Brevo API
|
|
3
|
+
|
|
4
|
+
#Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 3.0.0
|
|
7
|
+
Contact: contact@brevo.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.19
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module Brevo
|
|
16
|
+
class BalanceApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create new transaction
|
|
23
|
+
# Creates new transaction and returns information
|
|
24
|
+
# @param pid Loyalty Program Id
|
|
25
|
+
# @param body Transaction Payload
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Transaction]
|
|
28
|
+
def begin_transaction(pid, body, opts = {})
|
|
29
|
+
data, _status_code, _headers = begin_transaction_with_http_info(pid, body, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create new transaction
|
|
34
|
+
# Creates new transaction and returns information
|
|
35
|
+
# @param pid Loyalty Program Id
|
|
36
|
+
# @param body Transaction Payload
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Transaction, Fixnum, Hash)>] Transaction data, response status code and response headers
|
|
39
|
+
def begin_transaction_with_http_info(pid, body, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.begin_transaction ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'pid' is set
|
|
44
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.begin_transaction"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'body' is set
|
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.begin_transaction"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/loyalty/balance/programs/{pid}/transactions'.sub('{' + 'pid' + '}', pid.to_s)
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
|
|
64
|
+
# form parameters
|
|
65
|
+
form_params = {}
|
|
66
|
+
|
|
67
|
+
# http body (model)
|
|
68
|
+
post_body = @api_client.object_to_http_body(body)
|
|
69
|
+
auth_names = ['api-key', 'partner-key']
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => 'Transaction')
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: BalanceApi#begin_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
# Cancel transaction
|
|
83
|
+
# Cancels transaction
|
|
84
|
+
# @param pid Loyalty Program Id
|
|
85
|
+
# @param tid Transaction Id
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Transaction]
|
|
88
|
+
def cancel_transaction(pid, tid, opts = {})
|
|
89
|
+
data, _status_code, _headers = cancel_transaction_with_http_info(pid, tid, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Cancel transaction
|
|
94
|
+
# Cancels transaction
|
|
95
|
+
# @param pid Loyalty Program Id
|
|
96
|
+
# @param tid Transaction Id
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [Array<(Transaction, Fixnum, Hash)>] Transaction data, response status code and response headers
|
|
99
|
+
def cancel_transaction_with_http_info(pid, tid, opts = {})
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.cancel_transaction ...'
|
|
102
|
+
end
|
|
103
|
+
# verify the required parameter 'pid' is set
|
|
104
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.cancel_transaction"
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'tid' is set
|
|
108
|
+
if @api_client.config.client_side_validation && tid.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'tid' when calling BalanceApi.cancel_transaction"
|
|
110
|
+
end
|
|
111
|
+
# resource path
|
|
112
|
+
local_var_path = '/loyalty/balance/programs/{pid}/transactions/{tid}/cancel'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'tid' + '}', tid.to_s)
|
|
113
|
+
|
|
114
|
+
# query parameters
|
|
115
|
+
query_params = {}
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = nil
|
|
129
|
+
auth_names = ['api-key', 'partner-key']
|
|
130
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => 'Transaction')
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "API called: BalanceApi#cancel_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
+
end
|
|
140
|
+
return data, status_code, headers
|
|
141
|
+
end
|
|
142
|
+
# Complete transaction
|
|
143
|
+
# Completes transaction
|
|
144
|
+
# @param pid Loyalty Program Id
|
|
145
|
+
# @param tid Transaction Id
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [Transaction]
|
|
148
|
+
def complete_transaction(pid, tid, opts = {})
|
|
149
|
+
data, _status_code, _headers = complete_transaction_with_http_info(pid, tid, opts)
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Complete transaction
|
|
154
|
+
# Completes transaction
|
|
155
|
+
# @param pid Loyalty Program Id
|
|
156
|
+
# @param tid Transaction Id
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @return [Array<(Transaction, Fixnum, Hash)>] Transaction data, response status code and response headers
|
|
159
|
+
def complete_transaction_with_http_info(pid, tid, opts = {})
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.complete_transaction ...'
|
|
162
|
+
end
|
|
163
|
+
# verify the required parameter 'pid' is set
|
|
164
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
165
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.complete_transaction"
|
|
166
|
+
end
|
|
167
|
+
# verify the required parameter 'tid' is set
|
|
168
|
+
if @api_client.config.client_side_validation && tid.nil?
|
|
169
|
+
fail ArgumentError, "Missing the required parameter 'tid' when calling BalanceApi.complete_transaction"
|
|
170
|
+
end
|
|
171
|
+
# resource path
|
|
172
|
+
local_var_path = '/loyalty/balance/programs/{pid}/transactions/{tid}/complete'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'tid' + '}', tid.to_s)
|
|
173
|
+
|
|
174
|
+
# query parameters
|
|
175
|
+
query_params = {}
|
|
176
|
+
|
|
177
|
+
# header parameters
|
|
178
|
+
header_params = {}
|
|
179
|
+
# HTTP header 'Accept' (if needed)
|
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
181
|
+
# HTTP header 'Content-Type'
|
|
182
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
183
|
+
|
|
184
|
+
# form parameters
|
|
185
|
+
form_params = {}
|
|
186
|
+
|
|
187
|
+
# http body (model)
|
|
188
|
+
post_body = nil
|
|
189
|
+
auth_names = ['api-key', 'partner-key']
|
|
190
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
191
|
+
:header_params => header_params,
|
|
192
|
+
:query_params => query_params,
|
|
193
|
+
:form_params => form_params,
|
|
194
|
+
:body => post_body,
|
|
195
|
+
:auth_names => auth_names,
|
|
196
|
+
:return_type => 'Transaction')
|
|
197
|
+
if @api_client.config.debugging
|
|
198
|
+
@api_client.config.logger.debug "API called: BalanceApi#complete_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
199
|
+
end
|
|
200
|
+
return data, status_code, headers
|
|
201
|
+
end
|
|
202
|
+
# Create balance limits
|
|
203
|
+
# Creates balance limit and sends the created UUID along with the data
|
|
204
|
+
# @param pid Loyalty Program Id
|
|
205
|
+
# @param bdid Balance Definition Id
|
|
206
|
+
# @param body Balance Definition Payload
|
|
207
|
+
# @param [Hash] opts the optional parameters
|
|
208
|
+
# @return [BalanceLimit]
|
|
209
|
+
def create_balance_limit(pid, bdid, body, opts = {})
|
|
210
|
+
data, _status_code, _headers = create_balance_limit_with_http_info(pid, bdid, body, opts)
|
|
211
|
+
data
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Create balance limits
|
|
215
|
+
# Creates balance limit and sends the created UUID along with the data
|
|
216
|
+
# @param pid Loyalty Program Id
|
|
217
|
+
# @param bdid Balance Definition Id
|
|
218
|
+
# @param body Balance Definition Payload
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @return [Array<(BalanceLimit, Fixnum, Hash)>] BalanceLimit data, response status code and response headers
|
|
221
|
+
def create_balance_limit_with_http_info(pid, bdid, body, opts = {})
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.create_balance_limit ...'
|
|
224
|
+
end
|
|
225
|
+
# verify the required parameter 'pid' is set
|
|
226
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
227
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.create_balance_limit"
|
|
228
|
+
end
|
|
229
|
+
# verify the required parameter 'bdid' is set
|
|
230
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
231
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.create_balance_limit"
|
|
232
|
+
end
|
|
233
|
+
# verify the required parameter 'body' is set
|
|
234
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.create_balance_limit"
|
|
236
|
+
end
|
|
237
|
+
# resource path
|
|
238
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s)
|
|
239
|
+
|
|
240
|
+
# query parameters
|
|
241
|
+
query_params = {}
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
247
|
+
# HTTP header 'Content-Type'
|
|
248
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
249
|
+
|
|
250
|
+
# form parameters
|
|
251
|
+
form_params = {}
|
|
252
|
+
|
|
253
|
+
# http body (model)
|
|
254
|
+
post_body = @api_client.object_to_http_body(body)
|
|
255
|
+
auth_names = ['api-key', 'partner-key']
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
257
|
+
:header_params => header_params,
|
|
258
|
+
:query_params => query_params,
|
|
259
|
+
:form_params => form_params,
|
|
260
|
+
:body => post_body,
|
|
261
|
+
:auth_names => auth_names,
|
|
262
|
+
:return_type => 'BalanceLimit')
|
|
263
|
+
if @api_client.config.debugging
|
|
264
|
+
@api_client.config.logger.debug "API called: BalanceApi#create_balance_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
265
|
+
end
|
|
266
|
+
return data, status_code, headers
|
|
267
|
+
end
|
|
268
|
+
# Create balance order
|
|
269
|
+
# Returns created order
|
|
270
|
+
# @param pid Loyalty Program Id
|
|
271
|
+
# @param body Order Payload
|
|
272
|
+
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @return [BalanceOrder]
|
|
274
|
+
def create_balance_order(pid, body, opts = {})
|
|
275
|
+
data, _status_code, _headers = create_balance_order_with_http_info(pid, body, opts)
|
|
276
|
+
data
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Create balance order
|
|
280
|
+
# Returns created order
|
|
281
|
+
# @param pid Loyalty Program Id
|
|
282
|
+
# @param body Order Payload
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @return [Array<(BalanceOrder, Fixnum, Hash)>] BalanceOrder data, response status code and response headers
|
|
285
|
+
def create_balance_order_with_http_info(pid, body, opts = {})
|
|
286
|
+
if @api_client.config.debugging
|
|
287
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.create_balance_order ...'
|
|
288
|
+
end
|
|
289
|
+
# verify the required parameter 'pid' is set
|
|
290
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
291
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.create_balance_order"
|
|
292
|
+
end
|
|
293
|
+
# verify the required parameter 'body' is set
|
|
294
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
295
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.create_balance_order"
|
|
296
|
+
end
|
|
297
|
+
# resource path
|
|
298
|
+
local_var_path = '/loyalty/balance/programs/{pid}/create-order'.sub('{' + 'pid' + '}', pid.to_s)
|
|
299
|
+
|
|
300
|
+
# query parameters
|
|
301
|
+
query_params = {}
|
|
302
|
+
|
|
303
|
+
# header parameters
|
|
304
|
+
header_params = {}
|
|
305
|
+
# HTTP header 'Accept' (if needed)
|
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
307
|
+
# HTTP header 'Content-Type'
|
|
308
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
309
|
+
|
|
310
|
+
# form parameters
|
|
311
|
+
form_params = {}
|
|
312
|
+
|
|
313
|
+
# http body (model)
|
|
314
|
+
post_body = @api_client.object_to_http_body(body)
|
|
315
|
+
auth_names = ['api-key', 'partner-key']
|
|
316
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
317
|
+
:header_params => header_params,
|
|
318
|
+
:query_params => query_params,
|
|
319
|
+
:form_params => form_params,
|
|
320
|
+
:body => post_body,
|
|
321
|
+
:auth_names => auth_names,
|
|
322
|
+
:return_type => 'BalanceOrder')
|
|
323
|
+
if @api_client.config.debugging
|
|
324
|
+
@api_client.config.logger.debug "API called: BalanceApi#create_balance_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
325
|
+
end
|
|
326
|
+
return data, status_code, headers
|
|
327
|
+
end
|
|
328
|
+
# Delete balance definition
|
|
329
|
+
# Delete Balance definition
|
|
330
|
+
# @param pid Loyalty Program Id
|
|
331
|
+
# @param bdid Balance Definition Id
|
|
332
|
+
# @param [Hash] opts the optional parameters
|
|
333
|
+
# @return [nil]
|
|
334
|
+
def delete_balance_definition(pid, bdid, opts = {})
|
|
335
|
+
delete_balance_definition_with_http_info(pid, bdid, opts)
|
|
336
|
+
nil
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Delete balance definition
|
|
340
|
+
# Delete Balance definition
|
|
341
|
+
# @param pid Loyalty Program Id
|
|
342
|
+
# @param bdid Balance Definition Id
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
345
|
+
def delete_balance_definition_with_http_info(pid, bdid, opts = {})
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.delete_balance_definition ...'
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'pid' is set
|
|
350
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.delete_balance_definition"
|
|
352
|
+
end
|
|
353
|
+
# verify the required parameter 'bdid' is set
|
|
354
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
355
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.delete_balance_definition"
|
|
356
|
+
end
|
|
357
|
+
# resource path
|
|
358
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s)
|
|
359
|
+
|
|
360
|
+
# query parameters
|
|
361
|
+
query_params = {}
|
|
362
|
+
|
|
363
|
+
# header parameters
|
|
364
|
+
header_params = {}
|
|
365
|
+
# HTTP header 'Accept' (if needed)
|
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
367
|
+
# HTTP header 'Content-Type'
|
|
368
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
369
|
+
|
|
370
|
+
# form parameters
|
|
371
|
+
form_params = {}
|
|
372
|
+
|
|
373
|
+
# http body (model)
|
|
374
|
+
post_body = nil
|
|
375
|
+
auth_names = ['api-key', 'partner-key']
|
|
376
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
377
|
+
:header_params => header_params,
|
|
378
|
+
:query_params => query_params,
|
|
379
|
+
:form_params => form_params,
|
|
380
|
+
:body => post_body,
|
|
381
|
+
:auth_names => auth_names)
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug "API called: BalanceApi#delete_balance_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
384
|
+
end
|
|
385
|
+
return data, status_code, headers
|
|
386
|
+
end
|
|
387
|
+
# Delete balance limit
|
|
388
|
+
# Delete balance limit
|
|
389
|
+
# @param pid Loyalty Program Id
|
|
390
|
+
# @param bdid Balance Definition Id
|
|
391
|
+
# @param blid Balance Limit Id
|
|
392
|
+
# @param [Hash] opts the optional parameters
|
|
393
|
+
# @return [nil]
|
|
394
|
+
def delete_balance_limit(pid, bdid, blid, opts = {})
|
|
395
|
+
delete_balance_limit_with_http_info(pid, bdid, blid, opts)
|
|
396
|
+
nil
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Delete balance limit
|
|
400
|
+
# Delete balance limit
|
|
401
|
+
# @param pid Loyalty Program Id
|
|
402
|
+
# @param bdid Balance Definition Id
|
|
403
|
+
# @param blid Balance Limit Id
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
406
|
+
def delete_balance_limit_with_http_info(pid, bdid, blid, opts = {})
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.delete_balance_limit ...'
|
|
409
|
+
end
|
|
410
|
+
# verify the required parameter 'pid' is set
|
|
411
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
412
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.delete_balance_limit"
|
|
413
|
+
end
|
|
414
|
+
# verify the required parameter 'bdid' is set
|
|
415
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
416
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.delete_balance_limit"
|
|
417
|
+
end
|
|
418
|
+
# verify the required parameter 'blid' is set
|
|
419
|
+
if @api_client.config.client_side_validation && blid.nil?
|
|
420
|
+
fail ArgumentError, "Missing the required parameter 'blid' when calling BalanceApi.delete_balance_limit"
|
|
421
|
+
end
|
|
422
|
+
# resource path
|
|
423
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s).sub('{' + 'blid' + '}', blid.to_s)
|
|
424
|
+
|
|
425
|
+
# query parameters
|
|
426
|
+
query_params = {}
|
|
427
|
+
|
|
428
|
+
# header parameters
|
|
429
|
+
header_params = {}
|
|
430
|
+
# HTTP header 'Accept' (if needed)
|
|
431
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
432
|
+
# HTTP header 'Content-Type'
|
|
433
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
434
|
+
|
|
435
|
+
# form parameters
|
|
436
|
+
form_params = {}
|
|
437
|
+
|
|
438
|
+
# http body (model)
|
|
439
|
+
post_body = nil
|
|
440
|
+
auth_names = ['api-key', 'partner-key']
|
|
441
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
442
|
+
:header_params => header_params,
|
|
443
|
+
:query_params => query_params,
|
|
444
|
+
:form_params => form_params,
|
|
445
|
+
:body => post_body,
|
|
446
|
+
:auth_names => auth_names)
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug "API called: BalanceApi#delete_balance_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
449
|
+
end
|
|
450
|
+
return data, status_code, headers
|
|
451
|
+
end
|
|
452
|
+
# Get balance definition
|
|
453
|
+
# Returns balance definition
|
|
454
|
+
# @param pid Loyalty Program Id
|
|
455
|
+
# @param bdid Balance Definition Id
|
|
456
|
+
# @param [Hash] opts the optional parameters
|
|
457
|
+
# @option opts [String] :version Version (default to draft)
|
|
458
|
+
# @return [BalanceDefinition]
|
|
459
|
+
def get_balance_definition(pid, bdid, opts = {})
|
|
460
|
+
data, _status_code, _headers = get_balance_definition_with_http_info(pid, bdid, opts)
|
|
461
|
+
data
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# Get balance definition
|
|
465
|
+
# Returns balance definition
|
|
466
|
+
# @param pid Loyalty Program Id
|
|
467
|
+
# @param bdid Balance Definition Id
|
|
468
|
+
# @param [Hash] opts the optional parameters
|
|
469
|
+
# @option opts [String] :version Version
|
|
470
|
+
# @return [Array<(BalanceDefinition, Fixnum, Hash)>] BalanceDefinition data, response status code and response headers
|
|
471
|
+
def get_balance_definition_with_http_info(pid, bdid, opts = {})
|
|
472
|
+
if @api_client.config.debugging
|
|
473
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.get_balance_definition ...'
|
|
474
|
+
end
|
|
475
|
+
# verify the required parameter 'pid' is set
|
|
476
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
477
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.get_balance_definition"
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'bdid' is set
|
|
480
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.get_balance_definition"
|
|
482
|
+
end
|
|
483
|
+
if @api_client.config.client_side_validation && opts[:'version'] && !['active', 'draft'].include?(opts[:'version'])
|
|
484
|
+
fail ArgumentError, 'invalid value for "version", must be one of active, draft'
|
|
485
|
+
end
|
|
486
|
+
# resource path
|
|
487
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s)
|
|
488
|
+
|
|
489
|
+
# query parameters
|
|
490
|
+
query_params = {}
|
|
491
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
492
|
+
|
|
493
|
+
# header parameters
|
|
494
|
+
header_params = {}
|
|
495
|
+
# HTTP header 'Accept' (if needed)
|
|
496
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
497
|
+
# HTTP header 'Content-Type'
|
|
498
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
499
|
+
|
|
500
|
+
# form parameters
|
|
501
|
+
form_params = {}
|
|
502
|
+
|
|
503
|
+
# http body (model)
|
|
504
|
+
post_body = nil
|
|
505
|
+
auth_names = ['api-key', 'partner-key']
|
|
506
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
507
|
+
:header_params => header_params,
|
|
508
|
+
:query_params => query_params,
|
|
509
|
+
:form_params => form_params,
|
|
510
|
+
:body => post_body,
|
|
511
|
+
:auth_names => auth_names,
|
|
512
|
+
:return_type => 'BalanceDefinition')
|
|
513
|
+
if @api_client.config.debugging
|
|
514
|
+
@api_client.config.logger.debug "API called: BalanceApi#get_balance_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
515
|
+
end
|
|
516
|
+
return data, status_code, headers
|
|
517
|
+
end
|
|
518
|
+
# Get balance definition list
|
|
519
|
+
# Returns balance definition page
|
|
520
|
+
# @param pid Loyalty Program Id
|
|
521
|
+
# @param [Hash] opts the optional parameters
|
|
522
|
+
# @option opts [Integer] :limit Limit the number of records returned (default to 200)
|
|
523
|
+
# @option opts [Integer] :offset Offset to paginate records (default to 0)
|
|
524
|
+
# @option opts [String] :sort_field Field to sort by (default to updated_at)
|
|
525
|
+
# @option opts [String] :sort Sort direction (default to desc)
|
|
526
|
+
# @option opts [String] :version Version (default to draft)
|
|
527
|
+
# @return [BalanceDefinitionPage]
|
|
528
|
+
def get_balance_definition_list(pid, opts = {})
|
|
529
|
+
data, _status_code, _headers = get_balance_definition_list_with_http_info(pid, opts)
|
|
530
|
+
data
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
# Get balance definition list
|
|
534
|
+
# Returns balance definition page
|
|
535
|
+
# @param pid Loyalty Program Id
|
|
536
|
+
# @param [Hash] opts the optional parameters
|
|
537
|
+
# @option opts [Integer] :limit Limit the number of records returned
|
|
538
|
+
# @option opts [Integer] :offset Offset to paginate records
|
|
539
|
+
# @option opts [String] :sort_field Field to sort by
|
|
540
|
+
# @option opts [String] :sort Sort direction
|
|
541
|
+
# @option opts [String] :version Version
|
|
542
|
+
# @return [Array<(BalanceDefinitionPage, Fixnum, Hash)>] BalanceDefinitionPage data, response status code and response headers
|
|
543
|
+
def get_balance_definition_list_with_http_info(pid, opts = {})
|
|
544
|
+
if @api_client.config.debugging
|
|
545
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.get_balance_definition_list ...'
|
|
546
|
+
end
|
|
547
|
+
# verify the required parameter 'pid' is set
|
|
548
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
549
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.get_balance_definition_list"
|
|
550
|
+
end
|
|
551
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
552
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BalanceApi.get_balance_definition_list, must be smaller than or equal to 500.'
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
556
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BalanceApi.get_balance_definition_list, must be greater than or equal to 1.'
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
560
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling BalanceApi.get_balance_definition_list, must be greater than or equal to 0.'
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
if @api_client.config.client_side_validation && opts[:'sort_field'] && !['name', 'created_at', 'updated_at'].include?(opts[:'sort_field'])
|
|
564
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of name, created_at, updated_at'
|
|
565
|
+
end
|
|
566
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
|
567
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
|
568
|
+
end
|
|
569
|
+
if @api_client.config.client_side_validation && opts[:'version'] && !['active', 'draft'].include?(opts[:'version'])
|
|
570
|
+
fail ArgumentError, 'invalid value for "version", must be one of active, draft'
|
|
571
|
+
end
|
|
572
|
+
# resource path
|
|
573
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions'.sub('{' + 'pid' + '}', pid.to_s)
|
|
574
|
+
|
|
575
|
+
# query parameters
|
|
576
|
+
query_params = {}
|
|
577
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
578
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
579
|
+
query_params[:'sortField'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
|
580
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
581
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
582
|
+
|
|
583
|
+
# header parameters
|
|
584
|
+
header_params = {}
|
|
585
|
+
# HTTP header 'Accept' (if needed)
|
|
586
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
587
|
+
# HTTP header 'Content-Type'
|
|
588
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
589
|
+
|
|
590
|
+
# form parameters
|
|
591
|
+
form_params = {}
|
|
592
|
+
|
|
593
|
+
# http body (model)
|
|
594
|
+
post_body = nil
|
|
595
|
+
auth_names = ['api-key', 'partner-key']
|
|
596
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
597
|
+
:header_params => header_params,
|
|
598
|
+
:query_params => query_params,
|
|
599
|
+
:form_params => form_params,
|
|
600
|
+
:body => post_body,
|
|
601
|
+
:auth_names => auth_names,
|
|
602
|
+
:return_type => 'BalanceDefinitionPage')
|
|
603
|
+
if @api_client.config.debugging
|
|
604
|
+
@api_client.config.logger.debug "API called: BalanceApi#get_balance_definition_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
605
|
+
end
|
|
606
|
+
return data, status_code, headers
|
|
607
|
+
end
|
|
608
|
+
# Get balance limits
|
|
609
|
+
# Fetches balance limits and send the created UUID along with the data
|
|
610
|
+
# @param pid Loyalty Program Id
|
|
611
|
+
# @param bdid Balance Definition Id
|
|
612
|
+
# @param blid Balance Limit Id
|
|
613
|
+
# @param [Hash] opts the optional parameters
|
|
614
|
+
# @option opts [String] :version Version (default to draft)
|
|
615
|
+
# @return [BalanceLimit]
|
|
616
|
+
def get_balance_limit(pid, bdid, blid, opts = {})
|
|
617
|
+
data, _status_code, _headers = get_balance_limit_with_http_info(pid, bdid, blid, opts)
|
|
618
|
+
data
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# Get balance limits
|
|
622
|
+
# Fetches balance limits and send the created UUID along with the data
|
|
623
|
+
# @param pid Loyalty Program Id
|
|
624
|
+
# @param bdid Balance Definition Id
|
|
625
|
+
# @param blid Balance Limit Id
|
|
626
|
+
# @param [Hash] opts the optional parameters
|
|
627
|
+
# @option opts [String] :version Version
|
|
628
|
+
# @return [Array<(BalanceLimit, Fixnum, Hash)>] BalanceLimit data, response status code and response headers
|
|
629
|
+
def get_balance_limit_with_http_info(pid, bdid, blid, opts = {})
|
|
630
|
+
if @api_client.config.debugging
|
|
631
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.get_balance_limit ...'
|
|
632
|
+
end
|
|
633
|
+
# verify the required parameter 'pid' is set
|
|
634
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
635
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.get_balance_limit"
|
|
636
|
+
end
|
|
637
|
+
# verify the required parameter 'bdid' is set
|
|
638
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
639
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.get_balance_limit"
|
|
640
|
+
end
|
|
641
|
+
# verify the required parameter 'blid' is set
|
|
642
|
+
if @api_client.config.client_side_validation && blid.nil?
|
|
643
|
+
fail ArgumentError, "Missing the required parameter 'blid' when calling BalanceApi.get_balance_limit"
|
|
644
|
+
end
|
|
645
|
+
if @api_client.config.client_side_validation && opts[:'version'] && !['active', 'draft'].include?(opts[:'version'])
|
|
646
|
+
fail ArgumentError, 'invalid value for "version", must be one of active, draft'
|
|
647
|
+
end
|
|
648
|
+
# resource path
|
|
649
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s).sub('{' + 'blid' + '}', blid.to_s)
|
|
650
|
+
|
|
651
|
+
# query parameters
|
|
652
|
+
query_params = {}
|
|
653
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
654
|
+
|
|
655
|
+
# header parameters
|
|
656
|
+
header_params = {}
|
|
657
|
+
# HTTP header 'Accept' (if needed)
|
|
658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
659
|
+
# HTTP header 'Content-Type'
|
|
660
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
661
|
+
|
|
662
|
+
# form parameters
|
|
663
|
+
form_params = {}
|
|
664
|
+
|
|
665
|
+
# http body (model)
|
|
666
|
+
post_body = nil
|
|
667
|
+
auth_names = ['api-key', 'partner-key']
|
|
668
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
669
|
+
:header_params => header_params,
|
|
670
|
+
:query_params => query_params,
|
|
671
|
+
:form_params => form_params,
|
|
672
|
+
:body => post_body,
|
|
673
|
+
:auth_names => auth_names,
|
|
674
|
+
:return_type => 'BalanceLimit')
|
|
675
|
+
if @api_client.config.debugging
|
|
676
|
+
@api_client.config.logger.debug "API called: BalanceApi#get_balance_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
677
|
+
end
|
|
678
|
+
return data, status_code, headers
|
|
679
|
+
end
|
|
680
|
+
# Get balance list
|
|
681
|
+
# Returns balance list
|
|
682
|
+
# @param pid Loyalty Program Id
|
|
683
|
+
# @param [Hash] opts the optional parameters
|
|
684
|
+
# @return [ContactBalancesResp]
|
|
685
|
+
def get_contact_balances(pid, opts = {})
|
|
686
|
+
data, _status_code, _headers = get_contact_balances_with_http_info(pid, opts)
|
|
687
|
+
data
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
# Get balance list
|
|
691
|
+
# Returns balance list
|
|
692
|
+
# @param pid Loyalty Program Id
|
|
693
|
+
# @param [Hash] opts the optional parameters
|
|
694
|
+
# @return [Array<(ContactBalancesResp, Fixnum, Hash)>] ContactBalancesResp data, response status code and response headers
|
|
695
|
+
def get_contact_balances_with_http_info(pid, opts = {})
|
|
696
|
+
if @api_client.config.debugging
|
|
697
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.get_contact_balances ...'
|
|
698
|
+
end
|
|
699
|
+
# verify the required parameter 'pid' is set
|
|
700
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
701
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.get_contact_balances"
|
|
702
|
+
end
|
|
703
|
+
# resource path
|
|
704
|
+
local_var_path = '/loyalty/balance/programs/{pid}/contact-balances'.sub('{' + 'pid' + '}', pid.to_s)
|
|
705
|
+
|
|
706
|
+
# query parameters
|
|
707
|
+
query_params = {}
|
|
708
|
+
|
|
709
|
+
# header parameters
|
|
710
|
+
header_params = {}
|
|
711
|
+
# HTTP header 'Accept' (if needed)
|
|
712
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
713
|
+
# HTTP header 'Content-Type'
|
|
714
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
715
|
+
|
|
716
|
+
# form parameters
|
|
717
|
+
form_params = {}
|
|
718
|
+
|
|
719
|
+
# http body (model)
|
|
720
|
+
post_body = nil
|
|
721
|
+
auth_names = ['api-key', 'partner-key']
|
|
722
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
723
|
+
:header_params => header_params,
|
|
724
|
+
:query_params => query_params,
|
|
725
|
+
:form_params => form_params,
|
|
726
|
+
:body => post_body,
|
|
727
|
+
:auth_names => auth_names,
|
|
728
|
+
:return_type => 'ContactBalancesResp')
|
|
729
|
+
if @api_client.config.debugging
|
|
730
|
+
@api_client.config.logger.debug "API called: BalanceApi#get_contact_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
731
|
+
end
|
|
732
|
+
return data, status_code, headers
|
|
733
|
+
end
|
|
734
|
+
# Get subscription balances
|
|
735
|
+
# Returns subscription balances
|
|
736
|
+
# @param cid Contact Id
|
|
737
|
+
# @param pid Loyalty Program Id
|
|
738
|
+
# @param [Hash] opts the optional parameters
|
|
739
|
+
# @return [ModelSubscriptionBalanceResp]
|
|
740
|
+
def get_subscription_balances(cid, pid, opts = {})
|
|
741
|
+
data, _status_code, _headers = get_subscription_balances_with_http_info(cid, pid, opts)
|
|
742
|
+
data
|
|
743
|
+
end
|
|
744
|
+
|
|
745
|
+
# Get subscription balances
|
|
746
|
+
# Returns subscription balances
|
|
747
|
+
# @param cid Contact Id
|
|
748
|
+
# @param pid Loyalty Program Id
|
|
749
|
+
# @param [Hash] opts the optional parameters
|
|
750
|
+
# @return [Array<(ModelSubscriptionBalanceResp, Fixnum, Hash)>] ModelSubscriptionBalanceResp data, response status code and response headers
|
|
751
|
+
def get_subscription_balances_with_http_info(cid, pid, opts = {})
|
|
752
|
+
if @api_client.config.debugging
|
|
753
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.get_subscription_balances ...'
|
|
754
|
+
end
|
|
755
|
+
# verify the required parameter 'cid' is set
|
|
756
|
+
if @api_client.config.client_side_validation && cid.nil?
|
|
757
|
+
fail ArgumentError, "Missing the required parameter 'cid' when calling BalanceApi.get_subscription_balances"
|
|
758
|
+
end
|
|
759
|
+
# verify the required parameter 'pid' is set
|
|
760
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
761
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.get_subscription_balances"
|
|
762
|
+
end
|
|
763
|
+
# resource path
|
|
764
|
+
local_var_path = '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances'.sub('{' + 'cid' + '}', cid.to_s).sub('{' + 'pid' + '}', pid.to_s)
|
|
765
|
+
|
|
766
|
+
# query parameters
|
|
767
|
+
query_params = {}
|
|
768
|
+
|
|
769
|
+
# header parameters
|
|
770
|
+
header_params = {}
|
|
771
|
+
# HTTP header 'Accept' (if needed)
|
|
772
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
773
|
+
# HTTP header 'Content-Type'
|
|
774
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
775
|
+
|
|
776
|
+
# form parameters
|
|
777
|
+
form_params = {}
|
|
778
|
+
|
|
779
|
+
# http body (model)
|
|
780
|
+
post_body = nil
|
|
781
|
+
auth_names = ['api-key', 'partner-key']
|
|
782
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
783
|
+
:header_params => header_params,
|
|
784
|
+
:query_params => query_params,
|
|
785
|
+
:form_params => form_params,
|
|
786
|
+
:body => post_body,
|
|
787
|
+
:auth_names => auth_names,
|
|
788
|
+
:return_type => 'ModelSubscriptionBalanceResp')
|
|
789
|
+
if @api_client.config.debugging
|
|
790
|
+
@api_client.config.logger.debug "API called: BalanceApi#get_subscription_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
791
|
+
end
|
|
792
|
+
return data, status_code, headers
|
|
793
|
+
end
|
|
794
|
+
# Get Active Balances API
|
|
795
|
+
# Returns Active Balances
|
|
796
|
+
# @param pid Loyalty Program Id
|
|
797
|
+
# @param contact_id Contact ID
|
|
798
|
+
# @param balance_definition_id Balance Definition ID
|
|
799
|
+
# @param [Hash] opts the optional parameters
|
|
800
|
+
# @option opts [Integer] :limit Limit
|
|
801
|
+
# @option opts [Integer] :offset Offset
|
|
802
|
+
# @option opts [String] :sort_field Sort Field
|
|
803
|
+
# @option opts [String] :sort Sort Order
|
|
804
|
+
# @return [BalanceLimit]
|
|
805
|
+
def loyalty_balance_programs_pid_active_balance_get(pid, contact_id, balance_definition_id, opts = {})
|
|
806
|
+
data, _status_code, _headers = loyalty_balance_programs_pid_active_balance_get_with_http_info(pid, contact_id, balance_definition_id, opts)
|
|
807
|
+
data
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
# Get Active Balances API
|
|
811
|
+
# Returns Active Balances
|
|
812
|
+
# @param pid Loyalty Program Id
|
|
813
|
+
# @param contact_id Contact ID
|
|
814
|
+
# @param balance_definition_id Balance Definition ID
|
|
815
|
+
# @param [Hash] opts the optional parameters
|
|
816
|
+
# @option opts [Integer] :limit Limit
|
|
817
|
+
# @option opts [Integer] :offset Offset
|
|
818
|
+
# @option opts [String] :sort_field Sort Field
|
|
819
|
+
# @option opts [String] :sort Sort Order
|
|
820
|
+
# @return [Array<(BalanceLimit, Fixnum, Hash)>] BalanceLimit data, response status code and response headers
|
|
821
|
+
def loyalty_balance_programs_pid_active_balance_get_with_http_info(pid, contact_id, balance_definition_id, opts = {})
|
|
822
|
+
if @api_client.config.debugging
|
|
823
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.loyalty_balance_programs_pid_active_balance_get ...'
|
|
824
|
+
end
|
|
825
|
+
# verify the required parameter 'pid' is set
|
|
826
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
827
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get"
|
|
828
|
+
end
|
|
829
|
+
# verify the required parameter 'contact_id' is set
|
|
830
|
+
if @api_client.config.client_side_validation && contact_id.nil?
|
|
831
|
+
fail ArgumentError, "Missing the required parameter 'contact_id' when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get"
|
|
832
|
+
end
|
|
833
|
+
if @api_client.config.client_side_validation && contact_id < 1
|
|
834
|
+
fail ArgumentError, 'invalid value for "contact_id" when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get, must be greater than or equal to 1.'
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
# verify the required parameter 'balance_definition_id' is set
|
|
838
|
+
if @api_client.config.client_side_validation && balance_definition_id.nil?
|
|
839
|
+
fail ArgumentError, "Missing the required parameter 'balance_definition_id' when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get"
|
|
840
|
+
end
|
|
841
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
842
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get, must be smaller than or equal to 500.'
|
|
843
|
+
end
|
|
844
|
+
|
|
845
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
846
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get, must be greater than or equal to 1.'
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
850
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling BalanceApi.loyalty_balance_programs_pid_active_balance_get, must be greater than or equal to 0.'
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
# resource path
|
|
854
|
+
local_var_path = '/loyalty/balance/programs/{pid}/active-balance'.sub('{' + 'pid' + '}', pid.to_s)
|
|
855
|
+
|
|
856
|
+
# query parameters
|
|
857
|
+
query_params = {}
|
|
858
|
+
query_params[:'contact_id'] = contact_id
|
|
859
|
+
query_params[:'balance_definition_id'] = balance_definition_id
|
|
860
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
861
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
862
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
|
863
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
864
|
+
|
|
865
|
+
# header parameters
|
|
866
|
+
header_params = {}
|
|
867
|
+
# HTTP header 'Accept' (if needed)
|
|
868
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
869
|
+
# HTTP header 'Content-Type'
|
|
870
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
871
|
+
|
|
872
|
+
# form parameters
|
|
873
|
+
form_params = {}
|
|
874
|
+
|
|
875
|
+
# http body (model)
|
|
876
|
+
post_body = nil
|
|
877
|
+
auth_names = ['api-key', 'partner-key']
|
|
878
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
879
|
+
:header_params => header_params,
|
|
880
|
+
:query_params => query_params,
|
|
881
|
+
:form_params => form_params,
|
|
882
|
+
:body => post_body,
|
|
883
|
+
:auth_names => auth_names,
|
|
884
|
+
:return_type => 'BalanceLimit')
|
|
885
|
+
if @api_client.config.debugging
|
|
886
|
+
@api_client.config.logger.debug "API called: BalanceApi#loyalty_balance_programs_pid_active_balance_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
887
|
+
end
|
|
888
|
+
return data, status_code, headers
|
|
889
|
+
end
|
|
890
|
+
# Create balance definition
|
|
891
|
+
# Creates balance definition and returns information
|
|
892
|
+
# @param pid Loyalty Program Id
|
|
893
|
+
# @param body Create Balance Definition Payload
|
|
894
|
+
# @param [Hash] opts the optional parameters
|
|
895
|
+
# @return [BalanceDefinition]
|
|
896
|
+
def loyalty_balance_programs_pid_balance_definitions_post(pid, body, opts = {})
|
|
897
|
+
data, _status_code, _headers = loyalty_balance_programs_pid_balance_definitions_post_with_http_info(pid, body, opts)
|
|
898
|
+
data
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
# Create balance definition
|
|
902
|
+
# Creates balance definition and returns information
|
|
903
|
+
# @param pid Loyalty Program Id
|
|
904
|
+
# @param body Create Balance Definition Payload
|
|
905
|
+
# @param [Hash] opts the optional parameters
|
|
906
|
+
# @return [Array<(BalanceDefinition, Fixnum, Hash)>] BalanceDefinition data, response status code and response headers
|
|
907
|
+
def loyalty_balance_programs_pid_balance_definitions_post_with_http_info(pid, body, opts = {})
|
|
908
|
+
if @api_client.config.debugging
|
|
909
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.loyalty_balance_programs_pid_balance_definitions_post ...'
|
|
910
|
+
end
|
|
911
|
+
# verify the required parameter 'pid' is set
|
|
912
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
913
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.loyalty_balance_programs_pid_balance_definitions_post"
|
|
914
|
+
end
|
|
915
|
+
# verify the required parameter 'body' is set
|
|
916
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
917
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.loyalty_balance_programs_pid_balance_definitions_post"
|
|
918
|
+
end
|
|
919
|
+
# resource path
|
|
920
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions'.sub('{' + 'pid' + '}', pid.to_s)
|
|
921
|
+
|
|
922
|
+
# query parameters
|
|
923
|
+
query_params = {}
|
|
924
|
+
|
|
925
|
+
# header parameters
|
|
926
|
+
header_params = {}
|
|
927
|
+
# HTTP header 'Accept' (if needed)
|
|
928
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
929
|
+
# HTTP header 'Content-Type'
|
|
930
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
931
|
+
|
|
932
|
+
# form parameters
|
|
933
|
+
form_params = {}
|
|
934
|
+
|
|
935
|
+
# http body (model)
|
|
936
|
+
post_body = @api_client.object_to_http_body(body)
|
|
937
|
+
auth_names = ['api-key', 'partner-key']
|
|
938
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
939
|
+
:header_params => header_params,
|
|
940
|
+
:query_params => query_params,
|
|
941
|
+
:form_params => form_params,
|
|
942
|
+
:body => post_body,
|
|
943
|
+
:auth_names => auth_names,
|
|
944
|
+
:return_type => 'BalanceDefinition')
|
|
945
|
+
if @api_client.config.debugging
|
|
946
|
+
@api_client.config.logger.debug "API called: BalanceApi#loyalty_balance_programs_pid_balance_definitions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
947
|
+
end
|
|
948
|
+
return data, status_code, headers
|
|
949
|
+
end
|
|
950
|
+
# Create subscription balances
|
|
951
|
+
# Creates a balance for a contact
|
|
952
|
+
# @param pid Loyalty Program Id
|
|
953
|
+
# @param cid Contact Id
|
|
954
|
+
# @param body Create Balnce Payload
|
|
955
|
+
# @param [Hash] opts the optional parameters
|
|
956
|
+
# @return [Balance]
|
|
957
|
+
def loyalty_balance_programs_pid_subscriptions_cid_balances_post(pid, cid, body, opts = {})
|
|
958
|
+
data, _status_code, _headers = loyalty_balance_programs_pid_subscriptions_cid_balances_post_with_http_info(pid, cid, body, opts)
|
|
959
|
+
data
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
# Create subscription balances
|
|
963
|
+
# Creates a balance for a contact
|
|
964
|
+
# @param pid Loyalty Program Id
|
|
965
|
+
# @param cid Contact Id
|
|
966
|
+
# @param body Create Balnce Payload
|
|
967
|
+
# @param [Hash] opts the optional parameters
|
|
968
|
+
# @return [Array<(Balance, Fixnum, Hash)>] Balance data, response status code and response headers
|
|
969
|
+
def loyalty_balance_programs_pid_subscriptions_cid_balances_post_with_http_info(pid, cid, body, opts = {})
|
|
970
|
+
if @api_client.config.debugging
|
|
971
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.loyalty_balance_programs_pid_subscriptions_cid_balances_post ...'
|
|
972
|
+
end
|
|
973
|
+
# verify the required parameter 'pid' is set
|
|
974
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
975
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.loyalty_balance_programs_pid_subscriptions_cid_balances_post"
|
|
976
|
+
end
|
|
977
|
+
# verify the required parameter 'cid' is set
|
|
978
|
+
if @api_client.config.client_side_validation && cid.nil?
|
|
979
|
+
fail ArgumentError, "Missing the required parameter 'cid' when calling BalanceApi.loyalty_balance_programs_pid_subscriptions_cid_balances_post"
|
|
980
|
+
end
|
|
981
|
+
# verify the required parameter 'body' is set
|
|
982
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
983
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.loyalty_balance_programs_pid_subscriptions_cid_balances_post"
|
|
984
|
+
end
|
|
985
|
+
# resource path
|
|
986
|
+
local_var_path = '/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'cid' + '}', cid.to_s)
|
|
987
|
+
|
|
988
|
+
# query parameters
|
|
989
|
+
query_params = {}
|
|
990
|
+
|
|
991
|
+
# header parameters
|
|
992
|
+
header_params = {}
|
|
993
|
+
# HTTP header 'Accept' (if needed)
|
|
994
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
995
|
+
# HTTP header 'Content-Type'
|
|
996
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
997
|
+
|
|
998
|
+
# form parameters
|
|
999
|
+
form_params = {}
|
|
1000
|
+
|
|
1001
|
+
# http body (model)
|
|
1002
|
+
post_body = @api_client.object_to_http_body(body)
|
|
1003
|
+
auth_names = ['api-key', 'partner-key']
|
|
1004
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1005
|
+
:header_params => header_params,
|
|
1006
|
+
:query_params => query_params,
|
|
1007
|
+
:form_params => form_params,
|
|
1008
|
+
:body => post_body,
|
|
1009
|
+
:auth_names => auth_names,
|
|
1010
|
+
:return_type => 'Balance')
|
|
1011
|
+
if @api_client.config.debugging
|
|
1012
|
+
@api_client.config.logger.debug "API called: BalanceApi#loyalty_balance_programs_pid_subscriptions_cid_balances_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1013
|
+
end
|
|
1014
|
+
return data, status_code, headers
|
|
1015
|
+
end
|
|
1016
|
+
# Get Transaction History API
|
|
1017
|
+
# Returns transaction history
|
|
1018
|
+
# @param pid Loyalty Program Id
|
|
1019
|
+
# @param contact_id Contact ID
|
|
1020
|
+
# @param balance_definition_id Balance Definition ID
|
|
1021
|
+
# @param [Hash] opts the optional parameters
|
|
1022
|
+
# @option opts [Integer] :limit Limit the number of records returned (default to 20)
|
|
1023
|
+
# @option opts [Integer] :offset Skip a number of records (default to 0)
|
|
1024
|
+
# @option opts [String] :sort_field Field to sort by (default to created_at)
|
|
1025
|
+
# @option opts [String] :sort Sort order, either asc or desc (default to desc)
|
|
1026
|
+
# @option opts [Array<String>] :filters Filters to apply
|
|
1027
|
+
# @return [TransactionHistoryResp]
|
|
1028
|
+
def loyalty_balance_programs_pid_transaction_history_get(pid, contact_id, balance_definition_id, opts = {})
|
|
1029
|
+
data, _status_code, _headers = loyalty_balance_programs_pid_transaction_history_get_with_http_info(pid, contact_id, balance_definition_id, opts)
|
|
1030
|
+
data
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# Get Transaction History API
|
|
1034
|
+
# Returns transaction history
|
|
1035
|
+
# @param pid Loyalty Program Id
|
|
1036
|
+
# @param contact_id Contact ID
|
|
1037
|
+
# @param balance_definition_id Balance Definition ID
|
|
1038
|
+
# @param [Hash] opts the optional parameters
|
|
1039
|
+
# @option opts [Integer] :limit Limit the number of records returned
|
|
1040
|
+
# @option opts [Integer] :offset Skip a number of records
|
|
1041
|
+
# @option opts [String] :sort_field Field to sort by
|
|
1042
|
+
# @option opts [String] :sort Sort order, either asc or desc
|
|
1043
|
+
# @option opts [Array<String>] :filters Filters to apply
|
|
1044
|
+
# @return [Array<(TransactionHistoryResp, Fixnum, Hash)>] TransactionHistoryResp data, response status code and response headers
|
|
1045
|
+
def loyalty_balance_programs_pid_transaction_history_get_with_http_info(pid, contact_id, balance_definition_id, opts = {})
|
|
1046
|
+
if @api_client.config.debugging
|
|
1047
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.loyalty_balance_programs_pid_transaction_history_get ...'
|
|
1048
|
+
end
|
|
1049
|
+
# verify the required parameter 'pid' is set
|
|
1050
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
1051
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.loyalty_balance_programs_pid_transaction_history_get"
|
|
1052
|
+
end
|
|
1053
|
+
# verify the required parameter 'contact_id' is set
|
|
1054
|
+
if @api_client.config.client_side_validation && contact_id.nil?
|
|
1055
|
+
fail ArgumentError, "Missing the required parameter 'contact_id' when calling BalanceApi.loyalty_balance_programs_pid_transaction_history_get"
|
|
1056
|
+
end
|
|
1057
|
+
# verify the required parameter 'balance_definition_id' is set
|
|
1058
|
+
if @api_client.config.client_side_validation && balance_definition_id.nil?
|
|
1059
|
+
fail ArgumentError, "Missing the required parameter 'balance_definition_id' when calling BalanceApi.loyalty_balance_programs_pid_transaction_history_get"
|
|
1060
|
+
end
|
|
1061
|
+
if @api_client.config.client_side_validation && opts[:'sort_field'] && !['name', 'created_at', 'updated_at'].include?(opts[:'sort_field'])
|
|
1062
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of name, created_at, updated_at'
|
|
1063
|
+
end
|
|
1064
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
|
1065
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
|
1066
|
+
end
|
|
1067
|
+
# resource path
|
|
1068
|
+
local_var_path = '/loyalty/balance/programs/{pid}/transaction-history'.sub('{' + 'pid' + '}', pid.to_s)
|
|
1069
|
+
|
|
1070
|
+
# query parameters
|
|
1071
|
+
query_params = {}
|
|
1072
|
+
query_params[:'contact_id'] = contact_id
|
|
1073
|
+
query_params[:'balance_definition_id'] = balance_definition_id
|
|
1074
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1075
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1076
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
|
1077
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1078
|
+
query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
|
1079
|
+
|
|
1080
|
+
# header parameters
|
|
1081
|
+
header_params = {}
|
|
1082
|
+
# HTTP header 'Accept' (if needed)
|
|
1083
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1084
|
+
# HTTP header 'Content-Type'
|
|
1085
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1086
|
+
|
|
1087
|
+
# form parameters
|
|
1088
|
+
form_params = {}
|
|
1089
|
+
|
|
1090
|
+
# http body (model)
|
|
1091
|
+
post_body = nil
|
|
1092
|
+
auth_names = ['api-key', 'partner-key']
|
|
1093
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1094
|
+
:header_params => header_params,
|
|
1095
|
+
:query_params => query_params,
|
|
1096
|
+
:form_params => form_params,
|
|
1097
|
+
:body => post_body,
|
|
1098
|
+
:auth_names => auth_names,
|
|
1099
|
+
:return_type => 'TransactionHistoryResp')
|
|
1100
|
+
if @api_client.config.debugging
|
|
1101
|
+
@api_client.config.logger.debug "API called: BalanceApi#loyalty_balance_programs_pid_transaction_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1102
|
+
end
|
|
1103
|
+
return data, status_code, headers
|
|
1104
|
+
end
|
|
1105
|
+
# Update balance definition
|
|
1106
|
+
# Updates Balance definition
|
|
1107
|
+
# @param pid Loyalty Program Id
|
|
1108
|
+
# @param bdid Balance Definition Id
|
|
1109
|
+
# @param body Update Balance Definition Payload
|
|
1110
|
+
# @param [Hash] opts the optional parameters
|
|
1111
|
+
# @return [BalanceDefinition]
|
|
1112
|
+
def update_balance_definition(pid, bdid, body, opts = {})
|
|
1113
|
+
data, _status_code, _headers = update_balance_definition_with_http_info(pid, bdid, body, opts)
|
|
1114
|
+
data
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
# Update balance definition
|
|
1118
|
+
# Updates Balance definition
|
|
1119
|
+
# @param pid Loyalty Program Id
|
|
1120
|
+
# @param bdid Balance Definition Id
|
|
1121
|
+
# @param body Update Balance Definition Payload
|
|
1122
|
+
# @param [Hash] opts the optional parameters
|
|
1123
|
+
# @return [Array<(BalanceDefinition, Fixnum, Hash)>] BalanceDefinition data, response status code and response headers
|
|
1124
|
+
def update_balance_definition_with_http_info(pid, bdid, body, opts = {})
|
|
1125
|
+
if @api_client.config.debugging
|
|
1126
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.update_balance_definition ...'
|
|
1127
|
+
end
|
|
1128
|
+
# verify the required parameter 'pid' is set
|
|
1129
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
1130
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.update_balance_definition"
|
|
1131
|
+
end
|
|
1132
|
+
# verify the required parameter 'bdid' is set
|
|
1133
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
1134
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.update_balance_definition"
|
|
1135
|
+
end
|
|
1136
|
+
# verify the required parameter 'body' is set
|
|
1137
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1138
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.update_balance_definition"
|
|
1139
|
+
end
|
|
1140
|
+
# resource path
|
|
1141
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s)
|
|
1142
|
+
|
|
1143
|
+
# query parameters
|
|
1144
|
+
query_params = {}
|
|
1145
|
+
|
|
1146
|
+
# header parameters
|
|
1147
|
+
header_params = {}
|
|
1148
|
+
# HTTP header 'Accept' (if needed)
|
|
1149
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1150
|
+
# HTTP header 'Content-Type'
|
|
1151
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1152
|
+
|
|
1153
|
+
# form parameters
|
|
1154
|
+
form_params = {}
|
|
1155
|
+
|
|
1156
|
+
# http body (model)
|
|
1157
|
+
post_body = @api_client.object_to_http_body(body)
|
|
1158
|
+
auth_names = ['api-key', 'partner-key']
|
|
1159
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1160
|
+
:header_params => header_params,
|
|
1161
|
+
:query_params => query_params,
|
|
1162
|
+
:form_params => form_params,
|
|
1163
|
+
:body => post_body,
|
|
1164
|
+
:auth_names => auth_names,
|
|
1165
|
+
:return_type => 'BalanceDefinition')
|
|
1166
|
+
if @api_client.config.debugging
|
|
1167
|
+
@api_client.config.logger.debug "API called: BalanceApi#update_balance_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1168
|
+
end
|
|
1169
|
+
return data, status_code, headers
|
|
1170
|
+
end
|
|
1171
|
+
# Updates balance limit
|
|
1172
|
+
# Updates balance limit
|
|
1173
|
+
# @param pid Loyalty Program Id
|
|
1174
|
+
# @param bdid Balance Definition Id
|
|
1175
|
+
# @param blid Balance Limit Id
|
|
1176
|
+
# @param body Balance Limits Payload
|
|
1177
|
+
# @param [Hash] opts the optional parameters
|
|
1178
|
+
# @return [BalanceLimit]
|
|
1179
|
+
def update_balance_limit(pid, bdid, blid, body, opts = {})
|
|
1180
|
+
data, _status_code, _headers = update_balance_limit_with_http_info(pid, bdid, blid, body, opts)
|
|
1181
|
+
data
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
# Updates balance limit
|
|
1185
|
+
# Updates balance limit
|
|
1186
|
+
# @param pid Loyalty Program Id
|
|
1187
|
+
# @param bdid Balance Definition Id
|
|
1188
|
+
# @param blid Balance Limit Id
|
|
1189
|
+
# @param body Balance Limits Payload
|
|
1190
|
+
# @param [Hash] opts the optional parameters
|
|
1191
|
+
# @return [Array<(BalanceLimit, Fixnum, Hash)>] BalanceLimit data, response status code and response headers
|
|
1192
|
+
def update_balance_limit_with_http_info(pid, bdid, blid, body, opts = {})
|
|
1193
|
+
if @api_client.config.debugging
|
|
1194
|
+
@api_client.config.logger.debug 'Calling API: BalanceApi.update_balance_limit ...'
|
|
1195
|
+
end
|
|
1196
|
+
# verify the required parameter 'pid' is set
|
|
1197
|
+
if @api_client.config.client_side_validation && pid.nil?
|
|
1198
|
+
fail ArgumentError, "Missing the required parameter 'pid' when calling BalanceApi.update_balance_limit"
|
|
1199
|
+
end
|
|
1200
|
+
# verify the required parameter 'bdid' is set
|
|
1201
|
+
if @api_client.config.client_side_validation && bdid.nil?
|
|
1202
|
+
fail ArgumentError, "Missing the required parameter 'bdid' when calling BalanceApi.update_balance_limit"
|
|
1203
|
+
end
|
|
1204
|
+
# verify the required parameter 'blid' is set
|
|
1205
|
+
if @api_client.config.client_side_validation && blid.nil?
|
|
1206
|
+
fail ArgumentError, "Missing the required parameter 'blid' when calling BalanceApi.update_balance_limit"
|
|
1207
|
+
end
|
|
1208
|
+
# verify the required parameter 'body' is set
|
|
1209
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1210
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling BalanceApi.update_balance_limit"
|
|
1211
|
+
end
|
|
1212
|
+
# resource path
|
|
1213
|
+
local_var_path = '/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}'.sub('{' + 'pid' + '}', pid.to_s).sub('{' + 'bdid' + '}', bdid.to_s).sub('{' + 'blid' + '}', blid.to_s)
|
|
1214
|
+
|
|
1215
|
+
# query parameters
|
|
1216
|
+
query_params = {}
|
|
1217
|
+
|
|
1218
|
+
# header parameters
|
|
1219
|
+
header_params = {}
|
|
1220
|
+
# HTTP header 'Accept' (if needed)
|
|
1221
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1222
|
+
# HTTP header 'Content-Type'
|
|
1223
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1224
|
+
|
|
1225
|
+
# form parameters
|
|
1226
|
+
form_params = {}
|
|
1227
|
+
|
|
1228
|
+
# http body (model)
|
|
1229
|
+
post_body = @api_client.object_to_http_body(body)
|
|
1230
|
+
auth_names = ['api-key', 'partner-key']
|
|
1231
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1232
|
+
:header_params => header_params,
|
|
1233
|
+
:query_params => query_params,
|
|
1234
|
+
:form_params => form_params,
|
|
1235
|
+
:body => post_body,
|
|
1236
|
+
:auth_names => auth_names,
|
|
1237
|
+
:return_type => 'BalanceLimit')
|
|
1238
|
+
if @api_client.config.debugging
|
|
1239
|
+
@api_client.config.logger.debug "API called: BalanceApi#update_balance_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1240
|
+
end
|
|
1241
|
+
return data, status_code, headers
|
|
1242
|
+
end
|
|
1243
|
+
end
|
|
1244
|
+
end
|