Skip to content

Commit

Permalink
[DE-988] Release v0.4.1 (#33)
Browse files Browse the repository at this point in the history
- Add `imported` to subscription `cancellation_method`
- Add `id` filter to List Products API
  • Loading branch information
maciej-nedza authored Sep 27, 2024
1 parent 16f5b02 commit fca30de
Show file tree
Hide file tree
Showing 64 changed files with 471 additions and 392 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
$ go get github.com/maxio-com/[email protected].1
```

You can also view the package at: https://pkg.go.dev/github.com/maxio-com/[email protected].0
You can also view the package at: https://pkg.go.dev/github.com/maxio-com/[email protected].1

## Initialize the API Client

Expand Down
12 changes: 6 additions & 6 deletions api_exports_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down
10 changes: 5 additions & 5 deletions configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 4 additions & 4 deletions coupons_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
}
16 changes: 8 additions & 8 deletions custom_fields_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions customers_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions doc/controllers/api-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>Default value is 100.<br>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.<br>Use in query `page=1`. |
| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.<br>Default value is 100.<br>The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.<br>**Default**: `100`<br>**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.<br>Use in query `page=1`.<br>**Default**: `1`<br>**Constraints**: `>= 1` |

## Response Type

Expand Down Expand Up @@ -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.<br>Default value is 100.<br>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.<br>Use in query `page=1`. |
| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.<br>Default value is 100.<br>The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.<br>**Default**: `100`<br>**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.<br>Use in query `page=1`.<br>**Default**: `1`<br>**Constraints**: `>= 1` |

## Response Type

Expand Down Expand Up @@ -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.<br>Default value is 100.<br>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.<br>Use in query `page=1`. |
| `perPage` | `*int` | Query, Optional | This parameter indicates how many records to fetch in each request.<br>Default value is 100.<br>The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.<br>**Default**: `100`<br>**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.<br>Use in query `page=1`.<br>**Default**: `1`<br>**Constraints**: `>= 1` |

## Response Type

Expand Down
8 changes: 4 additions & 4 deletions doc/controllers/component-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>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.<br>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.<br>Use in query `page=1`.<br>**Default**: `1`<br>**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.<br>Use in query `per_page=200`.<br>**Default**: `20`<br>**Constraints**: `<= 200` |
| `filterType` | [`[]models.PricePointType`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. |

## Response Type
Expand Down Expand Up @@ -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.<br>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.<br>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.<br>Use in query `page=1`.<br>**Default**: `1`<br>**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.<br>Use in query `per_page=200`.<br>**Default**: `20`<br>**Constraints**: `<= 200` |
| `direction` | [`*models.SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.<br>Use in query `direction=asc`. |
| `filter` | [`*models.ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations |

Expand Down
Loading

0 comments on commit fca30de

Please sign in to comment.