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-603] Subscription status tests 2 #54

Merged
merged 7 commits into from
Dec 11, 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
10 changes: 5 additions & 5 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ try {
{
"id": 25407138,
"name": "cillum aute",
"pricing_scheme": "in incididu",
"pricing_scheme": "stairstep",
"unit_name": "nulla in",
"unit_price": "Excepteur veniam",
"product_family_id": -56705047,
Expand Down Expand Up @@ -912,7 +912,7 @@ CreateComponentPricePointRequest body = new CreateComponentPricePointRequest.Bui
CreateComponentPricePointRequestPricePoint.fromCreateComponentPricePoint(
new CreateComponentPricePoint.Builder(
"Wholesale",
"stairstep",
PricingScheme.STAIRSTEP,
Arrays.asList(
new Price.Builder(
PriceStartingQuantity.fromString(
Expand Down Expand Up @@ -1083,7 +1083,7 @@ CreateComponentPricePointsRequest body = new CreateComponentPricePointsRequest.B
CreateComponentPricePointsRequestPricePoints.fromCreateComponentPricePoint(
new CreateComponentPricePoint.Builder(
"Wholesale",
"per_unit",
PricingScheme.PER_UNIT,
Arrays.asList(
new Price.Builder(
PriceStartingQuantity.fromNumber(
Expand All @@ -1102,7 +1102,7 @@ CreateComponentPricePointsRequest body = new CreateComponentPricePointsRequest.B
CreateComponentPricePointsRequestPricePoints.fromCreateComponentPricePoint(
new CreateComponentPricePoint.Builder(
"MSRP",
"per_unit",
PricingScheme.PER_UNIT,
Arrays.asList(
new Price.Builder(
PriceStartingQuantity.fromNumber(
Expand All @@ -1121,7 +1121,7 @@ CreateComponentPricePointsRequest body = new CreateComponentPricePointsRequest.B
CreateComponentPricePointsRequestPricePoints.fromCreateComponentPricePoint(
new CreateComponentPricePoint.Builder(
"Special Pricing",
"per_unit",
PricingScheme.PER_UNIT,
Arrays.asList(
new Price.Builder(
PriceStartingQuantity.fromNumber(
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/events-based-billing-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ String componentId = "component_id8";
String pricePointId = "price_point_id8";
CreateSegmentRequest body = new CreateSegmentRequest.Builder(
new CreateSegment.Builder(
"volume"
PricingScheme.VOLUME
)
.segmentProperty1Value(CreateSegmentSegmentProperty1Value.fromString(
"France"
Expand Down
1 change: 1 addition & 0 deletions doc/controllers/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ Exposed event types are:
+ failed_payment
+ apply_debit_note
+ create_debit_note
+ change_chargeback_status

Invoice events are returned in ascending order.

Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/subscription-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ try {
"component_id": 0,
"subscription_id": 0,
"allocated_quantity": 0,
"pricing_scheme": "string",
"pricing_scheme": "per_unit",
"name": "string",
"kind": "string",
"unit_name": "string",
Expand Down
14 changes: 12 additions & 2 deletions doc/controllers/subscription-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,9 @@ try {
"taxable_amount_in_cents": 0,
"product_id": 1,
"product_handle": "gold-product",
"product_name": "Gold Product"
"product_name": "Gold Product",
"period_range_start": "01/10/2024",
"period_range_end": "02/10/2024"
},
{
"transaction_type": "charge",
Expand All @@ -1450,10 +1452,18 @@ try {
"taxable_amount_in_cents": 0,
"component_id": 104,
"component_handle": "quantity-component",
"component_name": "Quantity Component"
"component_name": "Quantity Component",
"period_range_start": "01/10/2024",
"period_range_end": "02/10/2024"
}
]
}
}
```

## Errors

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) |

2 changes: 1 addition & 1 deletion doc/models/bulk-create-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"segment_property_2_value": "String5",
"segment_property_3_value": "String3",
"segment_property_4_value": "String7",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "stairstep",
"prices": [
{
"starting_quantity": 64,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/bulk-update-segments-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `int` | Required | The ID of the segment you want to update. | int getId() | setId(int id) |
| `PricingScheme` | `String` | Required | The handle for the pricing scheme. Available options: per_unit, volume, tiered, stairstep. See [Price Bracket Rules](https://help.chargify.com/products/product-components.html#price-bracket-rules) for an overview of pricing schemes. | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<CreateOrUpdateSegmentPrice>`](../../doc/models/create-or-update-segment-price.md) | Required | - | List<CreateOrUpdateSegmentPrice> getPrices() | setPrices(List<CreateOrUpdateSegmentPrice> prices) |

## Example (as JSON)

```json
{
"id": 180,
"pricing_scheme": "pricing_scheme0",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 64,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/bulk-update-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"segments": [
{
"id": 50,
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "stairstep",
"prices": [
{
"starting_quantity": 64,
Expand All @@ -39,7 +39,7 @@
},
{
"id": 50,
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "stairstep",
"prices": [
{
"starting_quantity": 64,
Expand Down
2 changes: 1 addition & 1 deletion doc/models/component-custom-price.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Create or update custom pricing unique to the subscription. Used in place of `pr

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `PricingScheme` | [`PricingScheme1`](../../doc/models/pricing-scheme-1.md) | Optional | Omit for On/Off components | PricingScheme1 getPricingScheme() | setPricingScheme(PricingScheme1 pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | Omit for On/Off components | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<Price>`](../../doc/models/price.md) | Optional | On/off components only need one price bracket starting at 1 | List<Price> getPrices() | setPrices(List<Price> prices) |

## Example (as JSON)
Expand Down
4 changes: 2 additions & 2 deletions doc/models/component-price-point-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| --- | --- | --- | --- | --- | --- |
| `Name` | `String` | Optional | - | String getName() | setName(String name) |
| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) |
| `PricingScheme` | `String` | Optional | - | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<Price>`](../../doc/models/price.md) | Optional | - | List<Price> getPrices() | setPrices(List<Price> prices) |

## Example (as JSON)
Expand All @@ -20,7 +20,7 @@
{
"name": "name6",
"handle": "handle2",
"pricing_scheme": "pricing_scheme2",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand Down
2 changes: 1 addition & 1 deletion doc/models/component-price-point-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"type": "default",
"default": false,
"name": "name0",
"pricing_scheme": "pricing_scheme8"
"pricing_scheme": "per_unit"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions doc/models/component-price-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| `Type` | [`PricePointType`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:<br><br>1. **default**: a price point that is marked as a default price for a certain product.<br>2. **custom**: a custom price point.<br>3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | PricePointType getType() | setType(PricePointType type) |
| `Default` | `Boolean` | Optional | Note: Refer to type attribute instead | Boolean getDefault() | setDefault(Boolean mDefault) |
| `Name` | `String` | Optional | - | String getName() | setName(String name) |
| `PricingScheme` | `String` | Optional | - | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `ComponentId` | `Integer` | Optional | - | Integer getComponentId() | setComponentId(Integer componentId) |
| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) |
| `ArchivedAt` | `String` | Optional | - | String getArchivedAt() | setArchivedAt(String archivedAt) |
Expand All @@ -33,7 +33,7 @@
"type": "custom",
"default": false,
"name": "name2",
"pricing_scheme": "pricing_scheme6"
"pricing_scheme": "stairstep"
}
```

4 changes: 2 additions & 2 deletions doc/models/component-price-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"type": "default",
"default": false,
"name": "name2",
"pricing_scheme": "pricing_scheme4"
"pricing_scheme": "per_unit"
},
{
"id": 40,
"type": "default",
"default": false,
"name": "name2",
"pricing_scheme": "pricing_scheme4"
"pricing_scheme": "per_unit"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/component-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"id": 80,
"name": "name8",
"handle": "handle4",
"pricing_scheme": "pricing_scheme0",
"pricing_scheme": "tiered",
"unit_name": "unit_name0"
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/models/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| `Id` | `Integer` | Optional | The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API. | Integer getId() | setId(Integer id) |
| `Name` | `String` | Optional | The name of the Component, suitable for display on statements. i.e. Text Messages. | String getName() | setName(String name) |
| `Handle` | `String` | Optional | The component API handle | String getHandle() | setHandle(String handle) |
| `PricingScheme` | `String` | Optional | The handle for the pricing scheme. Available options: per_unit, volume, tiered, stairstep. See [Price Bracket Rules](https://chargify.zendesk.com/hc/en-us/articles/4407755865883#price-bracket-rules) for an overview of pricing schemes. | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`ComponentPricingScheme`](../../doc/models/containers/component-pricing-scheme.md) | Optional | This is a container for one-of cases. | ComponentPricingScheme getPricingScheme() | setPricingScheme(ComponentPricingScheme pricingScheme) |
| `UnitName` | `String` | Optional | The name of the unit that the component’s usage is measured in. i.e. message | String getUnitName() | setUnitName(String unitName) |
| `UnitPrice` | `String` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | String getUnitPrice() | setUnitPrice(String unitPrice) |
| `ProductFamilyId` | `Integer` | Optional | The id of the Product Family to which the Component belongs | Integer getProductFamilyId() | setProductFamilyId(Integer productFamilyId) |
Expand Down Expand Up @@ -49,7 +49,7 @@
"id": 24,
"name": "name2",
"handle": "handle8",
"pricing_scheme": "pricing_scheme6",
"pricing_scheme": "tiered",
"unit_name": "unit_name4"
}
```
Expand Down
13 changes: 13 additions & 0 deletions doc/models/containers/component-pricing-scheme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Component Pricing Scheme

## Class Name

`ComponentPricingScheme`

## Cases

| Type | Factory Method |
| --- | --- |
| [`PricingScheme`](../../../doc/models/pricing-scheme.md) | ComponentPricingScheme.fromPricingScheme(PricingScheme pricingScheme) |

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

# Subscription Component Pricing Scheme

## Class Name

`SubscriptionComponentPricingScheme`

## Cases

| Type | Factory Method |
| --- | --- |
| [`PricingScheme`](../../../doc/models/pricing-scheme.md) | SubscriptionComponentPricingScheme.fromPricingScheme(PricingScheme pricingScheme) |

2 changes: 1 addition & 1 deletion doc/models/create-component-price-point-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"price_point": {
"name": "name0",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-component-price-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| --- | --- | --- | --- | --- | --- |
| `Name` | `String` | Required | - | String getName() | setName(String name) |
| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) |
| `PricingScheme` | `String` | Required | - | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<Price>`](../../doc/models/price.md) | Required | - | List<Price> getPrices() | setPrices(List<Price> prices) |
| `UseSiteExchangeRate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.<br>**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |

Expand All @@ -20,7 +20,7 @@
```json
{
"name": "name0",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-component-price-points-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"name": "name0",
"handle": "handle6",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand All @@ -42,7 +42,7 @@
{
"name": "name0",
"handle": "handle6",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand Down
1 change: 0 additions & 1 deletion doc/models/create-on-off-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"description": "description6",
"handle": "handle2",
"taxable": false,
"pricing_scheme": "stairstep",
"prices": [
{
"starting_quantity": 242,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-prepaid-usage-component-price-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| --- | --- | --- | --- | --- | --- |
| `Name` | `String` | Required | - | String getName() | setName(String name) |
| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) |
| `PricingScheme` | `String` | Required | - | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<Price>`](../../doc/models/price.md) | Required | - | List<Price> getPrices() | setPrices(List<Price> prices) |
| `OveragePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | OveragePricing getOveragePricing() | setOveragePricing(OveragePricing overagePricing) |
| `UseSiteExchangeRate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.<br>**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |
Expand All @@ -25,7 +25,7 @@
```json
{
"name": "name0",
"pricing_scheme": "pricing_scheme8",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 242,
Expand Down
2 changes: 1 addition & 1 deletion doc/models/create-segment-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"segment_property_2_value": "String3",
"segment_property_3_value": "String1",
"segment_property_4_value": "String5",
"pricing_scheme": "pricing_scheme4",
"pricing_scheme": "stairstep",
"prices": [
{
"starting_quantity": 64,
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| `SegmentProperty2Value` | [`CreateSegmentSegmentProperty2Value`](../../doc/models/containers/create-segment-segment-property-2-value.md) | Optional | This is a container for one-of cases. | CreateSegmentSegmentProperty2Value getSegmentProperty2Value() | setSegmentProperty2Value(CreateSegmentSegmentProperty2Value segmentProperty2Value) |
| `SegmentProperty3Value` | [`CreateSegmentSegmentProperty3Value`](../../doc/models/containers/create-segment-segment-property-3-value.md) | Optional | This is a container for one-of cases. | CreateSegmentSegmentProperty3Value getSegmentProperty3Value() | setSegmentProperty3Value(CreateSegmentSegmentProperty3Value segmentProperty3Value) |
| `SegmentProperty4Value` | [`CreateSegmentSegmentProperty4Value`](../../doc/models/containers/create-segment-segment-property-4-value.md) | Optional | This is a container for one-of cases. | CreateSegmentSegmentProperty4Value getSegmentProperty4Value() | setSegmentProperty4Value(CreateSegmentSegmentProperty4Value segmentProperty4Value) |
| `PricingScheme` | `String` | Required | The handle for the pricing scheme. Available options: per_unit, volume, tiered, stairstep. See [Price Bracket Rules](https://help.chargify.com/products/product-components.html#price-bracket-rules) for an overview of pricing schemes. | String getPricingScheme() | setPricingScheme(String pricingScheme) |
| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) |
| `Prices` | [`List<CreateOrUpdateSegmentPrice>`](../../doc/models/create-or-update-segment-price.md) | Optional | - | List<CreateOrUpdateSegmentPrice> getPrices() | setPrices(List<CreateOrUpdateSegmentPrice> prices) |

## Example (as JSON)
Expand All @@ -24,7 +24,7 @@
"segment_property_2_value": "String1",
"segment_property_3_value": "String3",
"segment_property_4_value": "String3",
"pricing_scheme": "pricing_scheme6",
"pricing_scheme": "per_unit",
"prices": [
{
"starting_quantity": 64,
Expand Down
1 change: 1 addition & 0 deletions doc/models/invoice-event-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Invoice Event Type
| `ChangeInvoiceCollectionMethod` |
| `RemovePayment` |
| `FailedPayment` |
| `ChangeChargebackStatus` |

2 changes: 1 addition & 1 deletion doc/models/invoice-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
```json
{
"id": 78,
"event_type": "apply_payment",
"event_type": "void_invoice",
"event_data": {
"uid": "uid2",
"credit_note_number": "credit_note_number4",
Expand Down
2 changes: 1 addition & 1 deletion doc/models/list-components-price-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"type": "default",
"default": false,
"name": "name2",
"pricing_scheme": "pricing_scheme4"
"pricing_scheme": "per_unit"
}
]
}
Expand Down
Loading