Skip to content

Commit

Permalink
Merge branch 'main' of github.com:maxio-com/ab-java-sdk into tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-nedza committed Nov 7, 2023
2 parents 5074b83 + 66b5bee commit 4c059cf
Show file tree
Hide file tree
Showing 194 changed files with 18,991 additions and 3,063 deletions.
45 changes: 24 additions & 21 deletions doc/controllers/api-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123

```java
List<ProformaInvoice> listExportedProformaInvoices(
final String batchId,
final Integer perPage,
final Integer page)
final ListExportedProformaInvoicesInput input)
```

## Parameters
Expand All @@ -49,12 +47,15 @@ List<ProformaInvoice> listExportedProformaInvoices(
## Example Usage

```java
String batchId = "batch_id8";
Integer perPage = 100;
Integer page = 2;
ListExportedProformaInvoicesInput listExportedProformaInvoicesInput = new ListExportedProformaInvoicesInput.Builder(
"batch_id8"
)
.perPage(100)
.page(2)
.build();

try {
List<ProformaInvoice> result = aPIExportsController.listExportedProformaInvoices(batchId, perPage, page);
List<ProformaInvoice> result = aPIExportsController.listExportedProformaInvoices(listExportedProformaInvoicesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand All @@ -78,9 +79,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per

```java
List<Invoice> listExportedInvoices(
final String batchId,
final Integer perPage,
final Integer page)
final ListExportedInvoicesInput input)
```

## Parameters
Expand All @@ -98,12 +97,15 @@ List<Invoice> listExportedInvoices(
## Example Usage

```java
String batchId = "batch_id8";
Integer perPage = 100;
Integer page = 2;
ListExportedInvoicesInput listExportedInvoicesInput = new ListExportedInvoicesInput.Builder(
"batch_id8"
)
.perPage(100)
.page(2)
.build();

try {
List<Invoice> result = aPIExportsController.listExportedInvoices(batchId, perPage, page);
List<Invoice> result = aPIExportsController.listExportedInvoices(listExportedInvoicesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand All @@ -127,9 +129,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/row

```java
List<Subscription> listExportedSubscriptions(
final String batchId,
final Integer perPage,
final Integer page)
final ListExportedSubscriptionsInput input)
```

## Parameters
Expand All @@ -147,12 +147,15 @@ List<Subscription> listExportedSubscriptions(
## Example Usage

```java
String batchId = "batch_id8";
Integer perPage = 100;
Integer page = 2;
ListExportedSubscriptionsInput listExportedSubscriptionsInput = new ListExportedSubscriptionsInput.Builder(
"batch_id8"
)
.perPage(100)
.page(2)
.build();

try {
List<Subscription> result = aPIExportsController.listExportedSubscriptions(batchId, perPage, page);
List<Subscription> result = aPIExportsController.listExportedSubscriptions(listExportedSubscriptionsInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down
97 changes: 37 additions & 60 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,7 @@ This request will return a list of components for a site.

```java
List<ComponentResponse> listComponents(
final BasicDateField dateField,
final String startDate,
final String endDate,
final String startDatetime,
final String endDatetime,
final Boolean includeArchived,
final Integer page,
final Integer perPage,
final List<String> filterIds,
final Boolean filterUseSiteExchangeRate)
final ListComponentsInput input)
```

## Parameters
Expand All @@ -480,12 +471,14 @@ List<ComponentResponse> listComponents(
## Example Usage

```java
BasicDateField dateField = BasicDateField.UPDATED_AT;
Integer page = 2;
Integer perPage = 50;
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')
ListComponentsInput listComponentsInput = new ListComponentsInput.Builder()
.dateField(BasicDateField.UPDATED_AT)
.page(2)
.perPage(50)
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build();

try {
List<ComponentResponse> result = componentsController.listComponents(dateField, null, null, null, null, null, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'));
List<ComponentResponse> result = componentsController.listComponents(listComponentsInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -682,17 +675,7 @@ This request will return a list of components for a particular product family.

```java
List<ComponentResponse> listComponentsForProductFamily(
final int productFamilyId,
final Boolean includeArchived,
final List<Integer> filterIds,
final Integer page,
final Integer perPage,
final BasicDateField dateField,
final String endDate,
final String endDatetime,
final String startDate,
final String startDatetime,
final Boolean filterUseSiteExchangeRate)
final ListComponentsForProductFamilyInput input)
```

## Parameters
Expand All @@ -718,13 +701,16 @@ List<ComponentResponse> listComponentsForProductFamily(
## Example Usage

```java
int productFamilyId = 140;
Liquid error: Value cannot be null. (Parameter 'key')Integer page = 2;
Integer perPage = 50;
BasicDateField dateField = BasicDateField.UPDATED_AT;
Liquid error: Value cannot be null. (Parameter 'key')
ListComponentsForProductFamilyInput listComponentsForProductFamilyInput = new ListComponentsForProductFamilyInput.Builder(
140
)
Liquid error: Value cannot be null. (Parameter 'key').page(2)
.perPage(50)
.dateField(BasicDateField.UPDATED_AT)
Liquid error: Value cannot be null. (Parameter 'key').build();

try {
List<ComponentResponse> result = componentsController.listComponentsForProductFamily(productFamilyId, null, Liquid error: Value cannot be null. (Parameter 'key'), page, perPage, dateField, null, null, null, null, Liquid error: Value cannot be null. (Parameter 'key'));
List<ComponentResponse> result = componentsController.listComponentsForProductFamily(listComponentsForProductFamilyInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -913,11 +899,7 @@ If the price point is set to `use_site_exchange_rate: true`, it will return pric

```java
ComponentPricePointsResponse listComponentPricePoints(
final int componentId,
final Boolean currencyPrices,
final Integer page,
final Integer perPage,
final List<PricePointType> filterType)
final ListComponentPricePointsInput input)
```

## Parameters
Expand All @@ -937,11 +919,15 @@ ComponentPricePointsResponse listComponentPricePoints(
## Example Usage

```java
int componentId = 222;
Integer page = 2;
Integer perPage = 50;
Liquid error: Value cannot be null. (Parameter 'key')try {
ComponentPricePointsResponse result = componentsController.listComponentPricePoints(componentId, null, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'));
ListComponentPricePointsInput listComponentPricePointsInput = new ListComponentPricePointsInput.Builder(
222
)
.page(2)
.perPage(50)
Liquid error: Value cannot be null. (Parameter 'key').build();

try {
ComponentPricePointsResponse result = componentsController.listComponentPricePoints(listComponentPricePointsInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -1474,18 +1460,7 @@ This method allows to retrieve a list of Components Price Points belonging to a

```java
ListComponentsPricePointsResponse listAllComponentPricePoints(
final BasicDateField filterDateField,
final String filterEndDate,
final String filterEndDatetime,
final ListComponentsPricePointsInclude include,
final Integer page,
final Integer perPage,
final String filterStartDate,
final String filterStartDatetime,
final PricePointType filterType,
final ListAllComponentPricePointsDirection direction,
final List<Integer> filterIds,
final IncludeNotNull filterArchivedAt)
final ListAllComponentPricePointsInput input)
```

## Parameters
Expand All @@ -1501,7 +1476,7 @@ ListComponentsPricePointsResponse listAllComponentPricePoints(
| `filterStartDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. |
| `filterStartDatetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points 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. |
| `filterType` | [`PricePointType`](../../doc/models/price-point-type.md) | Query, Optional | Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. |
| `direction` | [`ListAllComponentPricePointsDirection`](../../doc/models/containers/list-all-component-price-points-direction.md) | Query, Optional | This is a container for one-of cases. |
| `direction` | [`ListAllComponentPricePointsInputDirection`](../../doc/models/containers/list-all-component-price-points-input-direction.md) | Query, Optional | This is a container for one-of cases. |
| `filterIds` | `List<Integer>` | Query, Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. |
| `filterArchivedAt` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. |

Expand All @@ -1512,12 +1487,14 @@ ListComponentsPricePointsResponse listAllComponentPricePoints(
## Example Usage

```java
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')ListComponentsPricePointsInclude include = ListComponentsPricePointsInclude.CURRENCY_PRICES;
Integer page = 2;
Integer perPage = 50;
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')
ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllComponentPricePointsInput.Builder()
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .include(ListComponentsPricePointsInclude.CURRENCY_PRICES)
.page(2)
.perPage(50)
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build();

try {
ListComponentsPricePointsResponse result = componentsController.listAllComponentPricePoints(Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), include, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), null, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'));
ListComponentsPricePointsResponse result = componentsController.listAllComponentPricePoints(listAllComponentPricePointsInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down
74 changes: 27 additions & 47 deletions doc/controllers/coupons.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,7 @@ If the coupon is set to `use_site_exchange_rate: true`, it will return pricing b

```java
List<CouponResponse> listCouponsForProductFamily(
final int productFamilyId,
final Integer page,
final Integer perPage,
final BasicDateField filterDateField,
final String filterEndDate,
final String filterEndDatetime,
final String filterStartDate,
final String filterStartDatetime,
final List<Integer> filterIds,
final List<String> filterCodes,
final Boolean currencyPrices,
final Boolean filterUseSiteExchangeRate)
final ListCouponsForProductFamilyInput input)
```

## Parameters
Expand All @@ -159,13 +148,16 @@ List<CouponResponse> listCouponsForProductFamily(
## Example Usage

```java
int productFamilyId = 140;
Integer page = 2;
Integer perPage = 50;
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Boolean currencyPrices = true;
Liquid error: Value cannot be null. (Parameter 'key')
ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCouponsForProductFamilyInput.Builder(
140
)
.page(2)
.perPage(50)
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').currencyPrices(true)
Liquid error: Value cannot be null. (Parameter 'key').build();

try {
List<CouponResponse> result = couponsController.listCouponsForProductFamily(productFamilyId, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), currencyPrices, Liquid error: Value cannot be null. (Parameter 'key'));
List<CouponResponse> result = couponsController.listCouponsForProductFamily(listCouponsForProductFamilyInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -560,22 +552,7 @@ If the coupon is set to `use_site_exchange_rate: true`, it will return pricing b

```java
List<CouponResponse> listCoupons(
final Integer page,
final Integer perPage,
final BasicDateField dateField,
final String startDate,
final String endDate,
final String startDatetime,
final String endDatetime,
final List<Integer> filterIds,
final List<String> filterCodes,
final Boolean currencyPrices,
final String filterEndDate,
final String filterEndDatetime,
final String filterStartDate,
final String filterStartDatetime,
final BasicDateField filterDateField,
final Boolean filterUseSiteExchangeRate)
final ListCouponsInput input)
```

## Parameters
Expand Down Expand Up @@ -606,13 +583,15 @@ List<CouponResponse> listCoupons(
## Example Usage

```java
Integer page = 2;
Integer perPage = 50;
BasicDateField dateField = BasicDateField.UPDATED_AT;
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Boolean currencyPrices = true;
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')
ListCouponsInput listCouponsInput = new ListCouponsInput.Builder()
.page(2)
.perPage(50)
.dateField(BasicDateField.UPDATED_AT)
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .currencyPrices(true)
Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build();

try {
List<CouponResponse> result = couponsController.listCoupons(page, perPage, dateField, null, null, null, null, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), currencyPrices, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'));
List<CouponResponse> result = couponsController.listCoupons(listCouponsInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -992,9 +971,7 @@ This request allows you to request the subcodes that are attached to a coupon.

```java
CouponSubcodes listCouponSubcodes(
final int couponId,
final Integer page,
final Integer perPage)
final ListCouponSubcodesInput input)
```

## Parameters
Expand All @@ -1012,12 +989,15 @@ CouponSubcodes listCouponSubcodes(
## Example Usage

```java
int couponId = 162;
Integer page = 2;
Integer perPage = 50;
ListCouponSubcodesInput listCouponSubcodesInput = new ListCouponSubcodesInput.Builder(
162
)
.page(2)
.perPage(50)
.build();

try {
CouponSubcodes result = couponsController.listCouponSubcodes(couponId, page, perPage);
CouponSubcodes result = couponsController.listCouponSubcodes(listCouponSubcodesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down
Loading

0 comments on commit 4c059cf

Please sign in to comment.