### GetPrice example setup with bearerAuth Source: https://github.com/zuora/sdk-csharp/blob/main/docs/PricesApi.md Sets up the Zuora client with the sandbox base path and a bearer token for the bearerAuth authorization scheme. This is the beginning of the GetPrice example and must be completed with the actual API call. ```csharp using System.Collections.Generic; using System.Diagnostics; using Zuora.Api; using Zuora.Client; using Zuora.Model; namespace Example { public class GetPriceExample { public static void Main() { Configuration.Default.BasePath = "https://rest.sandbox.na.zuora.com/v2"; // Configure HTTP bearer authorization: bearerAuth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; ``` -------------------------------- ### GetBillRun example setup Source: https://github.com/zuora/sdk-csharp/blob/main/docs/BillRunsApi.md Shows the initial setup for calling GetBillRun: set the base path to the Zuora sandbox endpoint and configure the bearer token. The snippet is truncated in the source, so the actual API call is not shown. ```csharp using System.Collections.Generic; using System.Diagnostics; using Zuora.Api; using Zuora.Client; using Zuora.Model; namespace Example { public class GetBillRunExample { public static void Main() { Configuration.Default.BasePath = "https://rest.sandbox.na.zuora.com/v2"; // Configure HTTP bearer authorization: bearerAuth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; ``` -------------------------------- ### GET /plans Source: https://github.com/zuora/sdk-csharp/blob/main/docs/PlansApi.md This snippet documents the GET /plans endpoint from the Zuora Plans API, including its query and header parameters, request example, and response structure. ```APIDOC ## GET /plans ### Description Retrieves a list of plans. This endpoint supports pagination, filtering, sorting, and field selection. ### Method GET ### Endpoint /plans ### Parameters #### Query Parameters - **cursor** (string) - Optional - A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. - **expand** (List) - Optional - Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. - **filter** (List) - Optional - A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. - **sort** (List) - Optional - A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. - **pageSize** (int?) - Optional - The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. - **fields** (List) - Optional - Allows you to specify which fields are returned in the response. Accepted values: `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `name`, `active`, `description`, `plan_number`, `product_id`, `active_currencies`. #### Header Parameters - **Zuora-Track-Id** (string) - Optional - A custom identifier for tracking API requests. - **Zuora-Entity-Ids** (string) - Optional - An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. - **Idempotency-Key** (string) - Optional - Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. This idempotency key should be a unique value, and the Zuora server identifies subsequent retries of the same request using this value. For more information, see [Idempotent Requests](https://www.zuora.com/developer/api-references/quickstart-api/tag/Idempotent-Requests/). - **Accept-Encoding** (string) - Optional - Include a `accept-encoding: gzip` header to compress responses, which can reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes. For more information about this header, see [Request and Response Compression](https://www.zuora.com/developer/api-references/quickstart-api/tag/Request-and-Response-Compression/). - **Content-Encoding** (string) - Optional - Include a `content-encoding: gzip` header to compress a request. Upload a gzipped file for the payload if you specify this header. For more information, see [Request and Response Compression](https://www.zuora.com/developer/api-references/quickstart-api/tag/Request-and-Response-Compression/). ### Request Example ``` GET /plans?cursor=...&expand=...&filter=...&sort=...&pageSize=...&fields=... ``` ### Response #### Success Response (200) - **PlanListResponse** - The response contains a list of plans. The exact structure is not detailed in the source. #### Response Example ``` { "data": [ { "id": "plan_id", "name": "plan_name" } ] } ``` ``` -------------------------------- ### GetProduct Example Source: https://github.com/zuora/sdk-csharp/blob/main/docs/ProductsApi.md Demonstrates how to initialize the ProductsApi and call the GetProduct method with various optional parameters. ```csharp using System.Collections.Generic; using System.Diagnostics; using Zuora.Api; using Zuora.Client; using Zuora.Model; namespace Example { public class GetProductExample { public static void Main() { Configuration.Default.BasePath = "https://rest.sandbox.na.zuora.com/v2"; // Configure HTTP bearer authorization: bearerAuth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ProductsApi(Configuration.Default); var productId = productId_example; // string | Product Id var fields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `active`, `name`, `type`, `sku`, `description`
(optional) var plansFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `name`, `active`, `description`, `plan_number`, `product_id`, `active_currencies`
(optional) var pricesFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `tiers`, `charge_model`, `charge_type`, `name`, `description`, `revenue_recognition_rule`, `stacked_discount`, `recognized_revenue_accounting_code`, `deferred_revenue_accounting_code`, `accounting_code`, `recurring`, `start_event`, `tax_code`, `tax_inclusive`, `taxable`, `unit_of_measure`, `quantity`, `min_quantity`, `max_quantity`, `price_base_interval`, `discount_level`, `overage`, `plan_id`, `tiers_mode`, `apply_discount_to`, `prepayment`, `drawdown`, `discount_amounts`, `unit_amounts`, `discount_percent`
(optional) var expand = new List(); // List | Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) var filter = new List(); // List | A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the "Retrieve a billing document" operaiton, you can use the `filter[]` parameter on the related objects such as `filter[]=items[subscription_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) var pageSize = 56; // int? | The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) var zuoraTrackId = zuoraTrackId_example; // string | A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), or quote ('). (optional) var zuoraEntityIds = zuoraEntityIds_example; // string | An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. (optional) ``` -------------------------------- ### UsageRecordsApi example: set up parameters Source: https://github.com/zuora/sdk-csharp/blob/main/docs/UsageRecordsApi.md Shows how to instantiate UsageRecordsApi and set up the parameters for a usage record operation. The snippet defines variables for the usage ID, field selection, expansion, filtering, page size, and various headers (tracking, entity, idempotency, and compression). Note that the filter parameter only applies to related objects, and page_size outside 1-99 returns a 400 error. ```csharp var apiInstance = new UsageRecordsApi(Configuration.Default); var id = id_example; // string | Usage Id var fields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `account_number`, `subscription_item_id`, `subscription_item_number`, `subscription_id`, `subscription_number`, `unit_of_measure`, `description`, `end_time`, `state`, `start_time`, `quantity`
(optional) var accountFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`
(optional) var expand = new List(); // List | Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) var filter = new List(); // List | A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the "Retrieve a billing document" operaiton, you can use the `filter[]` parameter on the related objects such as `filter[]=items[subscription_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) var pageSize = 56; // int? | The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) var zuoraTrackId = zuoraTrackId_example; // string | A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote (\"), or quote ('). (optional) var zuoraEntityIds = zuoraEntityIds_example; // string | An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. (optional) var idempotencyKey = idempotencyKey_example; // string | Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. This idempotency key should be a unique value, and the Zuora server identifies subsequent retries of the same request using this value. For more information, see [Idempotent Requests](https://www.zuora.com/developer/api-references/quickstart-api/tag/Idempotent-Requests/). (optional) var acceptEncoding = acceptEncoding_example; // string | Include a `accept-encoding: gzip` header to compress responses, which can reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes. For more information about this header, see [Request and Response Compression](https://www.zuora.com/developer/api-references/quickstart-api/tag/Request-and-Response-Compression/). (optional) var contentEncoding = contentEncoding_example; // string | Include a `content-encoding: gzip` header to compress a request. Upload a gzipped file for the payload if you specify this header. For more information, see [Request and Response Compression](https://www.zuora.com/developer/api-references/quickstart-api/tag/Request-and-Response-Compression/). (optional) ``` -------------------------------- ### GET /billing_document_items Source: https://github.com/zuora/sdk-csharp/blob/main/docs/BillingDocumentItemsApi.md This snippet documents the GET /billing_document_items endpoint, which lists billing document items. It includes the endpoint, parameters, request example, and response structure. ```APIDOC ## [GET] /billing_document_items ### Description List billing document items. ### Method GET ### Endpoint /billing_document_items ### Parameters #### Query Parameters - **cursor** (string) - Optional - A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. - **expand** (List) - Optional - Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. - **filter** (List) - Optional - A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. - **sort** (List) - Optional - A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. - **pageSize** (int?) - Optional - The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. - **fields** (List) - Optional - Allows you to specify which fields are returned in the response. Accepted values: `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `name`, `quantity`, `recognized_revenue_account`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_inclusive`, `unit_amount`. - **taxationItemsFields** (List) - Optional - Allows you to specify which fields are returned in the response. Accepted values: `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`. #### Header Parameters - **zuoraTrackId** (string) - Optional - A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote (\"), or quote ('). - **zuoraEntityIds** (string) - Optional - An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. - **idempotencyKey** (string) - Optional - A header for idempotency. - **acceptEncoding** (string) - Optional - A header for accept encoding. - **contentEncoding** (string) - Optional - A header for content encoding. ### Request Example ```csharp using System.Collections.Generic; using System.Diagnostics; using Zuora.Api; using Zuora.Client; using Zuora.Model; namespace Example { public class GetBillingDocumentItemsExample { public static void Main() { Configuration.Default.BasePath = "https://rest.sandbox.na.zuora.com/v2"; // Configure HTTP bearer authorization: bearerAuth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new BillingDocumentItemsApi(Configuration.Default); var cursor = cursor_example; // string | A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) var expand = new List(); // List | Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) var filter = new List(); // List | A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. (optional) var sort = new List(); // List | A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) var pageSize = 56; // int? | The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) var fields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `name`, `quantity`, `recognized_revenue_account`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_inclusive`, `unit_amount`
(optional) var taxationItemsFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`
(optional) var zuoraTrackId = zuoraTrackId_example; // string | A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote (\"), or quote ('). (optional) var zuoraEntityIds = zuoraEntityIds_example; // string | An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. (optional) try { // List billing document items BillingDocumentItemListResponse result = apiInstance.GetBillingDocumentItems(cursor, expand, filter, sort, pageSize, fields, taxationItemsFields, zuoraTrackId, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling BillingDocumentItemsApi.GetBillingDocumentItems: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } ``` ### Response #### Success Response (200) - **BillingDocumentItemListResponse** - The response contains a list of billing document items. #### Response Example ```json { "data": [ { "id": "string", "name": "string", "quantity": 0, "unit_amount": 0, "tax_inclusive": true, "service_start": "2023-01-01", "service_end": "2023-01-31" } ], "next_page": "string" } ``` ``` -------------------------------- ### GET /v1/bill-runs Source: https://github.com/zuora/sdk-csharp/blob/main/docs/BillRunsApi.md This snippet documents the GET /v1/bill-runs endpoint, which retrieves a list of bill runs. It includes the method, endpoint, parameters, and response structure as derived from the SDK example. ```APIDOC ## [GET] /v1/bill-runs ### Description Retrieves a list of bill runs. This endpoint supports pagination, filtering, sorting, and field selection. ### Method GET ### Endpoint /v1/bill-runs ### Parameters #### Query Parameters - **cursor** (string) - Optional - The cursor for pagination. - **expand** (string) - Optional - A string that expands the response to include additional fields. - **filter** (string) - Optional - A filter to narrow the list of bill runs. - **sort** (string) - Optional - The sort order for the results. - **pageSize** (integer) - Optional - The number of records per page. - **fields** (string) - Optional - A comma-separated list of fields to include in the response. #### Header Parameters - **Zuora-Track-Id** (string) - Optional - A custom header for tracking requests. - **Zuora-Entity-Ids** (string) - Optional - A custom header for specifying entity IDs. - **Idempotency-Key** (string) - Optional - A custom header for idempotency. - **Accept-Encoding** (string) - Optional - A custom header for content encoding. - **Content-Encoding** (string) - Optional - A custom header for content encoding. ### Request Example No request body is required for this GET request. ### Response #### Success Response (200) - **BillRunListResponse** (object) - The response containing a list of bill runs. #### Response Example { "data": [ { "id": "string", "name": "string" } ] } ``` -------------------------------- ### GetProducts C# Example Source: https://github.com/zuora/sdk-csharp/blob/main/docs/ProductsApi.md Demonstrates how to initialize the ProductsApi client and call the GetProducts method with optional parameters like pagination, filtering, and field selection. ```csharp using System.Collections.Generic; using System.Diagnostics; using Zuora.Api; using Zuora.Client; using Zuora.Model; namespace Example { public class GetProductsExample { public static void Main() { Configuration.Default.BasePath = "https://rest.sandbox.na.zuora.com/v2"; // Configure HTTP bearer authorization: bearerAuth Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ProductsApi(Configuration.Default); var cursor = cursor_example; // string | A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) var expand = new List(); // List | Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) var filter = new List(); // List | A case-sensitive filter on the list. See the [Filter lists](https://www.zuora.com/developer/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. (optional) var sort = new List(); // List | A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) var pageSize = 56; // int? | The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) var fields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `active`, `name`, `type`, `sku`, `description`
(optional) var plansFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `name`, `active`, `description`, `plan_number`, `product_id`, `active_currencies`
(optional) var pricesFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `tiers`, `charge_model`, `charge_type`, `name`, `description`, `revenue_recognition_rule`, `stacked_discount`, `recognized_revenue_accounting_code`, `deferred_revenue_accounting_code`, `accounting_code`, `recurring`, `start_event`, `tax_code`, `tax_inclusive`, `taxable`, `unit_of_measure`, `quantity`, `min_quantity`, `max_quantity`, `price_base_interval`, `discount_level`, `overage`, `plan_id`, `tiers_mode`, `apply_discount_to`, `prepayment`, `drawdown`, `discount_amounts`, `unit_amounts`, `discount_percent`
(optional) var zuoraTrackId = zuoraTrackId_example; // string | A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), or quote ('). (optional) ``` -------------------------------- ### GET /bill_runs/{bill_run_id} Source: https://github.com/zuora/sdk-csharp/blob/main/docs/BillRunsApi.md Example of retrieving a bill run using the BillRunsApi.GetBillRun method. ```APIDOC ## [GET] /bill_runs/{bill_run_id} ### Description Retrieves a bill run by its identifier. ### Method GET ### Endpoint /bill_runs/{bill_run_id} ### Parameters #### Path Parameters - **billRunId** (string) - Required - Identifier for the bill run, either `bill_run_number` or `bill_run_id`. #### Query Parameters - **fields** (List) - Optional - Allows you to specify which fields are returned in the response. Accepted values: `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `email`, `post`, `renew`, `batches`, `day_of_month`, `charges_excluded`, `invoice_date`, `email_zero_amount_invoices`, `target_date`, `bill_run_number`, `bill_run_time`, `invoices_sent`, `last_invoice_sent_time`, `accounts_processed`, `invoices_generated`, `credit_memos_generated`, `state`, `name`. - **expand** (List) - Optional - Allows you to expand responses by including related object information in a single call. - **filter** (List) - Optional - A case-sensitive filter on the list. Note that the filters on this operation are only applicable to the related objects. - **pageSize** (int?) - Optional - The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. #### Header Parameters - **zuoraTrackId** (string) - Optional - A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. - **zuoraEntityIds** (string) - Optional - An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. - **idempotencyKey** (string) - Optional - Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. - **acceptEncoding** (string) - Optional - Include a `accept-encoding: gzip` header to compress responses. - **contentEncoding** (string) - Optional - Include a `content-encoding: gzip` header to compress a request. ### Request Example ``` GET /bill_runs/{bill_run_id} ``` ### Response #### Success Response (200) Returns a `BillRun` object. #### Response Example ``` { "id": "string", "account_id": "string", "email": "string", "post": "string", "renew": "string", "batches": "string", "day_of_month": "string", "charges_excluded": "string", "invoice_date": "string", "email_zero_amount_invoices": "string", "target_date": "string", "bill_run_number": "string", "bill_run_time": "string", "invoices_sent": "string", "last_invoice_sent_time": "string", "accounts_processed": "string", "invoices_generated": "string", "credit_memos_generated": "string", "state": "string", "name": "string" } ``` ``` -------------------------------- ### GET /contacts/{contactId} Source: https://github.com/zuora/sdk-csharp/blob/main/docs/ContactsApi.md Example of retrieving a contact using the ContactsApi in the Zuora C# SDK. ```APIDOC ## [GET] /contacts/{contactId} ### Description Retrieves a contact by its unique identifier. This operation allows you to specify which fields to return, expand related objects, and filter related objects. ### Method GET ### Endpoint /contacts/{contactId} ### Parameters #### Path Parameters - **contactId** (string) - Required - Contact Id #### Query Parameters - **fields** (List) - Optional - Allows you to specify which fields are returned in the response. Accepted values: `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` - **expand** (List) - Optional - Allows you to expand responses by including related object information in a single call. - **filter** (List) - Optional - A case-sensitive filter on the list. Note that the filters on this operation are only applicable to the related objects. - **pageSize** (int?) - Optional - The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. #### Header Parameters - **zuoraTrackId** (string) - Optional - A custom identifier for tracking API requests. - **async** (bool?) - Optional - Making asynchronous requests allows you to scale your applications more efficiently. - **zuoraEntityId** (string) - Optional - An entity ID. If you have multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. - **idempotencyKey** (string) - Optional - Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. - **acceptEncoding** (string) - Optional - Include a `accept-encoding: gzip` header to compress responses. - **contentEncoding** (string) - Optional - Include a `content-encoding: gzip` header to compress a request. ### Request Example ``` GET /contacts/{contactId}?fields=custom_fields,created_by_id&expand=account&filter=account_id.EQ:123&pageSize=20 ``` ### Response #### Success Response (200) Returns the contact object with the requested fields. #### Response Example ```json { "id": "contactId_example", "account_id": "accountId_example", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" } ``` ``` -------------------------------- ### C# Example: Setting Up Account Query Parameters Source: https://github.com/zuora/sdk-csharp/blob/main/docs/AccountsApi.md Initializes optional field list parameters for an account query. Each list specifies which fields to return for the corresponding sub-resource. The expand list allows including related object information in a single call. ```csharp var soldToFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax`
(optional) ``` ```csharp var defaultPaymentMethodFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `type`, `account_id`, `bank_identification_number`, `device_session_id`, `ip_address`, `maximum_payment_attempts`, `payment_retry_interval`, `state`, `use_default_retry_rule`, `existing_mandate`, `last_failed_sale_transaction_time`, `last_transaction_time`, `last_transaction_status`, `number_of_consecutive_failures`, `total_number_of_processed_payments`, `total_number_of_error_payments`, `billing_details`, `card`, `apple_pay`, `google_pay`, `ach_debit`, `cc_ref`, `paypal_adaptive`, `paypal_express_native`, `paypal_express`, `sepa_debit`, `betalings_debit`, `autogiro_debit`, `bacs_debit`, `au_becs_debit`, `nz_becs_debit`, `pad_debit`
(optional) ``` ```csharp var usageRecordsFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `account_number`, `subscription_item_id`, `subscription_item_number`, `subscription_id`, `subscription_number`, `unit_of_measure`, `description`, `end_time`, `state`, `start_time`, `quantity`
(optional) ``` ```csharp var invoicesFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `state`, `balance`, `due_date`, `invoice_number`, `posted_by_id`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `paid`, `past_due`, `document_date`, `amount_paid`, `amount_refunded`, `payment_terms`, `bill_to_id`, `sold_to_id`, `billing_document_settings`
(optional) ``` ```csharp var creditMemosFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`
(optional) ``` ```csharp var debitMemosFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `balance`, `due_date`, `debit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `posted_by_id`, `state`, `reason_code`, `paid`, `past_due`, `billing_document_settings`, `payment_terms`, `bill_to_id`, `invoice_id`
(optional) ``` ```csharp var prepaidBalanceFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `prepaid_UOM`, `start_date`, `end_date`, `total_balance`, `remaining_balance`
(optional) ``` ```csharp var transactionsFields = new List(); // List | Allows you to specify which fields are returned in the response.
Accepted values `transaction_date`, `type`, `quantity`
(optional) ``` ```csharp var expand = new List(); // List | Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://www.zuora.com/developer/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) ```