This code provides a set of functions to interact with the Zuora API, enabling users to initiate, track, and retrieve bulk data exports.
zuora export catalogThis code fetches a complete product catalog from the Zuora API, handling pagination to retrieve all products across multiple pages.
zuora export service testThis code unit tests a module responsible for interacting with the Zuora API to initiate, monitor, and retrieve data exports. These tests use mocking to simulate API responses and verify the module's functionality in handling various export stages.
zuora renewals queryThis code snippet constructs a SQL query to retrieve data about active subscriptions from a database, filtering by subscription status, date range, currency, and excluding specific rate plans and products. The query is incomplete and requires further development to include additional filtering criteria.
test zuora renewals queryThis code unit tests a function that generates a Zuora query for retrieving renewal data, ensuring it includes the correct start date based on the provided date range.
eloqua import serviceThis code provides functions for authenticating with Eloqua using OAuth and making API requests, including a function specifically for checking the status of bulk imports.
test eloqua import serviceThis code unit tests an Eloqua import service, verifying its ability to obtain a valid OAuth token, create a bulk import instance, and successfully upload data to Eloqua. It uses Sinon.js for mocking dependencies and assert
for making assertions about the test results.
This code processes subscription data by categorizing rate plans into product types and extracting account-specific information, including the latest charges and contact details.
zuora eloqua mapper testThis code snippet tests the accuracy of data mapping from Zuora to Eloqua, verifying that contact information and account details are correctly transferred between the two systems.
zuora account blueprintsThe getUniqueRatePlans
function provides a sample dataset of account and subscription information, likely for testing or demonstration purposes. The data includes various details such as account IDs, contact information, rate plans, and billing details.
This code provides reusable templates for interacting with a data system, enabling bulk data imports, record creation, and potentially temporary imports. The templates use placeholders to dynamically reference fields and data sources.
test eloqua import create templateThis code tests a function that generates import definitions for Eloqua, ensuring it correctly includes the provided instance ID in the generated template. The test uses a placeholder instance ID and asserts that it is present in the resulting JSON output.
eloqua import blueprintsThis code provides mock data and configurations for testing interactions with Eloqua's API, simulating real-world scenarios without requiring live connections.
eloqua existing importThis code provides functions to retrieve a specific custom data object and its corresponding import definition from the Eloqua API, likely for managing renewal-related data imports.
test eloqua existing importThis code unit tests the eloqua existing import
module, which checks for the existence of custom data objects and import definitions within the Eloqua API. The tests use Sinon.js to mock API responses and assert the module's expected behavior.
This Lambda function automates the export of data from Zuora to Eloqua, handling data mapping and upload to Eloqua's system.
test aws entry pointThis code uses unit tests to ensure that an AWS Lambda function correctly handles the process of uploading data from Zuora to Eloqua, including calling the necessary functions for data retrieval, mapping, and upload. The tests use sinon
to mock dependencies and assert
to verify the function's behavior.
This AWS Lambda function processes events to retrieve Zuora account data and bulk upload it to Eloqua, handling errors and returning appropriate responses. It requires additional development to implement features for import template creation and single record updates.
test notify entry pointThis code unit tests an AWS Lambda function responsible for syncing data between Zuora and Eloqua, ensuring it correctly calls functions to export data from Zuora and upload it to Eloqua. The tests use sinon
to mock dependencies and assert
to verify function calls and arguments.
This code provides a function to fetch renewal data from Zuora for a given time period and returns it in a usable JSON format. It leverages modules for querying Zuora, exporting data, and converting CSV to JSON.
test zuora export monthThis code unit tests the exporter
module, which handles Zuora API interactions for data export, by mocking API responses and verifying expected behavior in retrieving queries and initiating exports.
This code provides a module for retrieving Zuora account information, including email addresses and the last four digits of associated credit cards, by making API calls and chaining promises to process the results. The getZuoraAccounts
function is the main entry point, accepting a list of email addresses and returning an array of account details.
This code unit tests the accounts
module's functionality to retrieve Zuora account information by mocking API calls and verifying that the correct query is sent to the Zuora API.
This code defines a function bulkUploadEloqua
that securely authenticates with Eloqua, handles import definition setup, and then uploads account data in bulk to Eloqua. It's likely designed to be used within a Lambda function for serverless execution.
This code unit tests the bulkUploadEloqua
function within the dataImporter
module, verifying its interaction with the Eloqua API by mocking API calls and asserting the correct function execution order.
This code defines a set of test cases for a system integrating Zuora and Eloqua, focusing on data transfer and various subscription management scenarios. The tests cover data export, product matching, end-to-end data flow, and a range of user interactions with subscriptions.
calculate priceThis code calculates the total price of a subscription by retrieving product and pricing information from a catalog export and applying discounts, while also identifying areas for future improvement.
calculate price testThis code filters a set of Zuora subscription records based on various criteria, including Reseller of Record (ROR) and subscription details, and then calculates the total number of records that meet the specified conditions.
readmeThe code imports necessary modules and variables, including lodash
, fs
, and importer
, and sets up a PROFILE_PATH
variable to point to the user's home directory. It then defines a series of functions to query the Zuora API, including getContact
, getAccount
, and others, and provides an example of how to use these functions in an async
function.
This code is a JavaScript program that performs conditional logic, retrieves configuration and token data from a JSON file, and makes API calls to Eloqua using OAuth authentication. The program handles both successful and error scenarios, logging responses or sending errors to the client as needed.
Cell 31The code depends on various libraries and modules, including lodash
, xlsx
, and fs
, and imports functions such as getZuoraMonth
and getCatalog
from other modules. The code initializes Zuora by checking for the existence of the zuora
object, retrieving the current month, logging product rate plans, and catching any errors that occur during the process.