diff --git a/README.md b/README.md index da3fbe58..f6e9ddb5 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ The following section explains how to use the advancedbilling library in a new p To use the package in your application, you can install the package from [pkg.go.dev](https://pkg.go.dev/) using the following command: ```bash -$ go get github.com/maxio-com/ab-golang-sdk@v0.4.0 +$ go get github.com/maxio-com/ab-golang-sdk@v0.4.1 ``` -You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v0.4.0 +You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v0.4.1 ## Initialize the API Client diff --git a/api_exports_controller.go b/api_exports_controller.go index 9b2a297e..86b88008 100644 --- a/api_exports_controller.go +++ b/api_exports_controller.go @@ -30,8 +30,8 @@ func NewAPIExportsController(baseController baseController) *APIExportsControlle type ListExportedProformaInvoicesInput struct { // Id of a Batch Job. BatchId string - // This parameter indicates how many records to fetch in each request. - // Default value is 100. + // This parameter indicates how many records to fetch in each request. + // Default value is 100. // The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. PerPage *int // Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. @@ -79,8 +79,8 @@ func (a *APIExportsController) ListExportedProformaInvoices( type ListExportedInvoicesInput struct { // Id of a Batch Job. BatchId string - // This parameter indicates how many records to fetch in each request. - // Default value is 100. + // This parameter indicates how many records to fetch in each request. + // Default value is 100. // The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. PerPage *int // Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. @@ -128,8 +128,8 @@ func (a *APIExportsController) ListExportedInvoices( type ListExportedSubscriptionsInput struct { // Id of a Batch Job. BatchId string - // This parameter indicates how many records to fetch in each request. - // Default value is 100. + // This parameter indicates how many records to fetch in each request. + // Default value is 100. // The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. PerPage *int // Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. diff --git a/client.go b/client.go index cbce82d5..c42a73c6 100644 --- a/client.go +++ b/client.go @@ -98,7 +98,7 @@ func NewClient(configuration Configuration) ClientInterface { configuration: configuration, } - client.userAgent = utilities.UpdateUserAgent("AB SDK Go:0.4.0 on OS {os-info}") + client.userAgent = utilities.UpdateUserAgent("AB SDK Go:0.4.1 on OS {os-info}") client.callBuilderFactory = callBuilderHandler( func(server string) string { if server == "" { diff --git a/configuration.go b/configuration.go index 017b69be..e6a002cd 100644 --- a/configuration.go +++ b/configuration.go @@ -74,27 +74,27 @@ func WithBasicAuthCredentials(basicAuthCredentials BasicAuthCredentials) Configu } } -// Environment returns the Environment from the Configuration. +// Environment returns the environment from the Configuration. func (c Configuration) Environment() Environment { return c.environment } -// Subdomain returns the Subdomain from the Configuration. +// Subdomain returns the subdomain from the Configuration. func (c Configuration) Subdomain() string { return c.subdomain } -// Domain returns the Domain from the Configuration. +// Domain returns the domain from the Configuration. func (c Configuration) Domain() string { return c.domain } -// HttpConfiguration returns the HttpConfiguration from the Configuration. +// HttpConfiguration returns the httpConfiguration from the Configuration. func (c Configuration) HttpConfiguration() HttpConfiguration { return c.httpConfiguration } -// BasicAuthCredentials returns the BasicAuthCredentials from the Configuration. +// BasicAuthCredentials returns the basicAuthCredentials from the Configuration. func (c Configuration) BasicAuthCredentials() BasicAuthCredentials { return c.basicAuthCredentials } diff --git a/coupons_controller.go b/coupons_controller.go index 7f0810ed..70f6cdd5 100644 --- a/coupons_controller.go +++ b/coupons_controller.go @@ -531,7 +531,7 @@ func (c *CouponsController) UpdateCouponSubcodes( } // DeleteCouponSubcode takes context, couponId, subcode as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // ## Example // Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: @@ -565,9 +565,9 @@ func (c *CouponsController) DeleteCouponSubcode( "404": {TemplatedMessage: "Not Found:'{$response.body}'"}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } diff --git a/custom_fields_controller.go b/custom_fields_controller.go index aa1de451..8eaef752 100644 --- a/custom_fields_controller.go +++ b/custom_fields_controller.go @@ -164,7 +164,7 @@ func (c *CustomFieldsController) UpdateMetafield( } // DeleteMetafield takes context, resourceType, name as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Use the following method to delete a metafield. This will remove the metafield from the Site. // Additionally, this will remove the metafield and associated metadata with all Subscriptions on the Site. @@ -187,11 +187,11 @@ func (c *CustomFieldsController) DeleteMetafield( req.QueryParam("name", *name) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // CreateMetadata takes context, resourceType, resourceId, body as parameters and @@ -324,7 +324,7 @@ func (c *CustomFieldsController) UpdateMetadata( } // DeleteMetadata takes context, resourceType, resourceId, name, names as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This method removes the metadata from the subscriber/customer cited. // ## Query String Usage @@ -364,11 +364,11 @@ func (c *CustomFieldsController) DeleteMetadata( req.QueryParamWithArraySerializationOption("names", names, https.UnIndexed) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ListMetadataForResourceTypeInput represents the input of the ListMetadataForResourceType endpoint. diff --git a/customers_controller.go b/customers_controller.go index 954b9766..18d4829b 100644 --- a/customers_controller.go +++ b/customers_controller.go @@ -203,7 +203,7 @@ func (c *CustomersController) UpdateCustomer( } // DeleteCustomer takes context, id as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This method allows you to delete the Customer. func (c *CustomersController) DeleteCustomer( @@ -214,11 +214,11 @@ func (c *CustomersController) DeleteCustomer( req := c.prepareRequest(ctx, "DELETE", fmt.Sprintf("/customers/%v.json", id)) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ReadCustomerByReference takes context, reference as parameters and diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 4c2f6f55..b5d3ca10 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -40,8 +40,8 @@ ListExportedProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | ## Response Type @@ -94,8 +94,8 @@ ListExportedInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | ## Response Type @@ -148,8 +148,8 @@ ListExportedSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | ## Response Type diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 8aa2c80d..5cc9cb82 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -190,8 +190,8 @@ ListComponentPricePoints( | --- | --- | --- | --- | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | | `currencyPrices` | `*bool` | Query, Optional | Include an array of currency price data | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `filterType` | [`[]models.PricePointType`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | ## Response Type @@ -864,8 +864,8 @@ ListAllComponentPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `include` | [`*models.ListComponentsPricePointsInclude`](../../doc/models/list-components-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`*models.ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 51ae0ab1..b5f97461 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -726,7 +726,7 @@ ReadComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -803,7 +803,7 @@ UpdateProductFamilyComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `body` | [`*models.UpdateComponentRequest`](../../doc/models/update-component-request.md) | Body, Optional | - | ## Response Type @@ -890,7 +890,7 @@ ArchiveComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -970,8 +970,8 @@ ListComponents( | `startDatetime` | `*string` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `endDatetime` | `*string` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | | `includeArchived` | `*bool` | Query, Optional | Include archived items | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `filter` | [`*models.ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | ## Response Type @@ -1207,8 +1207,8 @@ ListComponentsForProductFamily( | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family | | `includeArchived` | `*bool` | Query, Optional | Include archived items. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `filter` | [`*models.ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | | `dateField` | [`*models.BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `endDate` | `*string` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 8ea892bb..db83b735 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -130,8 +130,8 @@ ListCouponsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | | `filter` | [`*models.ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `*bool` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | @@ -587,8 +587,8 @@ ListCoupons( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | | `filter` | [`*models.ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `*bool` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | @@ -1033,8 +1033,8 @@ ListCouponSubcodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `couponId` | `int` | Template, Required | The Advanced Billing id of the coupon | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 2e246845..7926f928 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -156,8 +156,8 @@ ListMetafields( | --- | --- | --- | --- | | `resourceType` | [`models.ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `name` | `*string` | Query, Optional | filter by the name of the metafield | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type @@ -422,8 +422,8 @@ ListMetadata( | --- | --- | --- | --- | | `resourceType` | [`models.ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type @@ -613,15 +613,15 @@ ListMetadataForResourceType( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resourceType` | [`models.ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `dateField` | [`*models.BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `startDate` | `*time.Time` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `endDate` | `*time.Time` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `startDatetime` | `*time.Time` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `endDatetime` | `*time.Time` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `withDeleted` | `*bool` | Query, Optional | Allow to fetch deleted metadata. | -| `resourceIds` | `[]int` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. | +| `resourceIds` | `[]int` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.
**Constraints**: *Maximum Items*: `50` | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 6bc4edaa..a9dd774b 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -171,8 +171,8 @@ ListCustomers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Direction to sort customers by time of creation | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `50`
**Constraints**: `<= 200` | | `dateField` | [`*models.BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `startDate` | `*string` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `endDate` | `*string` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index cda2829d..ebff33bd 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -114,8 +114,8 @@ ListSegmentsForPricePoint( | --- | --- | --- | --- | | `componentId` | `string` | Template, Required | ID or Handle for the Component | | `pricePointId` | `string` | Template, Required | ID or Handle for the Price Point belonging to the Component | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | | `filter` | [`*models.ListSegmentsFilter`](../../doc/models/list-segments-filter.md) | Query, Optional | Filter to use for List Segments for a Price Point operation | ## Response Type diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 0c175cb9..e3e953c5 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -92,11 +92,11 @@ ListEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `sinceId` | `*int64` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `*int64` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events. | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `"desc"` | | `filter` | [`[]models.EventType`](../../doc/models/event-type.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `dateField` | [`*models.ListEventsDateField`](../../doc/models/list-events-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `startDate` | `*string` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -216,11 +216,11 @@ ListSubscriptionEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `sinceId` | `*int64` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `*int64` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events. | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `"desc"` | | `filter` | [`[]models.EventType`](../../doc/models/event-type.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | ## Response Type @@ -313,11 +313,11 @@ ReadEventsCount( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `sinceId` | `*int64` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `*int64` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events. | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `"desc"` | | `filter` | [`[]models.EventType`](../../doc/models/event-type.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | ## Response Type diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index 5aaae812..d2504130 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -182,8 +182,8 @@ ListMrrMovements( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `*int` | Query, Optional | optionally filter results by subscription | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.
**Default**: `10`
**Constraints**: `<= 50` | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type @@ -283,8 +283,8 @@ ListMrrPerSubscription( | --- | --- | --- | --- | | `filter` | [`*models.ListMrrFilter`](../../doc/models/list-mrr-filter.md) | Query, Optional | Filter to use for List MRR per subscription operation | | `atTime` | `*string` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | ## Response Type diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 1cc7200a..787a368c 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -115,23 +115,23 @@ ListInvoices( | `status` | [`*models.InvoiceStatus`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | | `subscriptionId` | `*int` | Query, Optional | The subscription's ID. | | `subscriptionGroupUid` | `*string` | Query, Optional | The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices. | -| `lineItems` | `*bool` | Query, Optional | Include line items data | -| `discounts` | `*bool` | Query, Optional | Include discounts data | -| `taxes` | `*bool` | Query, Optional | Include taxes data | -| `credits` | `*bool` | Query, Optional | Include credits data | -| `payments` | `*bool` | Query, Optional | Include payments data | -| `customFields` | `*bool` | Query, Optional | Include custom fields data | -| `refunds` | `*bool` | Query, Optional | Include refunds data | -| `dateField` | [`*models.InvoiceDateField`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `"desc"` | +| `lineItems` | `*bool` | Query, Optional | Include line items data
**Default**: `false` | +| `discounts` | `*bool` | Query, Optional | Include discounts data
**Default**: `false` | +| `taxes` | `*bool` | Query, Optional | Include taxes data
**Default**: `false` | +| `credits` | `*bool` | Query, Optional | Include credits data
**Default**: `false` | +| `payments` | `*bool` | Query, Optional | Include payments data
**Default**: `false` | +| `customFields` | `*bool` | Query, Optional | Include custom fields data
**Default**: `false` | +| `refunds` | `*bool` | Query, Optional | Include refunds data
**Default**: `false` | +| `dateField` | [`*models.InvoiceDateField`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.
**Default**: `"due_date"` | | `startDatetime` | `*string` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `endDatetime` | `*string` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `customerIds` | `[]int` | Query, Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | | `number` | `[]string` | Query, Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | | `productIds` | `[]int` | Query, Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | -| `sort` | [`*models.InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`. | +| `sort` | [`*models.InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.
**Default**: `"number"` | ## Response Type @@ -656,8 +656,8 @@ ListInvoiceEvents( | --- | --- | --- | --- | | `sinceDate` | `*string` | Query, Optional | The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns data from the beginning of the day). of the event from which you want to start the search. All the events before the `since_date` timestamp are not returned in the response. | | `sinceId` | `*int64` | Query, Optional | The ID of the event from which you want to start the search(ID is not included. e.g. if ID is set to 2, then all events with ID 3 and more will be shown) This parameter is not used if since_date is defined. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `100` | | `invoiceUid` | `*string` | Query, Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | | `withChangeInvoiceStatus` | `*string` | Query, Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | | `eventTypes` | [`[]models.InvoiceEventType`](../../doc/models/invoice-event-type.md) | Query, Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | @@ -1302,13 +1302,13 @@ ListCreditNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `*int` | Query, Optional | The subscription's Advanced Billing id | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `lineItems` | `*bool` | Query, Optional | Include line items data | -| `discounts` | `*bool` | Query, Optional | Include discounts data | -| `taxes` | `*bool` | Query, Optional | Include taxes data | -| `refunds` | `*bool` | Query, Optional | Include refunds data | -| `applications` | `*bool` | Query, Optional | Include applications data | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `lineItems` | `*bool` | Query, Optional | Include line items data
**Default**: `false` | +| `discounts` | `*bool` | Query, Optional | Include discounts data
**Default**: `false` | +| `taxes` | `*bool` | Query, Optional | Include taxes data
**Default**: `false` | +| `refunds` | `*bool` | Query, Optional | Include refunds data
**Default**: `false` | +| `applications` | `*bool` | Query, Optional | Include applications data
**Default**: `false` | ## Response Type @@ -2205,9 +2205,9 @@ ListConsolidatedInvoiceSegments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `invoiceUid` | `string` | Template, Required | The unique identifier of the consolidated invoice | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.
**Default**: `"asc"` | ## Response Type diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index e83f59d9..02fd5661 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -150,8 +150,8 @@ ListOffers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `includeArchived` | `*bool` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | ## Response Type diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index 152eb885..17d7d510 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -397,8 +397,8 @@ ListPaymentProfiles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `customerId` | `*int` | Query, Optional | The ID of the customer for which you wish to list payment profiles | ## Response Type diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 20162209..df375c56 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -33,8 +33,8 @@ ListProductsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `string` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `dateField` | [`*models.BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `filter` | [`*models.ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | | `startDate` | `*string` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -58,6 +58,13 @@ collectedInput := advancedbilling.ListProductsForProductFamilyInput{ Page: models.ToPointer(2), PerPage: models.ToPointer(50), DateField: models.ToPointer(models.BasicDateField("updated_at")), + Filter: models.ToPointer(models.ListProductsFilter{ + Ids: []int{ + 1, + 2, + 3, + }, + }), Include: models.ToPointer(models.ListProductsInclude("prepaid_product_price_point")), } diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 439301af..09a8b0b7 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -133,8 +133,8 @@ ListProductPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productId` | [`models.ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Template, Required | This is a container for one-of cases. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `10`
**Constraints**: `<= 200` | | `currencyPrices` | `*bool` | Query, Optional | When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. | | `filterType` | [`[]models.PricePointType`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | @@ -899,8 +899,8 @@ ListAllProductPricePoints( | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`*models.ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | | `include` | [`*models.ListProductsPricePointsInclude`](../../doc/models/list-products-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type diff --git a/doc/controllers/products.md b/doc/controllers/products.md index b958ffa0..31a85ec0 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -543,8 +543,8 @@ ListProducts( | `endDatetime` | `*time.Time` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | | `startDate` | `*time.Time` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `startDatetime` | `*time.Time` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `includeArchived` | `*bool` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `include` | [`*models.ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | @@ -559,6 +559,13 @@ ctx := context.Background() collectedInput := advancedbilling.ListProductsInput{ DateField: models.ToPointer(models.BasicDateField("updated_at")), + Filter: models.ToPointer(models.ListProductsFilter{ + Ids: []int{ + 1, + 2, + 3, + }, + }), Page: models.ToPointer(2), PerPage: models.ToPointer(50), IncludeArchived: models.ToPointer(true), diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 5a06f78c..f718c207 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -90,12 +90,12 @@ ListSubscriptionGroupProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `string` | Template, Required | The uid of the subscription group | -| `lineItems` | `*bool` | Query, Optional | Include line items data | -| `discounts` | `*bool` | Query, Optional | Include discounts data | -| `taxes` | `*bool` | Query, Optional | Include taxes data | -| `credits` | `*bool` | Query, Optional | Include credits data | -| `payments` | `*bool` | Query, Optional | Include payments data | -| `customFields` | `*bool` | Query, Optional | Include custom fields data | +| `lineItems` | `*bool` | Query, Optional | Include line items data
**Default**: `false` | +| `discounts` | `*bool` | Query, Optional | Include discounts data
**Default**: `false` | +| `taxes` | `*bool` | Query, Optional | Include taxes data
**Default**: `false` | +| `credits` | `*bool` | Query, Optional | Include credits data
**Default**: `false` | +| `payments` | `*bool` | Query, Optional | Include payments data
**Default**: `false` | +| `customFields` | `*bool` | Query, Optional | Include custom fields data
**Default**: `false` | ## Response Type @@ -255,15 +255,15 @@ ListProformaInvoices( | `startDate` | `*string` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `endDate` | `*string` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `status` | [`*models.ProformaInvoiceStatus`](../../doc/models/proforma-invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices. | -| `lineItems` | `*bool` | Query, Optional | Include line items data | -| `discounts` | `*bool` | Query, Optional | Include discounts data | -| `taxes` | `*bool` | Query, Optional | Include taxes data | -| `credits` | `*bool` | Query, Optional | Include credits data | -| `payments` | `*bool` | Query, Optional | Include payments data | -| `customFields` | `*bool` | Query, Optional | Include custom fields data | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `direction` | [`*models.Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `"desc"` | +| `lineItems` | `*bool` | Query, Optional | Include line items data
**Default**: `false` | +| `discounts` | `*bool` | Query, Optional | Include discounts data
**Default**: `false` | +| `taxes` | `*bool` | Query, Optional | Include taxes data
**Default**: `false` | +| `credits` | `*bool` | Query, Optional | Include credits data
**Default**: `false` | +| `payments` | `*bool` | Query, Optional | Include payments data
**Default**: `false` | +| `customFields` | `*bool` | Query, Optional | Include custom fields data
**Default**: `false` | ## Response Type diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index 49b1f8d2..a546fa4d 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -99,8 +99,8 @@ ListReasonCodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index 8c20fa00..ed533790 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -40,10 +40,10 @@ ListSalesCommissionSettings( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | -| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). | +| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `"Bearer <>"` | | `liveMode` | `*bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | ## Response Type @@ -131,10 +131,10 @@ ListSalesReps( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | -| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). | +| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `"Bearer <>"` | | `liveMode` | `*bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | ## Response Type @@ -277,10 +277,10 @@ ReadSalesRep( | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | | `salesRepId` | `string` | Template, Required | The Advanced Billing id of sales rep. | -| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). | +| `authorization` | `*string` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `"Bearer <>"` | | `liveMode` | `*bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | ## Response Type diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index dc2c492f..26a55390 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -129,7 +129,7 @@ ClearSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `cleanupScope` | [`*models.CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`. | +| `cleanupScope` | [`*models.CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.
**Default**: `"all"` | ## Response Type @@ -167,8 +167,8 @@ ListChargifyJsPublicKeys( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 73719046..cecb9bd1 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -608,7 +608,7 @@ ListAllocations( | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | ## Response Type @@ -1278,8 +1278,8 @@ ListUsages( | `maxId` | `*int64` | Query, Optional | Returns usages with an id less than or equal to the one specified | | `sinceDate` | `*time.Time` | Query, Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | | `untilDate` | `*time.Time` | Query, Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type @@ -1600,8 +1600,8 @@ ListSubscriptionComponentsForSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `sort` | [`*models.ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`*models.ListSubscriptionComponentsForSiteFilter`](../../doc/models/list-subscription-components-for-site-filter.md) | Query, Optional | Filter to use for List Subscription Components For Site operation | @@ -1610,7 +1610,7 @@ ListSubscriptionComponentsForSite( | `startDatetime` | `*string` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `endDate` | `*string` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2011-12-16`. | | `endDatetime` | `*string` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-07-01 09:00:05`. | -| `subscriptionIds` | `[]int` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`. | +| `subscriptionIds` | `[]int` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | | `pricePointIds` | [`*models.IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `productFamilyIds` | `[]int` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | | `include` | [`*models.ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 43084f23..c9424e35 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -95,8 +95,8 @@ ListPrepaymentsForSubscriptionGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `string` | Template, Required | The uid of the subscription group | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `filter` | [`*models.ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index a3350bc6..653b13e9 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -189,8 +189,8 @@ ListSubscriptionGroups( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `include` | [`[]models.SubscriptionGroupsListInclude`](../../doc/models/subscription-groups-list-include.md) | Query, Optional | A list of additional information to include in the response. The following values are supported:

- `account_balances`: Account balance information for the subscription groups. Use in query: `include[]=account_balances` | ## Response Type diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 705bc282..24ca6e5f 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -154,8 +154,8 @@ ListPrepayments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `filter` | [`*models.ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index f80c2a23..cff10049 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -91,8 +91,8 @@ ListSubscriptionNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | ## Response Type diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index d2b7d84b..7d907f10 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -417,7 +417,7 @@ ResumeSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `calendarBillingResumptionCharge` | [`*models.ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled | +| `calendarBillingResumptionCharge` | [`*models.ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled
**Default**: `"prorated"` | ## Response Type diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index b5ca22ef..000b8182 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -910,8 +910,8 @@ ListSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `state` | [`*models.SubscriptionStateFilter`](../../doc/models/subscription-state-filter.md) | Query, Optional | The current state of the subscription | | `product` | `*int` | Query, Optional | The product id of the subscription. (Note that the product handle cannot be used.) | | `productPricePointId` | `*int` | Query, Optional | The ID of the product price point. If supplied, product is required | @@ -923,7 +923,7 @@ ListSubscriptions( | `endDatetime` | `*time.Time` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-08-01 10:00:05`. | | `metadata` | `map[string]string` | Query, Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | | `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `sort` | [`*models.SubscriptionSort`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort | +| `sort` | [`*models.SubscriptionSort`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort
**Default**: `"signup_date"` | | `include` | [`[]models.SubscriptionListInclude`](../../doc/models/subscription-list-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | ## Response Type diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 7f6918f1..4641e0ed 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -50,8 +50,8 @@ ListWebhooks( | `status` | [`*models.WebhookStatus`](../../doc/models/webhook-status.md) | Query, Optional | Webhooks with matching status would be returned. | | `sinceDate` | `*string` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | | `untilDate` | `*string` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | -| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | -| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `page` | `*int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | | `order` | [`*models.WebhookOrder`](../../doc/models/webhook-order.md) | Query, Optional | The order in which the Webhooks are returned. | | `subscription` | `*int` | Query, Optional | The Advanced Billing id of a subscription you'd like to filter for | diff --git a/doc/models/cancellation-method.md b/doc/models/cancellation-method.md index a2ba3621..49cee3d0 100644 --- a/doc/models/cancellation-method.md +++ b/doc/models/cancellation-method.md @@ -16,4 +16,5 @@ The process used to cancel the subscription, if the subscription has been cancel | `DUNNING` | | `BILLINGPORTAL` | | `UNKNOWN` | +| `IMPORTED` | diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md index 5ca7bf3c..38b28d79 100644 --- a/doc/models/list-products-filter.md +++ b/doc/models/list-products-filter.md @@ -9,6 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | +| `Ids` | `[]int` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | | `PrepaidProductPricePoint` | [`*models.PrepaidProductPricePointFilter`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | | `UseSiteExchangeRate` | `*bool` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | @@ -16,6 +17,11 @@ ```json { + "ids": [ + 1, + 2, + 3 + ], "prepaid_product_price_point": { "product_price_point_id": "product_price_point_id2" }, diff --git a/errors/errors.go b/errors/errors.go index 74ffda5c..f9556128 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -20,12 +20,14 @@ type ComponentAllocationError struct { // NewComponentAllocationError is a constructor for ComponentAllocationError. // It creates and returns a pointer to a new ComponentAllocationError instance with the given statusCode and body. func NewComponentAllocationError(apiError https.ApiError) error { - return &ComponentAllocationError{ApiError: apiError} + return &ComponentAllocationError{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ComponentAllocationError. -func (c *ComponentAllocationError) Error() string { +func (c ComponentAllocationError) Error() string { return fmt.Sprintf("ComponentAllocationError occured: %v", c.Message) } @@ -38,12 +40,14 @@ type ComponentPricePointError struct { // NewComponentPricePointError is a constructor for ComponentPricePointError. // It creates and returns a pointer to a new ComponentPricePointError instance with the given statusCode and body. func NewComponentPricePointError(apiError https.ApiError) error { - return &ComponentPricePointError{ApiError: apiError} + return &ComponentPricePointError{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ComponentPricePointError. -func (c *ComponentPricePointError) Error() string { +func (c ComponentPricePointError) Error() string { return fmt.Sprintf("ComponentPricePointError occured: %v", c.Message) } @@ -56,12 +60,14 @@ type CustomerErrorResponse struct { // NewCustomerErrorResponse is a constructor for CustomerErrorResponse. // It creates and returns a pointer to a new CustomerErrorResponse instance with the given statusCode and body. func NewCustomerErrorResponse(apiError https.ApiError) error { - return &CustomerErrorResponse{ApiError: apiError} + return &CustomerErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for CustomerErrorResponse. -func (c *CustomerErrorResponse) Error() string { +func (c CustomerErrorResponse) Error() string { return fmt.Sprintf("CustomerErrorResponse occured: %v", c.Message) } @@ -74,12 +80,14 @@ type ErrorArrayMapResponse struct { // NewErrorArrayMapResponse is a constructor for ErrorArrayMapResponse. // It creates and returns a pointer to a new ErrorArrayMapResponse instance with the given statusCode and body. func NewErrorArrayMapResponse(apiError https.ApiError) error { - return &ErrorArrayMapResponse{ApiError: apiError} + return &ErrorArrayMapResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ErrorArrayMapResponse. -func (e *ErrorArrayMapResponse) Error() string { +func (e ErrorArrayMapResponse) Error() string { return fmt.Sprintf("ErrorArrayMapResponse occured: %v", e.Message) } @@ -93,12 +101,14 @@ type ErrorListResponse struct { // NewErrorListResponse is a constructor for ErrorListResponse. // It creates and returns a pointer to a new ErrorListResponse instance with the given statusCode and body. func NewErrorListResponse(apiError https.ApiError) error { - return &ErrorListResponse{ApiError: apiError} + return &ErrorListResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ErrorListResponse. -func (e *ErrorListResponse) Error() string { +func (e ErrorListResponse) Error() string { return fmt.Sprintf("ErrorListResponse occured: %v", e.Message) } @@ -111,12 +121,14 @@ type ErrorStringMapResponse struct { // NewErrorStringMapResponse is a constructor for ErrorStringMapResponse. // It creates and returns a pointer to a new ErrorStringMapResponse instance with the given statusCode and body. func NewErrorStringMapResponse(apiError https.ApiError) error { - return &ErrorStringMapResponse{ApiError: apiError} + return &ErrorStringMapResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ErrorStringMapResponse. -func (e *ErrorStringMapResponse) Error() string { +func (e ErrorStringMapResponse) Error() string { return fmt.Sprintf("ErrorStringMapResponse occured: %v", e.Message) } @@ -129,12 +141,14 @@ type EventBasedBillingListSegmentsErrors struct { // NewEventBasedBillingListSegmentsErrors is a constructor for EventBasedBillingListSegmentsErrors. // It creates and returns a pointer to a new EventBasedBillingListSegmentsErrors instance with the given statusCode and body. func NewEventBasedBillingListSegmentsErrors(apiError https.ApiError) error { - return &EventBasedBillingListSegmentsErrors{ApiError: apiError} + return &EventBasedBillingListSegmentsErrors{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for EventBasedBillingListSegmentsErrors. -func (e *EventBasedBillingListSegmentsErrors) Error() string { +func (e EventBasedBillingListSegmentsErrors) Error() string { return fmt.Sprintf("EventBasedBillingListSegmentsErrors occured: %v", e.Message) } @@ -147,12 +161,14 @@ type EventBasedBillingSegment struct { // NewEventBasedBillingSegment is a constructor for EventBasedBillingSegment. // It creates and returns a pointer to a new EventBasedBillingSegment instance with the given statusCode and body. func NewEventBasedBillingSegment(apiError https.ApiError) error { - return &EventBasedBillingSegment{ApiError: apiError} + return &EventBasedBillingSegment{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for EventBasedBillingSegment. -func (e *EventBasedBillingSegment) Error() string { +func (e EventBasedBillingSegment) Error() string { return fmt.Sprintf("EventBasedBillingSegment occured: %v", e.Message) } @@ -165,12 +181,14 @@ type EventBasedBillingSegmentErrors struct { // NewEventBasedBillingSegmentErrors is a constructor for EventBasedBillingSegmentErrors. // It creates and returns a pointer to a new EventBasedBillingSegmentErrors instance with the given statusCode and body. func NewEventBasedBillingSegmentErrors(apiError https.ApiError) error { - return &EventBasedBillingSegmentErrors{ApiError: apiError} + return &EventBasedBillingSegmentErrors{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for EventBasedBillingSegmentErrors. -func (e *EventBasedBillingSegmentErrors) Error() string { +func (e EventBasedBillingSegmentErrors) Error() string { return fmt.Sprintf("EventBasedBillingSegmentErrors occured: %v", e.Message) } @@ -183,12 +201,14 @@ type ProductPricePointErrorResponse struct { // NewProductPricePointErrorResponse is a constructor for ProductPricePointErrorResponse. // It creates and returns a pointer to a new ProductPricePointErrorResponse instance with the given statusCode and body. func NewProductPricePointErrorResponse(apiError https.ApiError) error { - return &ProductPricePointErrorResponse{ApiError: apiError} + return &ProductPricePointErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ProductPricePointErrorResponse. -func (p *ProductPricePointErrorResponse) Error() string { +func (p ProductPricePointErrorResponse) Error() string { return fmt.Sprintf("ProductPricePointErrorResponse occured: %v", p.Message) } @@ -201,12 +221,14 @@ type ProformaBadRequestErrorResponse struct { // NewProformaBadRequestErrorResponse is a constructor for ProformaBadRequestErrorResponse. // It creates and returns a pointer to a new ProformaBadRequestErrorResponse instance with the given statusCode and body. func NewProformaBadRequestErrorResponse(apiError https.ApiError) error { - return &ProformaBadRequestErrorResponse{ApiError: apiError} + return &ProformaBadRequestErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for ProformaBadRequestErrorResponse. -func (p *ProformaBadRequestErrorResponse) Error() string { +func (p ProformaBadRequestErrorResponse) Error() string { return fmt.Sprintf("ProformaBadRequestErrorResponse occured: %v", p.Message) } @@ -220,12 +242,14 @@ type RefundPrepaymentBaseErrorsResponse struct { // NewRefundPrepaymentBaseErrorsResponse is a constructor for RefundPrepaymentBaseErrorsResponse. // It creates and returns a pointer to a new RefundPrepaymentBaseErrorsResponse instance with the given statusCode and body. func NewRefundPrepaymentBaseErrorsResponse(apiError https.ApiError) error { - return &RefundPrepaymentBaseErrorsResponse{ApiError: apiError} + return &RefundPrepaymentBaseErrorsResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for RefundPrepaymentBaseErrorsResponse. -func (r *RefundPrepaymentBaseErrorsResponse) Error() string { +func (r RefundPrepaymentBaseErrorsResponse) Error() string { return fmt.Sprintf("RefundPrepaymentBaseErrorsResponse occured: %v", r.Message) } @@ -238,12 +262,14 @@ type SingleErrorResponse struct { // NewSingleErrorResponse is a constructor for SingleErrorResponse. // It creates and returns a pointer to a new SingleErrorResponse instance with the given statusCode and body. func NewSingleErrorResponse(apiError https.ApiError) error { - return &SingleErrorResponse{ApiError: apiError} + return &SingleErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SingleErrorResponse. -func (s *SingleErrorResponse) Error() string { +func (s SingleErrorResponse) Error() string { return fmt.Sprintf("SingleErrorResponse occured: %v", s.Message) } @@ -256,12 +282,14 @@ type SingleStringErrorResponse struct { // NewSingleStringErrorResponse is a constructor for SingleStringErrorResponse. // It creates and returns a pointer to a new SingleStringErrorResponse instance with the given statusCode and body. func NewSingleStringErrorResponse(apiError https.ApiError) error { - return &SingleStringErrorResponse{ApiError: apiError} + return &SingleStringErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SingleStringErrorResponse. -func (s *SingleStringErrorResponse) Error() string { +func (s SingleStringErrorResponse) Error() string { return fmt.Sprintf("SingleStringErrorResponse occured: %v", s.Message) } @@ -277,12 +305,14 @@ type SubscriptionAddCouponError struct { // NewSubscriptionAddCouponError is a constructor for SubscriptionAddCouponError. // It creates and returns a pointer to a new SubscriptionAddCouponError instance with the given statusCode and body. func NewSubscriptionAddCouponError(apiError https.ApiError) error { - return &SubscriptionAddCouponError{ApiError: apiError} + return &SubscriptionAddCouponError{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionAddCouponError. -func (s *SubscriptionAddCouponError) Error() string { +func (s SubscriptionAddCouponError) Error() string { return fmt.Sprintf("SubscriptionAddCouponError occured: %v", s.Message) } @@ -295,12 +325,14 @@ type SubscriptionComponentAllocationError struct { // NewSubscriptionComponentAllocationError is a constructor for SubscriptionComponentAllocationError. // It creates and returns a pointer to a new SubscriptionComponentAllocationError instance with the given statusCode and body. func NewSubscriptionComponentAllocationError(apiError https.ApiError) error { - return &SubscriptionComponentAllocationError{ApiError: apiError} + return &SubscriptionComponentAllocationError{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionComponentAllocationError. -func (s *SubscriptionComponentAllocationError) Error() string { +func (s SubscriptionComponentAllocationError) Error() string { return fmt.Sprintf("SubscriptionComponentAllocationError occured: %v", s.Message) } @@ -313,12 +345,14 @@ type SubscriptionGroupCreateErrorResponse struct { // NewSubscriptionGroupCreateErrorResponse is a constructor for SubscriptionGroupCreateErrorResponse. // It creates and returns a pointer to a new SubscriptionGroupCreateErrorResponse instance with the given statusCode and body. func NewSubscriptionGroupCreateErrorResponse(apiError https.ApiError) error { - return &SubscriptionGroupCreateErrorResponse{ApiError: apiError} + return &SubscriptionGroupCreateErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionGroupCreateErrorResponse. -func (s *SubscriptionGroupCreateErrorResponse) Error() string { +func (s SubscriptionGroupCreateErrorResponse) Error() string { return fmt.Sprintf("SubscriptionGroupCreateErrorResponse occured: %v", s.Message) } @@ -331,12 +365,14 @@ type SubscriptionGroupSignupErrorResponse struct { // NewSubscriptionGroupSignupErrorResponse is a constructor for SubscriptionGroupSignupErrorResponse. // It creates and returns a pointer to a new SubscriptionGroupSignupErrorResponse instance with the given statusCode and body. func NewSubscriptionGroupSignupErrorResponse(apiError https.ApiError) error { - return &SubscriptionGroupSignupErrorResponse{ApiError: apiError} + return &SubscriptionGroupSignupErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionGroupSignupErrorResponse. -func (s *SubscriptionGroupSignupErrorResponse) Error() string { +func (s SubscriptionGroupSignupErrorResponse) Error() string { return fmt.Sprintf("SubscriptionGroupSignupErrorResponse occured: %v", s.Message) } @@ -349,12 +385,14 @@ type SubscriptionGroupUpdateErrorResponse struct { // NewSubscriptionGroupUpdateErrorResponse is a constructor for SubscriptionGroupUpdateErrorResponse. // It creates and returns a pointer to a new SubscriptionGroupUpdateErrorResponse instance with the given statusCode and body. func NewSubscriptionGroupUpdateErrorResponse(apiError https.ApiError) error { - return &SubscriptionGroupUpdateErrorResponse{ApiError: apiError} + return &SubscriptionGroupUpdateErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionGroupUpdateErrorResponse. -func (s *SubscriptionGroupUpdateErrorResponse) Error() string { +func (s SubscriptionGroupUpdateErrorResponse) Error() string { return fmt.Sprintf("SubscriptionGroupUpdateErrorResponse occured: %v", s.Message) } @@ -367,12 +405,14 @@ type SubscriptionRemoveCouponErrors struct { // NewSubscriptionRemoveCouponErrors is a constructor for SubscriptionRemoveCouponErrors. // It creates and returns a pointer to a new SubscriptionRemoveCouponErrors instance with the given statusCode and body. func NewSubscriptionRemoveCouponErrors(apiError https.ApiError) error { - return &SubscriptionRemoveCouponErrors{ApiError: apiError} + return &SubscriptionRemoveCouponErrors{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionRemoveCouponErrors. -func (s *SubscriptionRemoveCouponErrors) Error() string { +func (s SubscriptionRemoveCouponErrors) Error() string { return fmt.Sprintf("SubscriptionRemoveCouponErrors occured: %v", s.Message) } @@ -385,12 +425,14 @@ type SubscriptionsMrrErrorResponse struct { // NewSubscriptionsMrrErrorResponse is a constructor for SubscriptionsMrrErrorResponse. // It creates and returns a pointer to a new SubscriptionsMrrErrorResponse instance with the given statusCode and body. func NewSubscriptionsMrrErrorResponse(apiError https.ApiError) error { - return &SubscriptionsMrrErrorResponse{ApiError: apiError} + return &SubscriptionsMrrErrorResponse{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for SubscriptionsMrrErrorResponse. -func (s *SubscriptionsMrrErrorResponse) Error() string { +func (s SubscriptionsMrrErrorResponse) Error() string { return fmt.Sprintf("SubscriptionsMrrErrorResponse occured: %v", s.Message) } @@ -403,11 +445,13 @@ type TooManyManagementLinkRequestsError struct { // NewTooManyManagementLinkRequestsError is a constructor for TooManyManagementLinkRequestsError. // It creates and returns a pointer to a new TooManyManagementLinkRequestsError instance with the given statusCode and body. func NewTooManyManagementLinkRequestsError(apiError https.ApiError) error { - return &TooManyManagementLinkRequestsError{ApiError: apiError} + return &TooManyManagementLinkRequestsError{ + ApiError: apiError, + } } // Error implements the Error method for the error interface. // It returns a formatted error message for TooManyManagementLinkRequestsError. -func (t *TooManyManagementLinkRequestsError) Error() string { +func (t TooManyManagementLinkRequestsError) Error() string { return fmt.Sprintf("TooManyManagementLinkRequestsError occured: %v", t.Message) } diff --git a/events_based_billing_segments_controller.go b/events_based_billing_segments_controller.go index cb225489..f1ee6155 100644 --- a/events_based_billing_segments_controller.go +++ b/events_based_billing_segments_controller.go @@ -160,7 +160,7 @@ func (e *EventsBasedBillingSegmentsController) UpdateSegment( } // DeleteSegment takes context, componentId, pricePointId, id as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This endpoint allows you to delete a Segment with specified ID. // You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -182,11 +182,11 @@ func (e *EventsBasedBillingSegmentsController) DeleteSegment( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'."}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // BulkCreateSegments takes context, componentId, pricePointId, body as parameters and diff --git a/go.mod b/go.mod index d27b928c..445ef80a 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module github.com/maxio-com/ab-golang-sdk go 1.18 -require github.com/apimatic/go-core-runtime v0.0.23 +require github.com/apimatic/go-core-runtime v0.0.25 require github.com/google/uuid v1.6.0 // indirect diff --git a/go.sum b/go.sum index dc0ecafa..4dbab2d9 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/apimatic/go-core-runtime v0.0.23 h1:1veBglzHCXbFY83X/V5KncLiiC73RtYO816KPfaJS6w= -github.com/apimatic/go-core-runtime v0.0.23/go.mod h1:eYSG9icLyMjbPWq212ELOQ4PZdlT2RihZGXEaAZdx6Q= +github.com/apimatic/go-core-runtime v0.0.25 h1:bEndGNqpBMZc9QSlUTcjw+RTrLEATi702N2raqPC44g= +github.com/apimatic/go-core-runtime v0.0.25/go.mod h1:eYSG9icLyMjbPWq212ELOQ4PZdlT2RihZGXEaAZdx6Q= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/invoices_controller.go b/invoices_controller.go index 4c54f574..77182baf 100644 --- a/invoices_controller.go +++ b/invoices_controller.go @@ -817,7 +817,7 @@ func (i *InvoicesController) CreateInvoice( } // SendInvoice takes context, uid, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. // Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address. @@ -842,11 +842,11 @@ func (i *InvoicesController) SendInvoice( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // PreviewCustomerInformationChanges takes context, uid as parameters and diff --git a/models/allocate_components.go b/models/allocate_components.go index 7e91f228..cb060d71 100644 --- a/models/allocate_components.go +++ b/models/allocate_components.go @@ -23,7 +23,7 @@ type AllocateComponents struct { DowngradeCredit Optional[CreditType] `json:"downgrade_credit"` // (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription PaymentCollectionMethod *CollectionMethod `json:"payment_collection_method,omitempty"` - // If true, if the immediate component payment fails, initiate dunning for the subscription. + // If true, if the immediate component payment fails, initiate dunning for the subscription. // Otherwise, leave the charges on the subscription to pay for at renewal. InitiateDunning *bool `json:"initiate_dunning,omitempty"` AdditionalProperties map[string]any `json:"_"` diff --git a/models/allocation.go b/models/allocation.go index 1dfb99a2..739a6bfc 100644 --- a/models/allocation.go +++ b/models/allocation.go @@ -45,7 +45,7 @@ type Allocation struct { PreviousPricePointId *int `json:"previous_price_point_id,omitempty"` // If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. AccrueCharge *bool `json:"accrue_charge,omitempty"` - // If true, if the immediate component payment fails, initiate dunning for the subscription. + // If true, if the immediate component payment fails, initiate dunning for the subscription. // Otherwise, leave the charges on the subscription to pay for at renewal. InitiateDunning *bool `json:"initiate_dunning,omitempty"` // The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. diff --git a/models/chargify_ebb.go b/models/chargify_ebb.go index 3b475c62..51421211 100644 --- a/models/chargify_ebb.go +++ b/models/chargify_ebb.go @@ -21,10 +21,10 @@ type ChargifyEBB struct { CreatedAt *time.Time `json:"created_at,omitempty"` // User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days. UniquenessToken *string `json:"uniqueness_token,omitempty"` - // Id of Maxio Advanced Billing Subscription which is connected to this event. + // Id of Maxio Advanced Billing Subscription which is connected to this event. // Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. SubscriptionId *int `json:"subscription_id,omitempty"` - // Reference of Maxio Advanced Billing Subscription which is connected to this event. + // Reference of Maxio Advanced Billing Subscription which is connected to this event. // Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. SubscriptionReference *string `json:"subscription_reference,omitempty"` AdditionalProperties map[string]any `json:"_"` diff --git a/models/create_allocation.go b/models/create_allocation.go index d2666a78..bf24fbdf 100644 --- a/models/create_allocation.go +++ b/models/create_allocation.go @@ -31,7 +31,7 @@ type CreateAllocation struct { // The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. // Available values: `full`, `prorated`, `none`. UpgradeCharge Optional[CreditType] `json:"upgrade_charge"` - // If set to true, if the immediate component payment fails, initiate dunning for the subscription. + // If set to true, if the immediate component payment fails, initiate dunning for the subscription. // Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false. InitiateDunning *bool `json:"initiate_dunning,omitempty"` // Price point that the allocation should be charged at. Accepts either the price point's id (integer) or handle (string). When not specified, the default price point will be used. diff --git a/models/enums.go b/models/enums.go index b110caa1..e32596f3 100644 --- a/models/enums.go +++ b/models/enums.go @@ -582,7 +582,8 @@ func (e CancellationMethod) isValid() bool { CancellationMethod_MERCHANTAPI, CancellationMethod_DUNNING, CancellationMethod_BILLINGPORTAL, - CancellationMethod_UNKNOWN: + CancellationMethod_UNKNOWN, + CancellationMethod_IMPORTED: return true } return false @@ -594,6 +595,7 @@ const ( CancellationMethod_DUNNING CancellationMethod = "dunning" CancellationMethod_BILLINGPORTAL CancellationMethod = "billing_portal" CancellationMethod_UNKNOWN CancellationMethod = "unknown" + CancellationMethod_IMPORTED CancellationMethod = "imported" ) // CardType is a string enum. @@ -4447,23 +4449,23 @@ const ( // SubscriptionState is a string enum. // The state of a subscription. // * **Live States** -// * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. -// * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. -// * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. -// * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. -// * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. +// * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. +// * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. +// * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. +// * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. +// * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. // * **Problem States** -// * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. -// * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. -// * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. +// * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. +// * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. +// * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. // * **End of Life States** -// * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. -// While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. -// * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. -// * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) -// * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. -// * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. -// * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. +// * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. +// While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. +// * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. +// * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) +// * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. +// * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. +// * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. // See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. type SubscriptionState string diff --git a/models/full_subscription_group_response.go b/models/full_subscription_group_response.go index 6f2c1dcb..7a019f07 100644 --- a/models/full_subscription_group_response.go +++ b/models/full_subscription_group_response.go @@ -22,23 +22,23 @@ type FullSubscriptionGroupResponse struct { NextAssessmentAt *time.Time `json:"next_assessment_at,omitempty"` // The state of a subscription. // * **Live States** - // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. - // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. - // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. + // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. + // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. + // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. // * **Problem States** - // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. - // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. - // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. + // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. + // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. + // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. // * **End of Life States** - // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. - // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. - // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. - // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) - // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. - // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. - // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. + // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. + // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. + // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. + // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) + // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. + // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. + // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. // See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. State *SubscriptionState `json:"state,omitempty"` CancelAtEndOfPeriod *bool `json:"cancel_at_end_of_period,omitempty"` diff --git a/models/list_products_filter.go b/models/list_products_filter.go index ba33d259..e46cfab1 100644 --- a/models/list_products_filter.go +++ b/models/list_products_filter.go @@ -11,6 +11,8 @@ import ( // ListProductsFilter represents a ListProductsFilter struct. type ListProductsFilter struct { + // Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`. + Ids []int `json:"ids,omitempty"` // Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. PrepaidProductPricePoint *PrepaidProductPricePointFilter `json:"prepaid_product_price_point,omitempty"` // Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. @@ -30,6 +32,9 @@ func (l ListProductsFilter) MarshalJSON() ( func (l ListProductsFilter) toMap() map[string]any { structMap := make(map[string]any) MapAdditionalProperties(structMap, l.AdditionalProperties) + if l.Ids != nil { + structMap["ids"] = l.Ids + } if l.PrepaidProductPricePoint != nil { structMap["prepaid_product_price_point"] = l.PrepaidProductPricePoint.toMap() } @@ -47,12 +52,13 @@ func (l *ListProductsFilter) UnmarshalJSON(input []byte) error { if err != nil { return err } - additionalProperties, err := UnmarshalAdditionalProperties(input, "prepaid_product_price_point", "use_site_exchange_rate") + additionalProperties, err := UnmarshalAdditionalProperties(input, "ids", "prepaid_product_price_point", "use_site_exchange_rate") if err != nil { return err } l.AdditionalProperties = additionalProperties + l.Ids = temp.Ids l.PrepaidProductPricePoint = temp.PrepaidProductPricePoint l.UseSiteExchangeRate = temp.UseSiteExchangeRate return nil @@ -60,6 +66,7 @@ func (l *ListProductsFilter) UnmarshalJSON(input []byte) error { // tempListProductsFilter is a temporary struct used for validating the fields of ListProductsFilter. type tempListProductsFilter struct { + Ids []int `json:"ids,omitempty"` PrepaidProductPricePoint *PrepaidProductPricePointFilter `json:"prepaid_product_price_point,omitempty"` UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"` } diff --git a/models/subscription.go b/models/subscription.go index a4b212d1..a026b28b 100644 --- a/models/subscription.go +++ b/models/subscription.go @@ -17,23 +17,23 @@ type Subscription struct { Id *int `json:"id,omitempty"` // The state of a subscription. // * **Live States** - // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. - // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. - // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. + // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. + // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. + // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. // * **Problem States** - // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. - // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. - // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. + // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. + // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. + // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. // * **End of Life States** - // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. - // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. - // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. - // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) - // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. - // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. - // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. + // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. + // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. + // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. + // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) + // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. + // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. + // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. // See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. State *SubscriptionState `json:"state,omitempty"` // Gives the current outstanding subscription balance in the number of cents. diff --git a/models/subscription_component_subscription.go b/models/subscription_component_subscription.go index 8868d23b..e2df0bdd 100644 --- a/models/subscription_component_subscription.go +++ b/models/subscription_component_subscription.go @@ -16,23 +16,23 @@ import ( type SubscriptionComponentSubscription struct { // The state of a subscription. // * **Live States** - // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. - // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. - // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. + // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. + // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. + // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. // * **Problem States** - // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. - // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. - // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. + // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. + // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. + // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. // * **End of Life States** - // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. - // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. - // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. - // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) - // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. - // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. - // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. + // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. + // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. + // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. + // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) + // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. + // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. + // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. // See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. State *SubscriptionState `json:"state,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` diff --git a/models/subscription_group_signup_response.go b/models/subscription_group_signup_response.go index 7dd4a625..82fed996 100644 --- a/models/subscription_group_signup_response.go +++ b/models/subscription_group_signup_response.go @@ -22,23 +22,23 @@ type SubscriptionGroupSignupResponse struct { NextAssessmentAt *time.Time `json:"next_assessment_at,omitempty"` // The state of a subscription. // * **Live States** - // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. - // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. - // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. - // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. + // * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. + // * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. + // * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. + // * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. // * **Problem States** - // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. - // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. - // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. + // * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. + // * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. + // * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. // * **End of Life States** - // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. - // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. - // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. - // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) - // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. - // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. - // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. + // * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. + // While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. + // * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. + // * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) + // * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. + // * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. + // * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. // See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. State *SubscriptionState `json:"state,omitempty"` CancelAtEndOfPeriod *bool `json:"cancel_at_end_of_period,omitempty"` diff --git a/models/utilities.go b/models/utilities.go index c8a6add5..f2ecfca0 100644 --- a/models/utilities.go +++ b/models/utilities.go @@ -20,10 +20,15 @@ func ToPointer[T any](value T) *T { // file content, file name, and file headers. type FileWrapper = https.FileWrapper -// GetFile retrieves a file from the given fileUrl and returns it as a FileWrapper. -// It makes an HTTP GET request to the fileUrl to fetch the file's content and metadata. +// GetFile retrieves a file from the given filePath and returns it as a FileWrapper. +// It makes an HTTP GET request to the filePath to fetch the file's content and metadata. +// OR It uses os.ReadFile to read the file's content and metadata. var GetFile = https.GetFile +// GetFileWithContentType retrieves a file from the given filePath using GetFile and returns it as a FileWrapper. +// It also sets the provided "content-type" in the file headers. +var GetFileWithContentType = https.GetFileWithContentType + // Optional is a generic struct that allows any type to be used as optional and nullable. // Optional.set is true when Optional.value is to be used. type Optional[T any] struct { diff --git a/offers_controller.go b/offers_controller.go index e19b7912..b9f95b4d 100644 --- a/offers_controller.go +++ b/offers_controller.go @@ -126,7 +126,7 @@ func (o *OffersController) ReadOffer( } // ArchiveOffer takes context, offerId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Archive an existing offer. Please provide an `offer_id` in order to archive the correct item. func (o *OffersController) ArchiveOffer( @@ -141,15 +141,15 @@ func (o *OffersController) ArchiveOffer( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // UnarchiveOffer takes context, offerId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the correct item. func (o *OffersController) UnarchiveOffer( @@ -164,9 +164,9 @@ func (o *OffersController) UnarchiveOffer( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } diff --git a/payment_profiles_controller.go b/payment_profiles_controller.go index 5bd96b86..f4cf69b0 100644 --- a/payment_profiles_controller.go +++ b/payment_profiles_controller.go @@ -421,7 +421,7 @@ func (p *PaymentProfilesController) UpdatePaymentProfile( } // DeleteUnusedPaymentProfile takes context, paymentProfileId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Deletes an unused payment profile. // If the payment profile is in use by one or more subscriptions or groups, a 422 and error message will be returned. @@ -441,15 +441,15 @@ func (p *PaymentProfilesController) DeleteUnusedPaymentProfile( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // DeleteSubscriptionsPaymentProfile takes context, subscriptionId, paymentProfileId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This will delete a payment profile belonging to the customer on the subscription. // + If the customer has multiple subscriptions, the payment profile will be removed from all of them. @@ -467,11 +467,11 @@ func (p *PaymentProfilesController) DeleteSubscriptionsPaymentProfile( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // VerifyBankAccount takes context, bankAccountId, body as parameters and @@ -510,7 +510,7 @@ func (p *PaymentProfilesController) VerifyBankAccount( } // DeleteSubscriptionGroupPaymentProfile takes context, uid, paymentProfileId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This will delete a Payment Profile belonging to a Subscription Group. // **Note**: If the Payment Profile belongs to multiple Subscription Groups and/or Subscriptions, it will be removed from all of them. @@ -527,11 +527,11 @@ func (p *PaymentProfilesController) DeleteSubscriptionGroupPaymentProfile( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ChangeSubscriptionDefaultPaymentProfile takes context, subscriptionId, paymentProfileId as parameters and @@ -630,7 +630,7 @@ func (p *PaymentProfilesController) ReadOneTimeToken( } // SendRequestUpdatePaymentEmail takes context, subscriptionId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // You can send a "request payment update" email to the customer associated with the subscription. // If you attempt to send a "request payment update" email more than five times within a 30-minute period, you will receive a `422` response with an error message in the body. This error message will indicate that the request has been rejected due to excessive attempts, and will provide instructions on how to resubmit the request. @@ -652,9 +652,9 @@ func (p *PaymentProfilesController) SendRequestUpdatePaymentEmail( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } diff --git a/proforma_invoices_controller.go b/proforma_invoices_controller.go index 07813afb..5cf687a6 100644 --- a/proforma_invoices_controller.go +++ b/proforma_invoices_controller.go @@ -28,7 +28,7 @@ func NewProformaInvoicesController(baseController baseController) *ProformaInvoi } // CreateConsolidatedProformaInvoice takes context, uid as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. // If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. @@ -49,11 +49,11 @@ func (p *ProformaInvoicesController) CreateConsolidatedProformaInvoice( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ListSubscriptionGroupProformaInvoicesInput represents the input of the ListSubscriptionGroupProformaInvoices endpoint. diff --git a/sites_controller.go b/sites_controller.go index 1dd35150..5887676c 100644 --- a/sites_controller.go +++ b/sites_controller.go @@ -53,7 +53,7 @@ func (s *SitesController) ReadSite(ctx context.Context) ( } // ClearSite takes context, cleanupScope as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. // **This functionality will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.** @@ -67,11 +67,11 @@ func (s *SitesController) ClearSite( if cleanupScope != nil { req.QueryParam("cleanup_scope", *cleanupScope) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ListChargifyJsPublicKeysInput represents the input of the ListChargifyJsPublicKeys endpoint. diff --git a/subscription_components_controller.go b/subscription_components_controller.go index 3f005eb3..915cb886 100644 --- a/subscription_components_controller.go +++ b/subscription_components_controller.go @@ -408,7 +408,7 @@ func (s *SubscriptionComponentsController) PreviewAllocations( } // UpdatePrepaidUsageAllocationExpirationDate takes context, subscriptionId, componentId, allocationId, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // When the expiration interval options are selected on a prepaid usage component price point, all allocations will be created with an expiration date. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. // In order to change a prepaid usage allocation's expiration date, a PUT call must be made to the allocation's endpoint with a new expiration date. @@ -440,15 +440,15 @@ func (s *SubscriptionComponentsController) UpdatePrepaidUsageAllocationExpiratio req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // DeletePrepaidUsageAllocation takes context, subscriptionId, componentId, allocationId, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component each allocation must be destroyed individually via this endpoint. // ## Credit Scheme @@ -479,11 +479,11 @@ func (s *SubscriptionComponentsController) DeletePrepaidUsageAllocation( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // CreateUsage takes context, subscriptionId, componentId, body as parameters and @@ -631,7 +631,7 @@ func (s *SubscriptionComponentsController) ListUsages( } // ActivateEventBasedComponent takes context, subscriptionId, componentId, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. // Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). @@ -655,15 +655,15 @@ func (s *SubscriptionComponentsController) ActivateEventBasedComponent( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // DeactivateEventBasedComponent takes context, subscriptionId, componentId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Use this endpoint to deactivate an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. func (s *SubscriptionComponentsController) DeactivateEventBasedComponent( @@ -679,15 +679,15 @@ func (s *SubscriptionComponentsController) DeactivateEventBasedComponent( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // RecordEvent takes context, subdomain, apiHandle, storeUid, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // ## Documentation // Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. @@ -722,15 +722,15 @@ func (s *SubscriptionComponentsController) RecordEvent( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // BulkRecordEvents takes context, subdomain, apiHandle, storeUid, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Use this endpoint to record a collection of events. // *Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.* @@ -757,11 +757,11 @@ func (s *SubscriptionComponentsController) BulkRecordEvents( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ListSubscriptionComponentsForSiteInput represents the input of the ListSubscriptionComponentsForSite endpoint. diff --git a/subscription_group_status_controller.go b/subscription_group_status_controller.go index 18718082..b1a91a52 100644 --- a/subscription_group_status_controller.go +++ b/subscription_group_status_controller.go @@ -28,7 +28,7 @@ func NewSubscriptionGroupStatusController(baseController baseController) *Subscr } // CancelSubscriptionsInGroup takes context, uid, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This endpoint will immediately cancel all subscriptions within the specified group. The group is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members as well must be on automatic billing or they must be prepaid. // In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request. @@ -52,15 +52,15 @@ func (s *SubscriptionGroupStatusController) CancelSubscriptionsInGroup( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // InitiateDelayedCancellationForGroup takes context, uid as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by it's uid passed in the URL. // All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state. @@ -79,15 +79,15 @@ func (s *SubscriptionGroupStatusController) InitiateDelayedCancellationForGroup( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // CancelDelayedCancellationForGroup takes context, uid as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Removing the delayed cancellation on a subscription group will ensure that the subscriptions do not get canceled at the end of the period. The request will reset the `cancel_at_end_of_period` flag to false on each member in the group. func (s *SubscriptionGroupStatusController) CancelDelayedCancellationForGroup( @@ -105,11 +105,11 @@ func (s *SubscriptionGroupStatusController) CancelDelayedCancellationForGroup( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // ReactivateSubscriptionGroup takes context, uid, body as parameters and diff --git a/subscription_groups_controller.go b/subscription_groups_controller.go index 5956c622..0fa23488 100644 --- a/subscription_groups_controller.go +++ b/subscription_groups_controller.go @@ -295,7 +295,7 @@ func (s *SubscriptionGroupsController) AddSubscriptionToGroup( } // RemoveSubscriptionFromGroup takes context, subscriptionId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to remove existing subscription from subscription group. func (s *SubscriptionGroupsController) RemoveSubscriptionFromGroup( @@ -314,9 +314,9 @@ func (s *SubscriptionGroupsController) RemoveSubscriptionFromGroup( "422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse}, }) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } diff --git a/subscription_invoice_account_controller.go b/subscription_invoice_account_controller.go index 8added31..616bd3a0 100644 --- a/subscription_invoice_account_controller.go +++ b/subscription_invoice_account_controller.go @@ -177,7 +177,7 @@ func (s *SubscriptionInvoiceAccountController) IssueServiceCredit( } // DeductServiceCredit takes context, subscriptionId, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Credit will be removed from the subscription in the amount specified in the request body. The credit amount being deducted must be equal to or less than the current credit balance. func (s *SubscriptionInvoiceAccountController) DeductServiceCredit( @@ -200,11 +200,11 @@ func (s *SubscriptionInvoiceAccountController) DeductServiceCredit( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // RefundPrepayment takes context, subscriptionId, prepaymentId, body as parameters and diff --git a/subscription_notes_controller.go b/subscription_notes_controller.go index bf78a6ed..39bf9344 100644 --- a/subscription_notes_controller.go +++ b/subscription_notes_controller.go @@ -164,7 +164,7 @@ func (s *SubscriptionNotesController) UpdateSubscriptionNote( } // DeleteSubscriptionNote takes context, subscriptionId, noteId as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // Use the following method to delete a note for a Subscription. func (s *SubscriptionNotesController) DeleteSubscriptionNote( @@ -180,9 +180,9 @@ func (s *SubscriptionNotesController) DeleteSubscriptionNote( ) req.Authenticate(NewAuth("BasicAuth")) - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } diff --git a/subscriptions_controller.go b/subscriptions_controller.go index 4f83d350..d2492e64 100644 --- a/subscriptions_controller.go +++ b/subscriptions_controller.go @@ -737,7 +737,7 @@ func (s *SubscriptionsController) ReadSubscription( } // OverrideSubscription takes context, subscriptionId, body as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // This API endpoint allows you to set certain subscription fields that are usually managed for you automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. // This endpoint is provided for cases where you need to “align” Advanced Billing data with data that happened in your system, perhaps before you started using Advanced Billing. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Advanced Billing to match your existing historical dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API. @@ -770,11 +770,11 @@ func (s *SubscriptionsController) OverrideSubscription( req.Json(body) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // FindSubscription takes context, reference as parameters and @@ -802,7 +802,7 @@ func (s *SubscriptionsController) FindSubscription( } // PurgeSubscription takes context, subscriptionId, ack, cascade as parameters and -// returns an models.ApiResponse with data and +// returns an *Response and // an error if there was an issue with the request or response. // For sites in test mode, you may purge individual subscriptions. // Provide the subscription ID in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` @@ -827,11 +827,11 @@ func (s *SubscriptionsController) PurgeSubscription( req.QueryParam("cascade", cascade) } - context, err := req.Call() + httpCtx, err := req.Call() if err != nil { - return context.Response, err + return httpCtx.Response, err } - return context.Response, err + return httpCtx.Response, err } // UpdatePrepaidSubscriptionConfiguration takes context, subscriptionId, body as parameters and diff --git a/test/go.mod b/test/go.mod index 99fd1297..059603b1 100644 --- a/test/go.mod +++ b/test/go.mod @@ -12,7 +12,7 @@ require ( ) require ( - github.com/apimatic/go-core-runtime v0.0.23 + github.com/apimatic/go-core-runtime v0.0.25 github.com/caarlos0/env/v10 v10.0.0 github.com/jaswdr/faker v1.19.1 github.com/maxio-com/ab-golang-sdk v0.0.1 diff --git a/test/go.sum b/test/go.sum index 7d25f65d..d499e928 100644 --- a/test/go.sum +++ b/test/go.sum @@ -1,5 +1,5 @@ -github.com/apimatic/go-core-runtime v0.0.23 h1:1veBglzHCXbFY83X/V5KncLiiC73RtYO816KPfaJS6w= -github.com/apimatic/go-core-runtime v0.0.23/go.mod h1:eYSG9icLyMjbPWq212ELOQ4PZdlT2RihZGXEaAZdx6Q= +github.com/apimatic/go-core-runtime v0.0.25 h1:bEndGNqpBMZc9QSlUTcjw+RTrLEATi702N2raqPC44g= +github.com/apimatic/go-core-runtime v0.0.25/go.mod h1:eYSG9icLyMjbPWq212ELOQ4PZdlT2RihZGXEaAZdx6Q= github.com/caarlos0/env/v10 v10.0.0 h1:yIHUBZGsyqCnpTkbjk8asUlx6RFhhEs+h7TOBdgdzXA= github.com/caarlos0/env/v10 v10.0.0/go.mod h1:ZfulV76NvVPw3tm591U4SwL3Xx9ldzBP9aGxzeN7G18= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=