Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE-613][DE-634] Updates to product price points and credit_types #46

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/controllers/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ Exposed event types are:
+ change_invoice_status
+ change_invoice_collection_method
+ remove_payment
+ failed_payment
+ apply_debit_note
+ create_debit_note

Invoice events are returned in ascending order.

Expand Down
62 changes: 39 additions & 23 deletions doc/controllers/product-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ ProductPricePointsController productPricePointsController = client.getProductPri

```java
ProductPricePointResponse createProductPricePoint(
final int productId,
final CreateProductPricePointProductId productId,
final CreateProductPricePointRequest body)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `productId` | `int` | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` |
| `productId` | [`CreateProductPricePointProductId`](../../doc/models/containers/create-product-price-point-product-id.md) | Template, Required | This is a container for one-of cases. |
| `body` | [`CreateProductPricePointRequest`](../../doc/models/create-product-price-point-request.md) | Body, Optional | - |

## Response Type
Expand All @@ -47,7 +47,9 @@ ProductPricePointResponse createProductPricePoint(
## Example Usage

```java
int productId = 202;
CreateProductPricePointProductId productId = CreateProductPricePointProductId.fromNumber(
124
);
CreateProductPricePointRequest body = new CreateProductPricePointRequest.Builder(
new CreateProductPricePoint.Builder(
"Educational",
Expand Down Expand Up @@ -125,7 +127,7 @@ ListProductPricePointsResponse listProductPricePoints(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `productId` | `int` | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` |
| `productId` | [`ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Template, Required | This is a container for one-of cases. |
| `page` | `Integer` | 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` | `Integer` | 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.<br>**Default**: `10`<br>**Constraints**: `<= 200` |
| `currencyPrices` | `Boolean` | 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. |
Expand All @@ -139,7 +141,9 @@ ListProductPricePointsResponse listProductPricePoints(

```java
ListProductPricePointsInput listProductPricePointsInput = new ListProductPricePointsInput.Builder(
202
ListProductPricePointsInputProductId.fromNumber(
124
)
)
.page(2)
.perPage(10)
Expand Down Expand Up @@ -193,17 +197,17 @@ Note: Custom product price points are not able to be updated.

```java
ProductPricePointResponse updateProductPricePoint(
final int productId,
final int pricePointId,
final UpdateProductPricePointProductId productId,
final UpdateProductPricePointPricePointId pricePointId,
final UpdateProductPricePointRequest body)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `productId` | `int` | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` |
| `pricePointId` | `int` | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:` |
| `productId` | [`UpdateProductPricePointProductId`](../../doc/models/containers/update-product-price-point-product-id.md) | Template, Required | This is a container for one-of cases. |
| `pricePointId` | [`UpdateProductPricePointPricePointId`](../../doc/models/containers/update-product-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. |
| `body` | [`UpdateProductPricePointRequest`](../../doc/models/update-product-price-point-request.md) | Body, Optional | - |

## Response Type
Expand All @@ -213,8 +217,12 @@ ProductPricePointResponse updateProductPricePoint(
## Example Usage

```java
int productId = 202;
int pricePointId = 10;
UpdateProductPricePointProductId productId = UpdateProductPricePointProductId.fromNumber(
124
);
UpdateProductPricePointPricePointId pricePointId = UpdateProductPricePointPricePointId.fromNumber(
188
);
UpdateProductPricePointRequest body = new UpdateProductPricePointRequest.Builder(
new UpdateProductPricePoint.Builder()
.handle("educational")
Expand Down Expand Up @@ -267,17 +275,17 @@ Use this endpoint to retrieve details for a specific product price point.

```java
ProductPricePointResponse readProductPricePoint(
final int productId,
final int pricePointId,
final ReadProductPricePointProductId productId,
final ReadProductPricePointPricePointId pricePointId,
final Boolean currencyPrices)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `productId` | `int` | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` |
| `pricePointId` | `int` | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:` |
| `productId` | [`ReadProductPricePointProductId`](../../doc/models/containers/read-product-price-point-product-id.md) | Template, Required | This is a container for one-of cases. |
| `pricePointId` | [`ReadProductPricePointPricePointId`](../../doc/models/containers/read-product-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. |
| `currencyPrices` | `Boolean` | 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. |

## Response Type
Expand All @@ -287,8 +295,12 @@ ProductPricePointResponse readProductPricePoint(
## Example Usage

```java
int productId = 202;
int pricePointId = 10;
ReadProductPricePointProductId productId = ReadProductPricePointProductId.fromNumber(
124
);
ReadProductPricePointPricePointId pricePointId = ReadProductPricePointPricePointId.fromNumber(
188
);

try {
ProductPricePointResponse result = productPricePointsController.readProductPricePoint(productId, pricePointId, null);
Expand Down Expand Up @@ -334,16 +346,16 @@ Use this endpoint to archive a product price point.

```java
ProductPricePointResponse archiveProductPricePoint(
final int productId,
final int pricePointId)
final ArchiveProductPricePointProductId productId,
final ArchiveProductPricePointPricePointId pricePointId)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `productId` | `int` | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` |
| `pricePointId` | `int` | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:` |
| `productId` | [`ArchiveProductPricePointProductId`](../../doc/models/containers/archive-product-price-point-product-id.md) | Template, Required | This is a container for one-of cases. |
| `pricePointId` | [`ArchiveProductPricePointPricePointId`](../../doc/models/containers/archive-product-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. |

## Response Type

Expand All @@ -352,8 +364,12 @@ ProductPricePointResponse archiveProductPricePoint(
## Example Usage

```java
int productId = 202;
int pricePointId = 10;
ArchiveProductPricePointProductId productId = ArchiveProductPricePointProductId.fromNumber(
124
);
ArchiveProductPricePointPricePointId pricePointId = ArchiveProductPricePointPricePointId.fromNumber(
188
);

try {
ProductPricePointResponse result = productPricePointsController.archiveProductPricePoint(productId, pricePointId);
Expand Down
6 changes: 3 additions & 3 deletions doc/models/allocate-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
| `ProrationDowngradeScheme` | `String` | Optional | **Default**: `"no-prorate"` | String getProrationDowngradeScheme() | setProrationDowngradeScheme(String prorationDowngradeScheme) |
| `Allocations` | [`List<CreateAllocationRequest>`](../../doc/models/create-allocation-request.md) | Optional | - | List<CreateAllocationRequest> getAllocations() | setAllocations(List<CreateAllocationRequest> allocations) |
| `AccrueCharge` | `Boolean` | Optional | - | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) |
| `UpgradeCharge` | `String` | Optional | - | String getUpgradeCharge() | setUpgradeCharge(String upgradeCharge) |
| `DowngradeCredit` | `String` | Optional | - | String getDowngradeCredit() | setDowngradeCredit(String downgradeCredit) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `PaymentCollectionMethod` | [`PaymentCollectionMethod1`](../../doc/models/payment-collection-method-1.md) | Optional | (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription<br>**Default**: `PaymentCollectionMethod1.AUTOMATIC` | PaymentCollectionMethod1 getPaymentCollectionMethod() | setPaymentCollectionMethod(PaymentCollectionMethod1 paymentCollectionMethod) |

## Example (as JSON)
Expand Down Expand Up @@ -47,7 +47,7 @@
}
],
"accrue_charge": false,
"upgrade_charge": "upgrade_charge4"
"upgrade_charge": "full"
}
```

4 changes: 2 additions & 2 deletions doc/models/allocation-preview-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
| `ProrationUpgradeScheme` | `String` | Optional | - | String getProrationUpgradeScheme() | setProrationUpgradeScheme(String prorationUpgradeScheme) |
| `ProrationDowngradeScheme` | `String` | Optional | - | String getProrationDowngradeScheme() | setProrationDowngradeScheme(String prorationDowngradeScheme) |
| `AccrueCharge` | `Boolean` | Optional | - | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) |
| `UpgradeCharge` | `String` | Optional | - | String getUpgradeCharge() | setUpgradeCharge(String upgradeCharge) |
| `DowngradeCredit` | `String` | Optional | - | String getDowngradeCredit() | setDowngradeCredit(String downgradeCredit) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `PricePointId` | `Integer` | Optional | - | Integer getPricePointId() | setPricePointId(Integer pricePointId) |
| `PreviousPricePointId` | `Integer` | Optional | - | Integer getPreviousPricePointId() | setPreviousPricePointId(Integer previousPricePointId) |
| `ComponentHandle` | `String` | Optional | - | String getComponentHandle() | setComponentHandle(String componentHandle) |
Expand Down
8 changes: 4 additions & 4 deletions doc/models/allocation-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `UpgradeCharge` | `String` | Optional | - | String getUpgradeCharge() | setUpgradeCharge(String upgradeCharge) |
| `DowngradeCredit` | `String` | Optional | - | String getDowngradeCredit() | setDowngradeCredit(String downgradeCredit) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `AccrueCharge` | `Boolean` | Optional | - | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) |

## Example (as JSON)

```json
{
"upgrade_charge": "upgrade_charge6",
"downgrade_credit": "downgrade_credit4",
"upgrade_charge": "none",
"downgrade_credit": "prorated",
"accrue_charge": false
}
```
Expand Down
4 changes: 2 additions & 2 deletions doc/models/allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
| `PricePointHandle` | `String` | Optional | - | String getPricePointHandle() | setPricePointHandle(String pricePointHandle) |
| `PreviousPricePointId` | `Integer` | Optional | - | Integer getPreviousPricePointId() | setPreviousPricePointId(Integer previousPricePointId) |
| `AccrueCharge` | `Boolean` | Optional | 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. | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) |
| `UpgradeCharge` | `String` | Optional | The type of charge to be created if the change in cost is an upgrade. | String getUpgradeCharge() | setUpgradeCharge(String upgradeCharge) |
| `DowngradeCredit` | `String` | Optional | The type of credit to be created if the change in cost is a downgrade. | String getDowngradeCredit() | setDowngradeCredit(String downgradeCredit) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `Payment` | [`AllocationPayment2`](../../doc/models/containers/allocation-payment-2.md) | Optional | This is a container for one-of cases. | AllocationPayment2 getPayment() | setPayment(AllocationPayment2 payment) |

## Example (as JSON)
Expand Down
4 changes: 2 additions & 2 deletions doc/models/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
| `DefaultPricePointName` | `String` | Optional | - | String getDefaultPricePointName() | setDefaultPricePointName(String defaultPricePointName) |
| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) |
| `UpgradeCharge` | `String` | Optional | - | String getUpgradeCharge() | setUpgradeCharge(String upgradeCharge) |
| `DowngradeCredit` | `String` | Optional | - | String getDowngradeCredit() | setDowngradeCredit(String downgradeCredit) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `CreatedAt` | `String` | Optional | Timestamp indicating when this component was created | String getCreatedAt() | setCreatedAt(String createdAt) |
| `UpdatedAt` | `String` | Optional | Timestamp indicating when this component was updated | String getUpdatedAt() | setUpdatedAt(String updatedAt) |
| `ArchivedAt` | `String` | Optional | Timestamp indicating when this component was archived | String getArchivedAt() | setArchivedAt(String archivedAt) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Archive Product Price Point Price Point Id

## Class Name

`ArchiveProductPricePointPricePointId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | ArchiveProductPricePointPricePointId.fromNumber(int number) |
| `String` | ArchiveProductPricePointPricePointId.fromString(String string) |

14 changes: 14 additions & 0 deletions doc/models/containers/archive-product-price-point-product-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Archive Product Price Point Product Id

## Class Name

`ArchiveProductPricePointProductId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | ArchiveProductPricePointProductId.fromNumber(int number) |
| `String` | ArchiveProductPricePointProductId.fromString(String string) |

14 changes: 14 additions & 0 deletions doc/models/containers/create-product-price-point-product-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Create Product Price Point Product Id

## Class Name

`CreateProductPricePointProductId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | CreateProductPricePointProductId.fromNumber(int number) |
| `String` | CreateProductPricePointProductId.fromString(String string) |

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# List Product Price Points Input Product Id

## Class Name

`ListProductPricePointsInputProductId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | ListProductPricePointsInputProductId.fromNumber(int number) |
| `String` | ListProductPricePointsInputProductId.fromString(String string) |

14 changes: 14 additions & 0 deletions doc/models/containers/read-product-price-point-price-point-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Read Product Price Point Price Point Id

## Class Name

`ReadProductPricePointPricePointId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | ReadProductPricePointPricePointId.fromNumber(int number) |
| `String` | ReadProductPricePointPricePointId.fromString(String string) |

14 changes: 14 additions & 0 deletions doc/models/containers/read-product-price-point-product-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Read Product Price Point Product Id

## Class Name

`ReadProductPricePointProductId`

## Cases

| Type | Factory Method |
| --- | --- |
| `int` | ReadProductPricePointProductId.fromNumber(int number) |
| `String` | ReadProductPricePointProductId.fromString(String string) |

13 changes: 13 additions & 0 deletions doc/models/containers/subscription-group-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Subscription Group 2

## Class Name

`SubscriptionGroup2`

## Cases

| Type | Factory Method |
| --- | --- |
| [`SubscriptionGroupInlined`](../../../doc/models/subscription-group-inlined.md) | SubscriptionGroup2.fromSubscriptionGroupInlined(SubscriptionGroupInlined subscriptionGroupInlined) |

Loading