diff --git a/README.md b/README.md
index b0521cf7..a1171725 100644
--- a/README.md
+++ b/README.md
@@ -293,8 +293,7 @@ The following parameters are configurable for the API Client:
| `domain` | `String` | The Chargify server domain.
*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/doc/http-client-configuration.md) | Http Client Configuration instance. |
-| `basicAuthUserName` | `String` | The username to use with basic authentication |
-| `basicAuthPassword` | `String` | The password to use with basic authentication |
+| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/basic-authentication.md) | The Credentials Setter for Basic Authentication |
The API client can be initialized as follows:
@@ -302,7 +301,11 @@ The API client can be initialized as follows:
AdvancedBillingClient client = new AdvancedBillingClient.Builder()
.httpClientConfig(configBuilder -> configBuilder
.timeout(0))
- .basicAuthCredentials("BasicAuthUserName", "BasicAuthPassword")
+ .basicAuthCredentials(new BasicAuthModel.Builder(
+ "BasicAuthUserName",
+ "BasicAuthPassword"
+ )
+ .build())
.environment(Environment.PRODUCTION)
.subdomain("subdomain")
.domain("chargify.com")
@@ -322,7 +325,9 @@ The SDK can be configured to use a different environment for making API calls. A
## Authorization
-This API uses `Basic Authentication`.
+This API uses the following authentication schemes.
+
+* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/basic-authentication.md)
## List of APIs
diff --git a/doc/auth/basic-authentication.md b/doc/auth/basic-authentication.md
new file mode 100644
index 00000000..0dc3d4a0
--- /dev/null
+++ b/doc/auth/basic-authentication.md
@@ -0,0 +1,35 @@
+
+# Basic Authentication
+
+
+
+Documentation for accessing and setting credentials for BasicAuth.
+
+## Auth Credentials
+
+| Name | Type | Description | Setter | Getter |
+| --- | --- | --- | --- | --- |
+| BasicAuthUserName | `String` | The username to use with basic authentication | `username` | `getBasicAuthUserName()` |
+| BasicAuthPassword | `String` | The password to use with basic authentication | `password` | `getBasicAuthPassword()` |
+
+
+
+**Note:** Auth credentials can be set using `basicAuthCredentials` in the client builder and accessed through `getBasicAuthCredentials` method in the client instance.
+
+## Usage Example
+
+### Client Initialization
+
+You must provide credentials in the client as shown in the following code snippet.
+
+```java
+AdvancedBillingClient client = new AdvancedBillingClient.Builder()
+ .basicAuthCredentials(new BasicAuthModel.Builder(
+ "BasicAuthUserName",
+ "BasicAuthPassword"
+ )
+ .build())
+ .build();
+```
+
+
diff --git a/doc/client.md b/doc/client.md
index f133a76f..952d14bc 100644
--- a/doc/client.md
+++ b/doc/client.md
@@ -9,8 +9,7 @@ The following parameters are configurable for the API Client:
| `domain` | `String` | The Chargify server domain.
*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. |
-| `basicAuthUserName` | `String` | The username to use with basic authentication |
-| `basicAuthPassword` | `String` | The password to use with basic authentication |
+| `basicAuthCredentials` | [`BasicAuthCredentials`]($a/basic-authentication.md) | The Credentials Setter for Basic Authentication |
The API client can be initialized as follows:
@@ -18,7 +17,11 @@ The API client can be initialized as follows:
AdvancedBillingClient client = new AdvancedBillingClient.Builder()
.httpClientConfig(configBuilder -> configBuilder
.timeout(0))
- .basicAuthCredentials("BasicAuthUserName", "BasicAuthPassword")
+ .basicAuthCredentials(new BasicAuthModel.Builder(
+ "BasicAuthUserName",
+ "BasicAuthPassword"
+ )
+ .build())
.environment(Environment.PRODUCTION)
.subdomain("subdomain")
.domain("chargify.com")
@@ -75,6 +78,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
| `getDomain()` | The Chargify server domain. | `String` |
| `getHttpClient()` | The HTTP Client instance to use for making HTTP requests. | `HttpClient` |
| `getHttpClientConfig()` | Http Client Configuration instance. | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) |
+| `getBasicAuthCredentials()` | The credentials to use with BasicAuth. | [`BasicAuthCredentials`]($a/basic-authentication.md) |
| `getBaseUri(Server server)` | Get base URI by current environment | `String` |
| `getBaseUri()` | Get base URI by current environment | `String` |
diff --git a/doc/configuration-interface.md b/doc/configuration-interface.md
index ade67df6..5d05edb8 100644
--- a/doc/configuration-interface.md
+++ b/doc/configuration-interface.md
@@ -1,7 +1,7 @@
# Configuration Interface
-This is the base class for all exceptions that represent an error response from the server.
+This is the interface for client class that holds the configuration getters.
## Methods
diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md
index d2a9c4ed..7bb9f2d4 100644
--- a/doc/controllers/invoices.md
+++ b/doc/controllers/invoices.md
@@ -1913,7 +1913,7 @@ Excess payment will result in the creation of a prepayment on the Invoice Accoun
Only ungrouped or primary subscriptions may be paid using the "bulk" payment request.
```java
-PaymentResponse recordPaymentForSubscription(
+RecordPaymentResponse recordPaymentForSubscription(
final int subscriptionId,
final RecordPaymentRequest body)
```
@@ -1927,7 +1927,7 @@ PaymentResponse recordPaymentForSubscription(
## Response Type
-[`PaymentResponse`](../../doc/models/payment-response.md)
+[`RecordPaymentResponse`](../../doc/models/record-payment-response.md)
## Example Usage
@@ -1938,14 +1938,14 @@ RecordPaymentRequest body = new RecordPaymentRequest.Builder(
"10.0",
"to pay the bills",
"check number 8675309",
- "check"
+ InvoicePaymentMethodType.CHECK
)
.build()
)
.build();
try {
- PaymentResponse result = invoicesController.recordPaymentForSubscription(subscriptionId, body);
+ RecordPaymentResponse result = invoicesController.recordPaymentForSubscription(subscriptionId, body);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
@@ -1960,23 +1960,19 @@ try {
{
"paid_invoices": [
{
- "invoice_uid": "xyz_012345678",
+ "invoice_id": "inv_bchyhr6z5grby",
"status": "paid",
"due_amount": "0.0",
"paid_amount": "50.0"
},
{
- "invoice_uid": "xyz_012345678",
+ "invoice_id": "inv_bchyhrgvyb6vm",
"status": "paid",
"due_amount": "0.0",
"paid_amount": "50.0"
}
],
- "prepayment": {
- "subscription_id": "123456",
- "amount_in_cents": "5000",
- "ending_balance_in_cents": "5000"
- }
+ "prepayment": null
}
```
diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md
index 3f68e370..4dada6d6 100644
--- a/doc/controllers/proforma-invoices.md
+++ b/doc/controllers/proforma-invoices.md
@@ -120,14 +120,14 @@ Proforma invoices are only available on Relationship Invoicing sites.
```java
ProformaInvoice readProformaInvoice(
- final int proformaInvoiceUid)
+ final String proformaInvoiceUid)
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `proformaInvoiceUid` | `int` | Template, Required | The uid of the proforma invoice |
+| `proformaInvoiceUid` | `String` | Template, Required | The uid of the proforma invoice |
## Response Type
@@ -136,7 +136,7 @@ ProformaInvoice readProformaInvoice(
## Example Usage
```java
-int proformaInvoiceUid = 242;
+String proformaInvoiceUid = "proforma_invoice_uid4";
try {
ProformaInvoice result = proformaInvoicesController.readProformaInvoice(proformaInvoiceUid);
@@ -207,7 +207,7 @@ try {
By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`.
```java
-List listProformaInvoices(
+ListProformaInvoicesResponse listProformaInvoices(
final ListProformaInvoicesInput input)
```
@@ -231,7 +231,7 @@ List listProformaInvoices(
## Response Type
-[`List`](../../doc/models/proforma-invoice.md)
+[`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md)
## Example Usage
@@ -251,7 +251,7 @@ ListProformaInvoicesInput listProformaInvoicesInput = new ListProformaInvoicesIn
.build();
try {
- List result = proformaInvoicesController.listProformaInvoices(listProformaInvoicesInput);
+ ListProformaInvoicesResponse result = proformaInvoicesController.listProformaInvoices(listProformaInvoicesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md
index cd273dc1..44531368 100644
--- a/doc/controllers/subscription-invoice-account.md
+++ b/doc/controllers/subscription-invoice-account.md
@@ -89,7 +89,7 @@ CreatePrepaymentRequest body = new CreatePrepaymentRequest.Builder(
100D,
"John Doe signup for $100",
"Signup for $100",
- PrepaymentMethod.CHECK
+ CreatePrepaymentMethod.CHECK
)
.build()
)
diff --git a/doc/models/containers/record-payment-response-prepayment.md b/doc/models/containers/record-payment-response-prepayment.md
new file mode 100644
index 00000000..546d61f1
--- /dev/null
+++ b/doc/models/containers/record-payment-response-prepayment.md
@@ -0,0 +1,13 @@
+
+# Record Payment Response Prepayment
+
+## Class Name
+
+`RecordPaymentResponsePrepayment`
+
+## Cases
+
+| Type | Factory Method |
+| --- | --- |
+| [`InvoicePrePayment`](../../../doc/models/invoice-pre-payment.md) | RecordPaymentResponsePrepayment.fromInvoicePrePayment(InvoicePrePayment invoicePrePayment) |
+
diff --git a/doc/models/create-or-update-product-request.md b/doc/models/create-or-update-product-request.md
index aa7ad564..c61d350a 100644
--- a/doc/models/create-or-update-product-request.md
+++ b/doc/models/create-or-update-product-request.md
@@ -24,8 +24,8 @@
"price_in_cents": 54,
"interval": 186,
"interval_unit": "day",
- "auto_create_signup_page": false,
- "tax_code": "tax_code8"
+ "trial_price_in_cents": 34,
+ "trial_interval": 88
}
}
```
diff --git a/doc/models/create-or-update-product.md b/doc/models/create-or-update-product.md
index d19b70a4..9635ee37 100644
--- a/doc/models/create-or-update-product.md
+++ b/doc/models/create-or-update-product.md
@@ -17,6 +17,12 @@
| `PriceInCents` | `long` | Required | The product price, in integer cents | long getPriceInCents() | setPriceInCents(long priceInCents) |
| `Interval` | `int` | Required | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days | int getInterval() | setInterval(int interval) |
| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | A string representing the interval unit for this product, either month or day | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) |
+| `TrialPriceInCents` | `Long` | Optional | The product trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
+| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
+| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
+| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
+| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
+| `ExpirationIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month or day | IntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(IntervalUnit expirationIntervalUnit) |
| `AutoCreateSignupPage` | `Boolean` | Optional | - | Boolean getAutoCreateSignupPage() | setAutoCreateSignupPage(Boolean autoCreateSignupPage) |
| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
**Constraints**: *Maximum Length*: `10` | String getTaxCode() | setTaxCode(String taxCode) |
@@ -32,8 +38,8 @@
"price_in_cents": 190,
"interval": 174,
"interval_unit": "day",
- "auto_create_signup_page": false,
- "tax_code": "tax_code6"
+ "trial_price_in_cents": 22,
+ "trial_interval": 76
}
```
diff --git a/doc/models/create-payment.md b/doc/models/create-payment.md
index 3808f6fd..7b678716 100644
--- a/doc/models/create-payment.md
+++ b/doc/models/create-payment.md
@@ -12,7 +12,7 @@
| `Amount` | `String` | Required | - | String getAmount() | setAmount(String amount) |
| `Memo` | `String` | Required | - | String getMemo() | setMemo(String memo) |
| `PaymentDetails` | `String` | Required | - | String getPaymentDetails() | setPaymentDetails(String paymentDetails) |
-| `PaymentMethod` | `String` | Required | - | String getPaymentMethod() | setPaymentMethod(String paymentMethod) |
+| `PaymentMethod` | [`InvoicePaymentMethodType`](../../doc/models/invoice-payment-method-type.md) | Required | The type of payment method used. Defaults to other. | InvoicePaymentMethodType getPaymentMethod() | setPaymentMethod(InvoicePaymentMethodType paymentMethod) |
## Example (as JSON)
@@ -21,7 +21,7 @@
"amount": "amount6",
"memo": "memo8",
"payment_details": "payment_details4",
- "payment_method": "payment_method6"
+ "payment_method": "cash"
}
```
diff --git a/doc/models/create-prepayment-method.md b/doc/models/create-prepayment-method.md
new file mode 100644
index 00000000..2f15e906
--- /dev/null
+++ b/doc/models/create-prepayment-method.md
@@ -0,0 +1,22 @@
+
+# Create Prepayment Method
+
+:- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
+
+## Enumeration
+
+`CreatePrepaymentMethod`
+
+## Fields
+
+| Name |
+| --- |
+| `Check` |
+| `Cash` |
+| `MoneyOrder` |
+| `Ach` |
+| `PaypalAccount` |
+| `CreditCard` |
+| `CreditCardOnFile` |
+| `Other` |
+
diff --git a/doc/models/create-prepayment-request.md b/doc/models/create-prepayment-request.md
index 8dc2943c..5bfcb6c9 100644
--- a/doc/models/create-prepayment-request.md
+++ b/doc/models/create-prepayment-request.md
@@ -19,7 +19,7 @@
"amount": 11.6,
"details": "details8",
"memo": "memo2",
- "method": "cash",
+ "method": "money_order",
"payment_profile_id": 240
}
}
diff --git a/doc/models/create-prepayment.md b/doc/models/create-prepayment.md
index 9196d58e..31e25660 100644
--- a/doc/models/create-prepayment.md
+++ b/doc/models/create-prepayment.md
@@ -12,7 +12,7 @@
| `Amount` | `double` | Required | - | double getAmount() | setAmount(double amount) |
| `Details` | `String` | Required | - | String getDetails() | setDetails(String details) |
| `Memo` | `String` | Required | - | String getMemo() | setMemo(String memo) |
-| `Method` | [`PrepaymentMethod`](../../doc/models/prepayment-method.md) | Required | :- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. | PrepaymentMethod getMethod() | setMethod(PrepaymentMethod method) |
+| `Method` | [`CreatePrepaymentMethod`](../../doc/models/create-prepayment-method.md) | Required | :- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. | CreatePrepaymentMethod getMethod() | setMethod(CreatePrepaymentMethod method) |
| `PaymentProfileId` | `Integer` | Optional | - | Integer getPaymentProfileId() | setPaymentProfileId(Integer paymentProfileId) |
## Example (as JSON)
@@ -22,7 +22,7 @@
"amount": 23.92,
"details": "details6",
"memo": "memo0",
- "method": "paypal_account",
+ "method": "credit_card_on_file",
"payment_profile_id": 240
}
```
diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md
index 5e017506..5834490c 100644
--- a/doc/models/create-product-price-point.md
+++ b/doc/models/create-product-price-point.md
@@ -15,12 +15,12 @@
| `Interval` | `int` | Required | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days | int getInterval() | setInterval(int interval) |
| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | A string representing the interval unit for this product price point, either month or day | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) |
| `TrialPriceInCents` | `Long` | Optional | The product price point trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
-| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with an trial_interval_unit of day would mean this product price point would renew every 30 days | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
+| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
| `InitialChargeInCents` | `Long` | Optional | The product price point initial charge, in integer cents | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) |
| `InitialChargeAfterTrial` | `Boolean` | Optional | - | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) |
-| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire every 30 days | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
+| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
| `ExpirationIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month or day | IntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(IntervalUnit expirationIntervalUnit) |
| `UseSiteExchangeRate` | `Boolean` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |
diff --git a/doc/models/invoice-pre-payment.md b/doc/models/invoice-pre-payment.md
index 60e0c808..7cea90f3 100644
--- a/doc/models/invoice-pre-payment.md
+++ b/doc/models/invoice-pre-payment.md
@@ -9,17 +9,17 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `SubscriptionId` | `String` | Optional | The subscription id for the prepayment account | String getSubscriptionId() | setSubscriptionId(String subscriptionId) |
-| `AmountInCents` | `String` | Optional | The amount in cents of the prepayment that was created as a result of this payment. | String getAmountInCents() | setAmountInCents(String amountInCents) |
-| `EndingBalanceInCents` | `String` | Optional | The total balance of the prepayment account for this subscription including any prior prepayments | String getEndingBalanceInCents() | setEndingBalanceInCents(String endingBalanceInCents) |
+| `SubscriptionId` | `Integer` | Optional | The subscription id for the prepayment account | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) |
+| `AmountInCents` | `Long` | Optional | The amount in cents of the prepayment that was created as a result of this payment. | Long getAmountInCents() | setAmountInCents(Long amountInCents) |
+| `EndingBalanceInCents` | `Long` | Optional | The total balance of the prepayment account for this subscription including any prior prepayments | Long getEndingBalanceInCents() | setEndingBalanceInCents(Long endingBalanceInCents) |
## Example (as JSON)
```json
{
- "subscription_id": "subscription_id0",
- "amount_in_cents": "amount_in_cents2",
- "ending_balance_in_cents": "ending_balance_in_cents4"
+ "subscription_id": 180,
+ "amount_in_cents": 100,
+ "ending_balance_in_cents": 60
}
```
diff --git a/doc/models/list-proforma-invoices-meta.md b/doc/models/list-proforma-invoices-meta.md
new file mode 100644
index 00000000..69078d52
--- /dev/null
+++ b/doc/models/list-proforma-invoices-meta.md
@@ -0,0 +1,27 @@
+
+# List Proforma Invoices Meta
+
+## Structure
+
+`ListProformaInvoicesMeta`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `TotalCount` | `Integer` | Optional | - | Integer getTotalCount() | setTotalCount(Integer totalCount) |
+| `CurrentPage` | `Integer` | Optional | - | Integer getCurrentPage() | setCurrentPage(Integer currentPage) |
+| `TotalPages` | `Integer` | Optional | - | Integer getTotalPages() | setTotalPages(Integer totalPages) |
+| `StatusCode` | `Integer` | Optional | - | Integer getStatusCode() | setStatusCode(Integer statusCode) |
+
+## Example (as JSON)
+
+```json
+{
+ "total_count": 226,
+ "current_page": 202,
+ "total_pages": 214,
+ "status_code": 244
+}
+```
+
diff --git a/doc/models/list-proforma-invoices-response.md b/doc/models/list-proforma-invoices-response.md
new file mode 100644
index 00000000..a0c469a6
--- /dev/null
+++ b/doc/models/list-proforma-invoices-response.md
@@ -0,0 +1,50 @@
+
+# List Proforma Invoices Response
+
+## Structure
+
+`ListProformaInvoicesResponse`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `ProformaInvoices` | [`List`](../../doc/models/proforma-invoice.md) | Optional | - | List getProformaInvoices() | setProformaInvoices(List proformaInvoices) |
+| `Meta` | [`ListProformaInvoicesMeta`](../../doc/models/list-proforma-invoices-meta.md) | Optional | - | ListProformaInvoicesMeta getMeta() | setMeta(ListProformaInvoicesMeta meta) |
+
+## Example (as JSON)
+
+```json
+{
+ "proforma_invoices": [
+ {
+ "uid": "uid0",
+ "site_id": 140,
+ "customer_id": 252,
+ "subscription_id": 68,
+ "number": 56
+ },
+ {
+ "uid": "uid0",
+ "site_id": 140,
+ "customer_id": 252,
+ "subscription_id": 68,
+ "number": 56
+ },
+ {
+ "uid": "uid0",
+ "site_id": 140,
+ "customer_id": 252,
+ "subscription_id": 68,
+ "number": 56
+ }
+ ],
+ "meta": {
+ "total_count": 150,
+ "current_page": 126,
+ "total_pages": 138,
+ "status_code": 168
+ }
+}
+```
+
diff --git a/doc/models/list-subcription-group-prepayment-item.md b/doc/models/list-subcription-group-prepayment-item.md
index 55b867f1..9c1f3fde 100644
--- a/doc/models/list-subcription-group-prepayment-item.md
+++ b/doc/models/list-subcription-group-prepayment-item.md
@@ -16,7 +16,7 @@
| `Details` | `String` | Optional | - | String getDetails() | setDetails(String details) |
| `External` | `Boolean` | Optional | - | Boolean getExternal() | setExternal(Boolean external) |
| `Memo` | `String` | Optional | - | String getMemo() | setMemo(String memo) |
-| `PaymentType` | [`PrepaymentMethod`](../../doc/models/prepayment-method.md) | Optional | :- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. | PrepaymentMethod getPaymentType() | setPaymentType(PrepaymentMethod paymentType) |
+| `PaymentType` | [`PrepaymentMethod`](../../doc/models/prepayment-method.md) | Optional | - | PrepaymentMethod getPaymentType() | setPaymentType(PrepaymentMethod paymentType) |
| `CreatedAt` | `String` | Optional | - | String getCreatedAt() | setCreatedAt(String createdAt) |
## Example (as JSON)
diff --git a/doc/models/payment.md b/doc/models/paid-invoice.md
similarity index 73%
rename from doc/models/payment.md
rename to doc/models/paid-invoice.md
index dd13cdb0..325aa24b 100644
--- a/doc/models/payment.md
+++ b/doc/models/paid-invoice.md
@@ -1,15 +1,15 @@
-# Payment
+# Paid Invoice
## Structure
-`Payment`
+`PaidInvoice`
## Fields
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `InvoiceUid` | `String` | Optional | The uid of the paid invoice | String getInvoiceUid() | setInvoiceUid(String invoiceUid) |
+| `InvoiceId` | `String` | Optional | The uid of the paid invoice | String getInvoiceId() | setInvoiceId(String invoiceId) |
| `Status` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Optional | The current status of the invoice. See [Invoice Statuses](https://chargify.zendesk.com/hc/en-us/articles/4407737494171#line-item-breakdowns) for more. | InvoiceStatus getStatus() | setStatus(InvoiceStatus status) |
| `DueAmount` | `String` | Optional | The remaining due amount on the invoice | String getDueAmount() | setDueAmount(String dueAmount) |
| `PaidAmount` | `String` | Optional | The total amount paid on this invoice (including any prior payments) | String getPaidAmount() | setPaidAmount(String paidAmount) |
@@ -18,10 +18,10 @@
```json
{
- "invoice_uid": "invoice_uid8",
- "status": "voided",
- "due_amount": "due_amount0",
- "paid_amount": "paid_amount0"
+ "invoice_id": "invoice_id6",
+ "status": "draft",
+ "due_amount": "due_amount8",
+ "paid_amount": "paid_amount8"
}
```
diff --git a/doc/models/payment-response.md b/doc/models/payment-response.md
deleted file mode 100644
index 0459431c..00000000
--- a/doc/models/payment-response.md
+++ /dev/null
@@ -1,34 +0,0 @@
-
-# Payment Response
-
-## Structure
-
-`PaymentResponse`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `PaidInvoices` | [`List`](../../doc/models/payment.md) | Optional | - | List getPaidInvoices() | setPaidInvoices(List paidInvoices) |
-| `Prepayment` | [`InvoicePrePayment`](../../doc/models/invoice-pre-payment.md) | Optional | - | InvoicePrePayment getPrepayment() | setPrepayment(InvoicePrePayment prepayment) |
-
-## Example (as JSON)
-
-```json
-{
- "paid_invoices": [
- {
- "invoice_uid": "invoice_uid8",
- "status": "draft",
- "due_amount": "due_amount0",
- "paid_amount": "paid_amount0"
- }
- ],
- "prepayment": {
- "subscription_id": "subscription_id8",
- "amount_in_cents": "amount_in_cents6",
- "ending_balance_in_cents": "ending_balance_in_cents4"
- }
-}
-```
-
diff --git a/doc/models/prepayment-method.md b/doc/models/prepayment-method.md
index 4fbf8fb7..10b58a6e 100644
--- a/doc/models/prepayment-method.md
+++ b/doc/models/prepayment-method.md
@@ -1,8 +1,6 @@
# Prepayment Method
-:- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
-
## Enumeration
`PrepaymentMethod`
@@ -16,6 +14,6 @@
| `MoneyOrder` |
| `Ach` |
| `PaypalAccount` |
-| `CreditCardOnFile` |
+| `CreditCard` |
| `Other` |
diff --git a/doc/models/prepayment-response.md b/doc/models/prepayment-response.md
index f5573b44..9c5efe1d 100644
--- a/doc/models/prepayment-response.md
+++ b/doc/models/prepayment-response.md
@@ -24,7 +24,7 @@
"details": "details8",
"external": false,
"memo": "memo2",
- "payment_type": "credit_card_on_file",
+ "payment_type": "credit_card",
"created_at": "created_at6"
}
}
diff --git a/doc/models/product-price-point.md b/doc/models/product-price-point.md
index 5e06e4da..1a797140 100644
--- a/doc/models/product-price-point.md
+++ b/doc/models/product-price-point.md
@@ -16,13 +16,13 @@
| `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days | Integer getInterval() | setInterval(Integer interval) |
| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this product price point, either month or day | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) |
| `TrialPriceInCents` | `Long` | Optional | The product price point trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
-| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with an trial_interval_unit of day would mean this product price point would renew every 30 days | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
+| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
| `IntroductoryOffer` | `Boolean` | Optional | reserved for future use | Boolean getIntroductoryOffer() | setIntroductoryOffer(Boolean introductoryOffer) |
| `InitialChargeInCents` | `Long` | Optional | The product price point initial charge, in integer cents | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) |
| `InitialChargeAfterTrial` | `Boolean` | Optional | - | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) |
-| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire every 30 days | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
+| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
| `ExpirationIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month or day | IntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(IntervalUnit expirationIntervalUnit) |
| `ProductId` | `Integer` | Optional | The product id this price point belongs to | Integer getProductId() | setProductId(Integer productId) |
| `ArchivedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this price point was archived | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) |
diff --git a/doc/models/record-payment-request.md b/doc/models/record-payment-request.md
index f9a45cfc..c61de6fb 100644
--- a/doc/models/record-payment-request.md
+++ b/doc/models/record-payment-request.md
@@ -19,7 +19,7 @@
"amount": "amount8",
"memo": "memo0",
"payment_details": "payment_details6",
- "payment_method": "payment_method4"
+ "payment_method": "cash"
}
}
```
diff --git a/doc/models/record-payment-response.md b/doc/models/record-payment-response.md
new file mode 100644
index 00000000..678d3cc9
--- /dev/null
+++ b/doc/models/record-payment-response.md
@@ -0,0 +1,46 @@
+
+# Record Payment Response
+
+## Structure
+
+`RecordPaymentResponse`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `PaidInvoices` | [`List`](../../doc/models/paid-invoice.md) | Optional | - | List getPaidInvoices() | setPaidInvoices(List paidInvoices) |
+| `Prepayment` | [`RecordPaymentResponsePrepayment`](../../doc/models/containers/record-payment-response-prepayment.md) | Optional | This is a container for one-of cases. | RecordPaymentResponsePrepayment getPrepayment() | setPrepayment(RecordPaymentResponsePrepayment prepayment) |
+
+## Example (as JSON)
+
+```json
+{
+ "paid_invoices": [
+ {
+ "invoice_id": "invoice_id8",
+ "status": "draft",
+ "due_amount": "due_amount0",
+ "paid_amount": "paid_amount0"
+ },
+ {
+ "invoice_id": "invoice_id8",
+ "status": "draft",
+ "due_amount": "due_amount0",
+ "paid_amount": "paid_amount0"
+ },
+ {
+ "invoice_id": "invoice_id8",
+ "status": "draft",
+ "due_amount": "due_amount0",
+ "paid_amount": "paid_amount0"
+ }
+ ],
+ "prepayment": {
+ "subscription_id": 180,
+ "amount_in_cents": 100,
+ "ending_balance_in_cents": 60
+ }
+}
+```
+
diff --git a/pom.xml b/pom.xml
index db5f43f1..31e2eb00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,17 +46,17 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
io.apimatic
core-interfaces
- [0.1, 0.2)
+ [0.2, 0.3)
io.apimatic
core
- [0.4, 0.5)
+ [0.5, 0.6)
io.apimatic
okhttp-client-adapter
- [0.1, 0.2)
+ [0.2, 0.3)
@@ -129,6 +129,19 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
false
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
index 645cd4d8..fd7500c9 100644
--- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
+++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
@@ -6,6 +6,8 @@
package com.maxio.advancedbilling;
+import com.maxio.advancedbilling.authentication.BasicAuthManager;
+import com.maxio.advancedbilling.authentication.BasicAuthModel;
import com.maxio.advancedbilling.controllers.APIExportsController;
import com.maxio.advancedbilling.controllers.AdvanceInvoiceController;
import com.maxio.advancedbilling.controllers.BillingPortalController;
@@ -125,16 +127,19 @@ public final class AdvancedBillingClient implements Configuration {
*/
private BasicAuthManager basicAuthManager;
+ /**
+ * The instance of BasicAuthModel.
+ */
+ private BasicAuthModel basicAuthModel;
+
/**
* Map of authentication Managers.
*/
private Map authentications;
-
private AdvancedBillingClient(Environment environment, String subdomain, String domain,
HttpClient httpClient, ReadonlyHttpClientConfiguration httpClientConfig,
- String basicAuthUserName, String basicAuthPassword,
- Map authentications) {
+ BasicAuthModel basicAuthModel, Map authentications) {
this.environment = environment;
this.subdomain = subdomain;
this.domain = domain;
@@ -142,19 +147,23 @@ private AdvancedBillingClient(Environment environment, String subdomain, String
this.httpClientConfig = httpClientConfig;
this.authentications =
(authentications == null) ? new HashMap<>() : new HashMap<>(authentications);
- if (this.authentications.containsKey("global")) {
- this.basicAuthManager = (BasicAuthManager) this.authentications.get("global");
+ this.basicAuthModel = basicAuthModel;
+
+ if (this.authentications.containsKey("BasicAuth")) {
+ this.basicAuthManager = (BasicAuthManager) this.authentications.get("BasicAuth");
}
- if (!this.authentications.containsKey("global")
- || !getBasicAuthCredentials().equals(basicAuthUserName, basicAuthPassword)) {
- this.basicAuthManager = new BasicAuthManager(basicAuthUserName, basicAuthPassword);
- this.authentications.put("global", basicAuthManager);
+ if (!this.authentications.containsKey("BasicAuth")
+ || !getBasicAuthCredentials().equals(basicAuthModel.getUsername(),
+ basicAuthModel.getPassword())) {
+ this.basicAuthManager = new BasicAuthManager(basicAuthModel);
+ this.authentications.put("BasicAuth", basicAuthManager);
}
GlobalConfiguration globalConfig = new GlobalConfiguration.Builder()
- .authentication(this.authentications).compatibilityFactory(compatibilityFactory)
.httpClient(httpClient).baseUri(server -> getBaseUri(server))
+ .compatibilityFactory(compatibilityFactory)
+ .authentication(this.authentications)
.userAgent(userAgent)
.build();
aPIExports = new APIExportsController(globalConfig);
@@ -493,6 +502,14 @@ public ReadonlyHttpClientConfiguration getHttpClientConfig() {
public BasicAuthCredentials getBasicAuthCredentials() {
return basicAuthManager;
}
+
+ /**
+ * The auth credential model for BasicAuth.
+ * @return the instance of BasicAuthModel
+ */
+ public BasicAuthModel getBasicAuthModel() {
+ return basicAuthModel;
+ }
/**
* The timeout to use for making HTTP requests.
* @deprecated This method will be removed in a future version. Use
@@ -583,8 +600,8 @@ public Builder newBuilder() {
builder.subdomain = getSubdomain();
builder.domain = getDomain();
builder.httpClient = getHttpClient();
- builder.basicAuthUserName = getBasicAuthCredentials().getBasicAuthUserName();
- builder.basicAuthPassword = getBasicAuthCredentials().getBasicAuthPassword();
+ builder.basicAuthCredentials(getBasicAuthModel()
+ .toBuilder().build());
builder.authentications = authentications;
builder.httpClientConfig(configBldr -> configBldr =
((HttpClientConfiguration) httpClientConfig).newBuilder());
@@ -600,8 +617,7 @@ public static class Builder {
private String subdomain = "subdomain";
private String domain = "chargify.com";
private HttpClient httpClient;
- private String basicAuthUserName = "TODO: Replace";
- private String basicAuthPassword = "TODO: Replace";
+ private BasicAuthModel basicAuthModel = new BasicAuthModel.Builder("", "").build();
private Map authentications = null;
private HttpClientConfiguration.Builder httpClientConfigBuilder =
new HttpClientConfiguration.Builder();
@@ -611,17 +627,26 @@ public static class Builder {
* Credentials setter for BasicAuth.
* @param basicAuthUserName String value for basicAuthUserName.
* @param basicAuthPassword String value for basicAuthPassword.
- * @return Builder
+ * @deprecated This builder method is deprecated.
+ * Use {@link #basicAuthCredentials(BasicAuthModel) basicAuthCredentials} instead.
+ * @return The current instance of builder.
*/
+ @Deprecated
public Builder basicAuthCredentials(String basicAuthUserName, String basicAuthPassword) {
- if (basicAuthUserName == null) {
- throw new NullPointerException("BasicAuthUserName cannot be null.");
- }
- if (basicAuthPassword == null) {
- throw new NullPointerException("BasicAuthPassword cannot be null.");
- }
- this.basicAuthUserName = basicAuthUserName;
- this.basicAuthPassword = basicAuthPassword;
+ basicAuthModel = basicAuthModel.toBuilder()
+ .username(basicAuthUserName)
+ .password(basicAuthPassword)
+ .build();
+ return this;
+ }
+
+ /**
+ * Credentials setter for BasicAuthCredentials.
+ * @param basicAuthModel The instance of BasicAuthModel.
+ * @return The current instance of builder.
+ */
+ public Builder basicAuthCredentials(BasicAuthModel basicAuthModel) {
+ this.basicAuthModel = basicAuthModel;
return this;
}
@@ -689,7 +714,7 @@ public AdvancedBillingClient build() {
httpClient = new OkClient(httpClientConfig.getConfiguration(), compatibilityFactory);
return new AdvancedBillingClient(environment, subdomain, domain, httpClient,
- httpClientConfig, basicAuthUserName, basicAuthPassword, authentications);
+ httpClientConfig, basicAuthModel, authentications);
}
}
}
\ No newline at end of file
diff --git a/src/main/java/com/maxio/advancedbilling/Configuration.java b/src/main/java/com/maxio/advancedbilling/Configuration.java
index 0ac7466b..af3ca342 100644
--- a/src/main/java/com/maxio/advancedbilling/Configuration.java
+++ b/src/main/java/com/maxio/advancedbilling/Configuration.java
@@ -6,6 +6,7 @@
package com.maxio.advancedbilling;
+import com.maxio.advancedbilling.authentication.BasicAuthModel;
import com.maxio.advancedbilling.http.client.ReadonlyHttpClientConfiguration;
/**
@@ -49,6 +50,12 @@ public interface Configuration {
*/
BasicAuthCredentials getBasicAuthCredentials();
+ /**
+ * The auth credential model for BasicAuth.
+ * @return the instance of BasicAuthModel
+ */
+ BasicAuthModel getBasicAuthModel();
+
/**
* Get base URI by current environment.
* @param server Server for which to get the base URI
diff --git a/src/main/java/com/maxio/advancedbilling/BasicAuthManager.java b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java
similarity index 53%
rename from src/main/java/com/maxio/advancedbilling/BasicAuthManager.java
rename to src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java
index ae3ff52a..321a28e7 100644
--- a/src/main/java/com/maxio/advancedbilling/BasicAuthManager.java
+++ b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java
@@ -4,8 +4,10 @@
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
-package com.maxio.advancedbilling;
+package com.maxio.advancedbilling.authentication;
+import com.maxio.advancedbilling.ApiHelper;
+import com.maxio.advancedbilling.BasicAuthCredentials;
import io.apimatic.core.authentication.HeaderAuth;
import java.util.Collections;
@@ -14,20 +16,21 @@
*/
public class BasicAuthManager extends HeaderAuth implements BasicAuthCredentials {
- private String basicAuthUserName;
-
- private String basicAuthPassword;
+ /**
+ * Private instance of the auth model containing the auth credentials.
+ */
+ private BasicAuthModel authModel;
/**
* Constructor.
- * @param username String value for username.
- * @param password String value for password.
+ * @param authModel The data model instance for auth credentials.
*/
- public BasicAuthManager(String username, String password) {
+ public BasicAuthManager(BasicAuthModel authModel) {
super(Collections.singletonMap("Authorization",
- ApiHelper.getBase64EncodedCredentials(username, password)));
- this.basicAuthUserName = username;
- this.basicAuthPassword = password;
+ ApiHelper.getBase64EncodedCredentials(
+ authModel.getUsername(),
+ authModel.getPassword())));
+ this.authModel = authModel;
}
/**
@@ -35,7 +38,7 @@ public BasicAuthManager(String username, String password) {
* @return basicAuthUserName
*/
public String getBasicAuthUserName() {
- return basicAuthUserName;
+ return authModel.getUsername();
}
/**
@@ -43,7 +46,7 @@ public String getBasicAuthUserName() {
* @return basicAuthPassword
*/
public String getBasicAuthPassword() {
- return basicAuthPassword;
+ return authModel.getPassword();
}
/**
@@ -63,8 +66,21 @@ public boolean equals(String basicAuthUserName, String basicAuthPassword) {
*/
@Override
public String toString() {
- return "BasicAuthManager [" + "basicAuthUserName=" + basicAuthUserName
- + ", basicAuthPassword=" + basicAuthPassword + "]";
+ return "BasicAuthManager [" + "basicAuthUserName=" + getBasicAuthUserName()
+ + ", basicAuthPassword=" + getBasicAuthPassword() + "]";
}
+ /**
+ * Returns the error message if the auth credentials are not valid.
+ * @return the auth specific error message.
+ */
+ @Override
+ public String getErrorMessage() {
+ String errorMessage = super.getErrorMessage();
+ if (errorMessage == null) {
+ return null;
+ }
+
+ return "BasicAuth - " + errorMessage;
+ }
}
diff --git a/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthModel.java b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthModel.java
new file mode 100644
index 00000000..0e2062b9
--- /dev/null
+++ b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthModel.java
@@ -0,0 +1,110 @@
+/*
+ * AdvancedBilling
+ *
+ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
+ */
+
+package com.maxio.advancedbilling.authentication;
+
+/**
+ * A data class for Basic Authentication credentials.
+ */
+public class BasicAuthModel {
+ private String username;
+ private String password;
+
+ /**
+ * A Constructor for BasicAuthModel.
+ */
+ private BasicAuthModel(String username, String password) {
+ this.username = username;
+ this.password = password;
+ }
+
+ /**
+ * Getter for username.
+ * @return username The value of Username.
+ */
+ public String getUsername() {
+ return this.username;
+ }
+
+ /**
+ * Getter for password.
+ * @return password The value of Password.
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+ /**
+ * Builds a new {@link BasicAuthModel.Builder} object.
+ * Creates the instance with the state of the current auth model.
+ * @return a new {@link BasicAuthModel.Builder} object.
+ */
+ public Builder toBuilder() {
+ return new Builder(getUsername(), getPassword());
+ }
+
+ /**
+ * A Builder class for Basic Authentication credentials.
+ */
+ public static class Builder {
+ private String username;
+ private String password;
+
+ /**
+ * The constructor with required auth credentials.
+ * @param username The value of Username.
+ * @param password The value of Password.
+ */
+ public Builder(String username, String password) {
+ if (username == null) {
+ throw new NullPointerException("Username cannot be null.");
+ }
+
+ if (password == null) {
+ throw new NullPointerException("Password cannot be null.");
+ }
+
+ this.username = username;
+ this.password = password;
+ }
+
+ /**
+ * Setter for username.
+ * @param username The value of Username.
+ * @return Builder The current instance of Builder.
+ */
+ public Builder username(String username) {
+ if (username == null) {
+ throw new NullPointerException("Username cannot be null.");
+ }
+
+ this.username = username;
+ return this;
+ }
+
+ /**
+ * Setter for password.
+ * @param password The value of Password.
+ * @return Builder The current instance of Builder.
+ */
+ public Builder password(String password) {
+ if (password == null) {
+ throw new NullPointerException("Password cannot be null.");
+ }
+
+ this.password = password;
+ return this;
+ }
+
+ /**
+ * Builds the instance of BasicAuthModel using the provided credentials.
+ * @return The instance of BasicAuthModel.
+ */
+ public BasicAuthModel build() {
+ return new BasicAuthModel(username, password);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java
index c1b39a45..9fd5e83c 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java
@@ -69,7 +69,8 @@ private ApiCall, ApiException> prepareListExportedProforma
.templateParam(param -> param.key("batch_id").value(input.getBatchId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -116,7 +117,8 @@ private ApiCall, ApiException> prepareListExportedInvoicesRequest(
.templateParam(param -> param.key("batch_id").value(input.getBatchId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -163,7 +165,8 @@ private ApiCall, ApiException> prepareListExportedSubscriptio
.templateParam(param -> param.key("batch_id").value(input.getBatchId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -200,7 +203,8 @@ private ApiCall prepareExportProformaInvoicesReq
.server(Server.ENUM_DEFAULT.value())
.path("/api_exports/proforma_invoices.json")
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -238,7 +242,8 @@ private ApiCall prepareExportInvoicesRequest() t
.server(Server.ENUM_DEFAULT.value())
.path("/api_exports/invoices.json")
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -276,7 +281,8 @@ private ApiCall prepareExportSubscriptionsReques
.server(Server.ENUM_DEFAULT.value())
.path("/api_exports/subscriptions.json")
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -316,7 +322,8 @@ private ApiCall prepareReadProformaInvoicesExpor
.templateParam(param -> param.key("batch_id").value(batchId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -356,7 +363,8 @@ private ApiCall prepareReadInvoicesExportRequest
.templateParam(param -> param.key("batch_id").value(batchId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -396,7 +404,8 @@ private ApiCall prepareReadSubscriptionsExportRe
.templateParam(param -> param.key("batch_id").value(batchId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
index 48e9d8a5..b2a5efbc 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
@@ -75,7 +75,8 @@ private ApiCall prepareIssueAdvanceInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -120,7 +121,8 @@ private ApiCall prepareReadAdvanceInvoiceRequest(
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -171,7 +173,8 @@ private ApiCall prepareVoidAdvanceInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BaseController.java b/src/main/java/com/maxio/advancedbilling/controllers/BaseController.java
index 312ee641..e16edc19 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/BaseController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/BaseController.java
@@ -17,7 +17,6 @@
* Base class for all Controllers.
*/
public abstract class BaseController {
- protected final static String AUTHENTICATION_KEY = "global";
protected static final Map> GLOBAL_ERROR_CASES =
new HashMap>();
private GlobalConfiguration globalConfig;
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
index 51664cd6..6513385c 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
@@ -84,7 +84,8 @@ private ApiCall prepareEnableBillingPortalForCus
.templateParam(param -> param.key("customer_id").value(customerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -131,7 +132,8 @@ private ApiCall prepareReadBillingPortalLink
.templateParam(param -> param.key("customer_id").value(customerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -181,7 +183,8 @@ private ApiCall prepareResendBillingPortalInvita
.templateParam(param -> param.key("customer_id").value(customerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -226,7 +229,8 @@ private ApiCall prepareRevokeBillingPortalAcces
.templateParam(param -> param.key("customer_id").value(customerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
index ac41bd49..7818adfd 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
@@ -98,7 +98,8 @@ private ApiCall prepareCreateMeteredComponentRe
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -160,7 +161,8 @@ private ApiCall prepareCreateQuantityBasedCompo
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -216,7 +218,8 @@ private ApiCall prepareCreateOnOffComponentRequ
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -274,7 +277,8 @@ private ApiCall prepareCreatePrepaidUsageCompon
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -334,7 +338,8 @@ private ApiCall prepareCreateEventBasedComponen
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -379,7 +384,8 @@ private ApiCall prepareFindComponentRequest(
.queryParam(param -> param.key("handle")
.value(handle))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -425,7 +431,8 @@ private ApiCall prepareReadComponentRequest(
.templateParam(param -> param.key("component_id").value(componentId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -479,7 +486,8 @@ private ApiCall prepareUpdateProductFamilyCompo
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -527,7 +535,8 @@ private ApiCall prepareArchiveComponentRequest(
.templateParam(param -> param.key("component_id").value(componentId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -585,7 +594,8 @@ private ApiCall, ApiException> prepareListComponentsRequ
.queryParam(param -> param.key("filter[use_site_exchange_rate]")
.value(input.getFilterUseSiteExchangeRate()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -631,7 +641,8 @@ private ApiCall prepareUpdateComponentRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -683,7 +694,8 @@ private ApiCall preparePromoteComponentPricePoi
.templateParam(param -> param.key("price_point_id").value(pricePointId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -740,7 +752,8 @@ private ApiCall, ApiException> prepareListComponentsForP
.templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -785,7 +798,8 @@ private ApiCall prepareCreateComponen
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -836,7 +850,8 @@ private ApiCall prepareListComponent
.templateParam(param -> param.key("component_id").value(input.getComponentId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -881,7 +896,8 @@ private ApiCall prepareBulkCreateCom
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -935,7 +951,8 @@ private ApiCall prepareUpdateComponen
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -982,7 +999,8 @@ private ApiCall prepareArchiveCompone
.templateParam(param -> param.key("price_point_id").value(pricePointId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -1028,7 +1046,8 @@ private ApiCall prepareUnarchiveCompo
.templateParam(param -> param.key("price_point_id").value(pricePointId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -1076,7 +1095,8 @@ private ApiCall prepareCreateCurr
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -1125,7 +1145,8 @@ private ApiCall prepareUpdateCurr
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -1187,7 +1208,8 @@ private ApiCall prepareListAllC
.queryParam(param -> param.key("filter[archived_at]")
.value((input.getFilterArchivedAt() != null) ? input.getFilterArchivedAt().value() : null).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
index dbbcbf99..99633ce9 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
@@ -88,7 +88,8 @@ private ApiCall prepareCreateCouponRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -152,7 +153,8 @@ private ApiCall, ApiException> prepareListCouponsForProduct
.templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -200,7 +202,8 @@ private ApiCall prepareFindCouponRequest(
.queryParam(param -> param.key("code")
.value(code).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -250,7 +253,8 @@ private ApiCall prepareReadCouponRequest(
.templateParam(param -> param.key("coupon_id").value(couponId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -303,7 +307,8 @@ private ApiCall prepareUpdateCouponRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -348,7 +353,8 @@ private ApiCall prepareArchiveCouponRequest(
.templateParam(param -> param.key("coupon_id").value(couponId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -417,7 +423,8 @@ private ApiCall, ApiException> prepareListCouponsRequest(
.queryParam(param -> param.key("filter[use_site_exchange_rate]")
.value(input.getFilterUseSiteExchangeRate()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -462,7 +469,8 @@ private ApiCall, ApiException> prepareReadCouponUsageRequest(
.templateParam(param -> param.key("coupon_id").value(couponId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -519,7 +527,8 @@ private ApiCall prepareValidateCouponRequest(
.queryParam(param -> param.key("product_family_id")
.value(productFamilyId).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -571,7 +580,8 @@ private ApiCall prepareCreateOrUpdateCoupo
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -631,7 +641,8 @@ private ApiCall prepareCreateCouponSubcode
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -672,7 +683,8 @@ private ApiCall prepareListCouponSubcodesRequest(
.templateParam(param -> param.key("coupon_id").value(input.getCouponId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -720,7 +732,8 @@ private ApiCall prepareUpdateCouponSubcode
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -768,7 +781,8 @@ private ApiCall prepareDeleteCouponSubcodeRequest(
.shouldEncode(true))
.templateParam(param -> param.key("subcode").value(subcode)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
index 892f8642..df7ae1dc 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
@@ -99,7 +99,8 @@ private ApiCall, ApiException> prepareCreateMetafieldsRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -149,7 +150,8 @@ private ApiCall prepareListMetafieldsReque
.templateParam(param -> param.key("resource_type").value((input.getResourceType() != null) ? input.getResourceType().value() : null)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -194,7 +196,8 @@ private ApiCall, ApiException> prepareUpdateMetafieldRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -240,7 +243,8 @@ private ApiCall prepareDeleteMetafieldRequest(
.value(name).isRequired(false))
.templateParam(param -> param.key("resource_type").value((resourceType != null) ? resourceType.value() : null)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -308,7 +312,8 @@ private ApiCall, ApiException> prepareCreateMetadataRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -357,7 +362,8 @@ private ApiCall prepareListMetadataRequest(
.templateParam(param -> param.key("resource_id").value(input.getResourceId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -408,7 +414,8 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -471,7 +478,8 @@ private ApiCall prepareDeleteMetadataRequest(
.shouldEncode(true))
.templateParam(param -> param.key("resource_id").value(resourceId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -534,7 +542,8 @@ private ApiCall prepareListMetadataForResourceT
.templateParam(param -> param.key("resource_type").value((input.getResourceType() != null) ? input.getResourceType().value() : null)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
index 7b3535d5..e20a3b09 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
@@ -85,7 +85,8 @@ private ApiCall prepareCreateCustomerRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -147,7 +148,8 @@ private ApiCall, ApiException> prepareListCustomersReques
.queryParam(param -> param.key("q")
.value(input.getQ()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -185,7 +187,8 @@ private ApiCall prepareReadCustomerRequest(
.templateParam(param -> param.key("id").value(id).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -229,7 +232,8 @@ private ApiCall prepareUpdateCustomerRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -270,7 +274,8 @@ private ApiCall prepareDeleteCustomerRequest(
.path("/customers/{id}.json")
.templateParam(param -> param.key("id").value(id).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -306,7 +311,8 @@ private ApiCall prepareReadCustomerByReferenceRe
.queryParam(param -> param.key("reference")
.value(reference))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -343,7 +349,8 @@ private ApiCall, ApiException> prepareListCustomerSub
.templateParam(param -> param.key("customer_id").value(customerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java
index dfc325f2..1dfce3c8 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java
@@ -81,7 +81,8 @@ private ApiCall prepareCreateSegmentRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -142,7 +143,8 @@ private ApiCall prepareListSegmentsForPriceP
.templateParam(param -> param.key("price_point_id").value(input.getPricePointId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -205,7 +207,8 @@ private ApiCall prepareUpdateSegmentRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -258,7 +261,8 @@ private ApiCall prepareDeleteSegmentRequest(
.shouldEncode(true))
.templateParam(param -> param.key("id").value(id).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -317,7 +321,8 @@ private ApiCall prepareBulkCreateSegmentsReq
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -378,7 +383,8 @@ private ApiCall prepareBulkUpdateSegmentsReq
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java
index fd828e96..f29952de 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java
@@ -101,7 +101,8 @@ private ApiCall, ApiException> prepareListEventsRequest(
.queryParam(param -> param.key("end_datetime")
.value(input.getEndDatetime()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -152,7 +153,8 @@ private ApiCall, ApiException> prepareListSubscriptionEvents
.templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -200,7 +202,8 @@ private ApiCall prepareReadEventsCountRequest(
.queryParam(param -> param.key("filter")
.value(EventType.toValue(input.getFilter())).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java
index 306e78dd..27cebbc6 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java
@@ -62,7 +62,8 @@ private ApiCall prepareReadSiteStatsRequest() throws
.server(Server.ENUM_DEFAULT.value())
.path("/stats.json")
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -109,7 +110,8 @@ private ApiCall prepareReadMrrRequest(
.queryParam(param -> param.key("subscription_id")
.value(subscriptionId).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -167,7 +169,8 @@ private ApiCall prepareListMrrMovementsRequest(
.queryParam(param -> param.key("direction")
.value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -216,7 +219,8 @@ private ApiCall prepareListMrrPerSubscrip
.queryParam(param -> param.key("direction")
.value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
index 0e452859..4eb8b592 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
@@ -31,8 +31,8 @@
import com.maxio.advancedbilling.models.ListInvoicesInput;
import com.maxio.advancedbilling.models.ListInvoicesResponse;
import com.maxio.advancedbilling.models.MultiInvoicePaymentResponse;
-import com.maxio.advancedbilling.models.PaymentResponse;
import com.maxio.advancedbilling.models.RecordPaymentRequest;
+import com.maxio.advancedbilling.models.RecordPaymentResponse;
import com.maxio.advancedbilling.models.RefundInvoiceRequest;
import com.maxio.advancedbilling.models.SendInvoiceRequest;
import com.maxio.advancedbilling.models.VoidInvoiceRequest;
@@ -91,7 +91,8 @@ private ApiCall prepareRefundInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -176,7 +177,8 @@ private ApiCall prepareListInvoicesRequest(
.queryParam(param -> param.key("sort")
.value((input.getSort() != null) ? input.getSort().value() : "number").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -214,7 +216,8 @@ private ApiCall prepareReadInvoiceRequest(
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -271,7 +274,8 @@ private ApiCall prepareListInvoiceEvent
.queryParam(param -> param.key("event_types")
.value(InvoiceEventType.toValue(input.getEventTypes())).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -333,7 +337,8 @@ private ApiCall prepareRecordPaymentForInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -382,7 +387,8 @@ private ApiCall prepareRecordPaymentF
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -439,7 +445,8 @@ private ApiCall prepareListCreditNotesReq
.queryParam(param -> param.key("applications")
.value(input.getApplications()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -476,7 +483,8 @@ private ApiCall prepareReadCreditNoteRequest(
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -496,11 +504,11 @@ private ApiCall prepareReadCreditNoteRequest(
* subscriptions may be paid using the "bulk" payment request.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter: Example:
- * @return Returns the PaymentResponse response from the API call
+ * @return Returns the RecordPaymentResponse response from the API call
* @throws ApiException Represents error response from the server.
* @throws IOException Signals that an I/O exception of some sort has occurred.
*/
- public PaymentResponse recordPaymentForSubscription(
+ public RecordPaymentResponse recordPaymentForSubscription(
final int subscriptionId,
final RecordPaymentRequest body) throws ApiException, IOException {
return prepareRecordPaymentForSubscriptionRequest(subscriptionId, body).execute();
@@ -509,10 +517,10 @@ public PaymentResponse recordPaymentForSubscription(
/**
* Builds the ApiCall object for recordPaymentForSubscription.
*/
- private ApiCall prepareRecordPaymentForSubscriptionRequest(
+ private ApiCall prepareRecordPaymentForSubscriptionRequest(
final int subscriptionId,
final RecordPaymentRequest body) throws JsonProcessingException, IOException {
- return new ApiCall.Builder()
+ return new ApiCall.Builder()
.globalConfig(getGlobalConfiguration())
.requestBuilder(requestBuilder -> requestBuilder
.server(Server.ENUM_DEFAULT.value())
@@ -524,11 +532,12 @@ private ApiCall prepareRecordPaymentForSubscripti
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
- response -> ApiHelper.deserialize(response, PaymentResponse.class))
+ response -> ApiHelper.deserialize(response, RecordPaymentResponse.class))
.nullify404(false)
.localErrorCase("422",
ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.",
@@ -576,7 +585,8 @@ private ApiCall prepareReopenInvoiceRequest(
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -629,7 +639,8 @@ private ApiCall prepareVoidInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -679,7 +690,8 @@ private ApiCall prepareListConsolidatedInvoic
.templateParam(param -> param.key("invoice_uid").value(input.getInvoiceUid())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -790,7 +802,8 @@ private ApiCall prepareCreateInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -846,7 +859,8 @@ private ApiCall prepareSendInvoiceRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -889,7 +903,8 @@ private ApiCall preparePreviewCust
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -937,7 +952,8 @@ private ApiCall prepareUpdateCustomerInformationRequest(
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -1006,7 +1022,8 @@ private ApiCall prepareIssueInvoiceRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java
index fbcd8be5..e6cd3985 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java
@@ -70,7 +70,8 @@ private ApiCall prepareCreateOfferRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -114,7 +115,8 @@ private ApiCall prepareListOffersRequest(
.queryParam(param -> param.key("include_archived")
.value(input.getIncludeArchived()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -152,7 +154,8 @@ private ApiCall prepareReadOfferRequest(
.templateParam(param -> param.key("offer_id").value(offerId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -187,7 +190,8 @@ private ApiCall prepareArchiveOfferRequest(
.path("/offers/{offer_id}/archive.json")
.templateParam(param -> param.key("offer_id").value(offerId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -221,7 +225,8 @@ private ApiCall prepareUnarchiveOfferRequest(
.path("/offers/{offer_id}/unarchive.json")
.templateParam(param -> param.key("offer_id").value(offerId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
index be4a553a..07dd8dcc 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
@@ -199,7 +199,8 @@ private ApiCall prepareCreatePaymentProfil
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -248,7 +249,8 @@ private ApiCall, ApiException> prepareListPaymentPr
.queryParam(param -> param.key("customer_id")
.value(input.getCustomerId()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -296,7 +298,8 @@ private ApiCall prepareReadPaymentProfileR
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -364,7 +367,8 @@ private ApiCall prepareUpdatePaymentProfil
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -406,7 +410,8 @@ private ApiCall prepareDeleteUnusedPaymentProfileRequest(
.path("/payment_profiles/{payment_profile_id}.json")
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -456,7 +461,8 @@ private ApiCall prepareDeleteSubscriptionsPaymentProfileRequ
.shouldEncode(true))
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -499,7 +505,8 @@ private ApiCall prepareVerifyBankAccountReque
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -547,7 +554,8 @@ private ApiCall prepareDeleteSubscriptionGroupPaymentProfile
.shouldEncode(true))
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -590,7 +598,8 @@ private ApiCall prepareChangeSubscriptionD
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -643,7 +652,8 @@ private ApiCall prepareChangeSubscriptionG
.templateParam(param -> param.key("payment_profile_id").value(paymentProfileId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -687,7 +697,8 @@ private ApiCall prepareReadOneTimeTokenReq
.templateParam(param -> param.key("chargify_token").value(chargifyToken)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -735,7 +746,8 @@ private ApiCall prepareSendRequestUpdatePaymentEmailRequest(
.path("/subscriptions/{subscription_id}/request_payment_profiles_update.json")
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
index 62fa0e72..05295682 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
@@ -84,7 +84,8 @@ private ApiCall, ApiException> prepareListProductsForProdu
.templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -130,7 +131,8 @@ private ApiCall prepareCreateProductFamilyR
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -178,7 +180,8 @@ private ApiCall, ApiException> prepareListProductFam
.queryParam(param -> param.key("end_datetime")
.value(input.getEndDatetime()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -218,7 +221,8 @@ private ApiCall prepareReadProductFamilyReq
.templateParam(param -> param.key("id").value(id).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
index 593e42ad..002f706b 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
@@ -88,7 +88,8 @@ private ApiCall prepareCreateProductPri
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -136,7 +137,8 @@ private ApiCall prepareListProduct
.templateParam(param -> param.key("product_id").value(input.getProductId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -188,7 +190,8 @@ private ApiCall prepareUpdateProductPri
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -243,7 +246,8 @@ private ApiCall prepareReadProductPrice
.templateParam(param -> param.key("price_point_id").value(pricePointId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -287,7 +291,8 @@ private ApiCall prepareArchiveProductPr
.templateParam(param -> param.key("price_point_id").value(pricePointId)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -333,7 +338,8 @@ private ApiCall prepareUnarchiveProduct
.templateParam(param -> param.key("price_point_id").value(pricePointId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PATCH))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -377,7 +383,8 @@ private ApiCall preparePromoteProductPricePointTo
.templateParam(param -> param.key("price_point_id").value(pricePointId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PATCH))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -422,7 +429,8 @@ private ApiCall prepareBulkC
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -473,7 +481,8 @@ private ApiCall prepareCreateProductCurren
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -524,7 +533,8 @@ private ApiCall prepareUpdateProductCurren
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -586,7 +596,8 @@ private ApiCall prepareListAllProd
.queryParam(param -> param.key("per_page")
.value(input.getPerPage()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
index 5e2f2901..67cec11e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
@@ -72,7 +72,8 @@ private ApiCall prepareCreateProductRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -113,7 +114,8 @@ private ApiCall prepareReadProductRequest(
.templateParam(param -> param.key("product_id").value(productId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -161,7 +163,8 @@ private ApiCall prepareUpdateProductRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -204,7 +207,8 @@ private ApiCall prepareArchiveProductRequest(
.templateParam(param -> param.key("product_id").value(productId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -244,7 +248,8 @@ private ApiCall prepareReadProductByHandleRequest
.templateParam(param -> param.key("api_handle").value(apiHandle)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -301,7 +306,8 @@ private ApiCall, ApiException> prepareListProductsRequest(
.queryParam(param -> param.key("filter[use_site_exchange_rate]")
.value(input.getFilterUseSiteExchangeRate()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
index eaab2fa1..4b9277c2 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
@@ -16,6 +16,7 @@
import com.maxio.advancedbilling.http.request.HttpMethod;
import com.maxio.advancedbilling.models.CreateSubscriptionRequest;
import com.maxio.advancedbilling.models.ListProformaInvoicesInput;
+import com.maxio.advancedbilling.models.ListProformaInvoicesResponse;
import com.maxio.advancedbilling.models.ProformaInvoice;
import com.maxio.advancedbilling.models.ProformaInvoicePreview;
import com.maxio.advancedbilling.models.SignupProformaPreviewResponse;
@@ -25,7 +26,6 @@
import io.apimatic.core.GlobalConfiguration;
import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat;
import java.io.IOException;
-import java.util.List;
/**
* This class lists all the endpoints of the groups.
@@ -70,7 +70,8 @@ private ApiCall prepareCreateConsolidatedProformaInvoiceRequ
.path("/subscription_groups/{uid}/proforma_invoices.json")
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -111,7 +112,8 @@ private ApiCall prepareListSubscriptionGroupProfo
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -135,7 +137,7 @@ private ApiCall prepareListSubscriptionGroupProfo
* @throws IOException Signals that an I/O exception of some sort has occurred.
*/
public ProformaInvoice readProformaInvoice(
- final int proformaInvoiceUid) throws ApiException, IOException {
+ final String proformaInvoiceUid) throws ApiException, IOException {
return prepareReadProformaInvoiceRequest(proformaInvoiceUid).execute();
}
@@ -143,16 +145,17 @@ public ProformaInvoice readProformaInvoice(
* Builds the ApiCall object for readProformaInvoice.
*/
private ApiCall prepareReadProformaInvoiceRequest(
- final int proformaInvoiceUid) throws IOException {
+ final String proformaInvoiceUid) throws IOException {
return new ApiCall.Builder()
.globalConfig(getGlobalConfiguration())
.requestBuilder(requestBuilder -> requestBuilder
.server(Server.ENUM_DEFAULT.value())
.path("/proforma_invoices/{proforma_invoice_uid}.json")
- .templateParam(param -> param.key("proforma_invoice_uid").value(proformaInvoiceUid).isRequired(false)
+ .templateParam(param -> param.key("proforma_invoice_uid").value(proformaInvoiceUid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -197,7 +200,8 @@ private ApiCall prepareCreateProformaInvoiceReque
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -218,11 +222,11 @@ private ApiCall prepareCreateProformaInvoiceReque
* To include breakdowns, pass the specific field as a key in the query with a value set to
* `true`.
* @param input ListProformaInvoicesInput object containing request parameters
- * @return Returns the List of ProformaInvoice response from the API call
+ * @return Returns the ListProformaInvoicesResponse response from the API call
* @throws ApiException Represents error response from the server.
* @throws IOException Signals that an I/O exception of some sort has occurred.
*/
- public List listProformaInvoices(
+ public ListProformaInvoicesResponse listProformaInvoices(
final ListProformaInvoicesInput input) throws ApiException, IOException {
return prepareListProformaInvoicesRequest(input).execute();
}
@@ -230,9 +234,9 @@ public List listProformaInvoices(
/**
* Builds the ApiCall object for listProformaInvoices.
*/
- private ApiCall, ApiException> prepareListProformaInvoicesRequest(
+ private ApiCall prepareListProformaInvoicesRequest(
final ListProformaInvoicesInput input) throws IOException {
- return new ApiCall.Builder, ApiException>()
+ return new ApiCall.Builder()
.globalConfig(getGlobalConfiguration())
.requestBuilder(requestBuilder -> requestBuilder
.server(Server.ENUM_DEFAULT.value())
@@ -264,12 +268,12 @@ private ApiCall, ApiException> prepareListProformaInvoices
.templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
- response -> ApiHelper.deserializeArray(response,
- ProformaInvoice[].class))
+ response -> ApiHelper.deserialize(response, ListProformaInvoicesResponse.class))
.nullify404(false)
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
@@ -314,7 +318,8 @@ private ApiCall prepareVoidProformaInvoiceRequest
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -368,7 +373,8 @@ private ApiCall preparePreviewProformaInvo
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -422,7 +428,8 @@ private ApiCall prepareCreateSignupProformaInvoic
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -482,7 +489,8 @@ private ApiCall preparePreviewSignu
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java
index a520dc6f..47cc1a4b 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java
@@ -72,7 +72,8 @@ private ApiCall prepareCreateReasonCodeRequest
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -115,7 +116,8 @@ private ApiCall, ApiException> prepareListReasonCodesRe
.queryParam(param -> param.key("per_page")
.value(input.getPerPage()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -154,7 +156,8 @@ private ApiCall prepareReadReasonCodeRequest(
.templateParam(param -> param.key("reason_code_id").value(reasonCodeId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -201,7 +204,8 @@ private ApiCall prepareUpdateReasonCodeRequest
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -242,7 +246,8 @@ private ApiCall prepareDeleteReasonCodeRe
.templateParam(param -> param.key("reason_code_id").value(reasonCodeId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java
index e30f27aa..7efd1061 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java
@@ -62,7 +62,8 @@ private ApiCall prepareValidateReferra
.queryParam(param -> param.key("code")
.value(code))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
index bdbe015e..1240b514 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
@@ -78,7 +78,8 @@ private ApiCall, ApiException> prepareListSalesCommissionS
.headerParam(param -> param.key("Authorization")
.value(input.getAuthorization()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -134,7 +135,8 @@ private ApiCall, ApiException> prepareListSalesRepsRequest
.headerParam(param -> param.key("Authorization")
.value(input.getAuthorization()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -217,7 +219,8 @@ private ApiCall prepareReadSalesRepRequest(
.headerParam(param -> param.key("Authorization")
.value((authorization != null) ? authorization : "Bearer <>").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java
index be0780ea..0e1ba76e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java
@@ -60,7 +60,8 @@ private ApiCall prepareReadSiteRequest() throws IOEx
.server(Server.ENUM_DEFAULT.value())
.path("/site.json")
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -102,7 +103,8 @@ private ApiCall prepareClearSiteRequest(
.path("/sites/clear_data.json")
.queryParam(param -> param.key("cleanup_scope")
.value((cleanupScope != null) ? cleanupScope.value() : "all").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -139,7 +141,8 @@ private ApiCall prepareListChargifyJsPubli
.queryParam(param -> param.key("per_page")
.value(input.getPerPage()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
index f214efb8..2211b70c 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
@@ -86,7 +86,8 @@ private ApiCall prepareReadSubscrip
.templateParam(param -> param.key("component_id").value(componentId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -152,7 +153,8 @@ private ApiCall, ApiException> prepareListSu
.templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -200,7 +202,8 @@ private ApiCall prepareBulkUpd
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -242,7 +245,8 @@ private ApiCall prepareBulkResetSubscription
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -332,7 +336,8 @@ private ApiCall prepareAllocateComponentReques
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -394,7 +399,8 @@ private ApiCall, ApiException> prepareListAllocationsRe
.templateParam(param -> param.key("component_id").value(componentId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -450,7 +456,8 @@ private ApiCall, ApiException> prepareAllocateComponent
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -509,7 +516,8 @@ private ApiCall preparePreviewAllocatio
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -574,7 +582,8 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -638,7 +647,8 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -721,7 +731,8 @@ private ApiCall prepareCreateUsageRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -783,7 +794,8 @@ private ApiCall, ApiException> prepareListUsagesRequest(
.templateParam(param -> param.key("component_id").value(input.getComponentId())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -832,7 +844,8 @@ private ApiCall prepareActivateEventBasedComponentRequest(
.shouldEncode(true))
.templateParam(param -> param.key("component_id").value(componentId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -872,7 +885,8 @@ private ApiCall prepareDeactivateEventBasedComponentRequest(
.shouldEncode(true))
.templateParam(param -> param.key("component_id").value(componentId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -933,7 +947,8 @@ private ApiCall prepareRecordEventRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -988,7 +1003,8 @@ private ApiCall prepareBulkRecordEventsRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -1063,7 +1079,8 @@ private ApiCall prepareListSub
.queryParam(param -> param.key("filter[subscription][end_datetime]")
.value(input.getFilterSubscriptionEndDatetime()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java
index 5bbeba5a..718a1477 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java
@@ -74,7 +74,8 @@ private ApiCall prepareCreate
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -124,7 +125,8 @@ private ApiCall prepareLi
.templateParam(param -> param.key("uid").value(input.getUid())
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -173,7 +175,8 @@ private ApiCall prepareIssueSubscriptionGro
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -221,7 +224,8 @@ private ApiCall prepareDeductSubscriptionGroupServi
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
index 84e6a416..4d47593b 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
@@ -69,7 +69,8 @@ private ApiCall prepareCancelSubscriptionsInGroupRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -108,7 +109,8 @@ private ApiCall prepareInitiateDelayedCancellationForGroupRe
.path("/subscription_groups/{uid}/delayed_cancel.json")
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -146,7 +148,8 @@ private ApiCall prepareCancelDelayedCancellationForGroupRequ
.path("/subscription_groups/{uid}/delayed_cancel.json")
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -214,7 +217,8 @@ private ApiCall prepareReacti
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
index cf6515ae..666a6157 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
@@ -78,7 +78,8 @@ private ApiCall prepareSignupWith
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -120,7 +121,8 @@ private ApiCall prepareCreateSubscripti
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -168,7 +170,8 @@ private ApiCall prepareListSubscri
.queryParam(param -> param.key("include")
.value(input.getInclude()).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -208,7 +211,8 @@ private ApiCall prepareReadSubscrip
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -255,7 +259,8 @@ private ApiCall prepareUpdateSubscripti
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -295,7 +300,8 @@ private ApiCall prepareDeleteSubs
.templateParam(param -> param.key("uid").value(uid)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -337,7 +343,8 @@ private ApiCall prepareFindSubscrip
.queryParam(param -> param.key("subscription_id")
.value(subscriptionId))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -403,7 +410,8 @@ private ApiCall prepareAddSubscriptionT
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -441,7 +449,8 @@ private ApiCall prepareRemoveSubscriptionFromGroupRequest(
.path("/subscriptions/{subscription_id}/group.json")
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
index 0a690966..d6493c2a 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
@@ -70,7 +70,8 @@ private ApiCall prepareReadAccountBalancesRequest
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -118,7 +119,8 @@ private ApiCall prepareCreatePrepaymentR
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -165,7 +167,8 @@ private ApiCall prepareListPrepaymentsRequest
.templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -213,7 +216,8 @@ private ApiCall prepareIssueServiceCreditRequest(
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -256,7 +260,8 @@ private ApiCall prepareDeductServiceCreditRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -309,7 +314,8 @@ private ApiCall prepareRefundPrepaymentRequest
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java
index 87453021..b11d0db6 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java
@@ -69,7 +69,8 @@ private ApiCall prepareCreateSubscriptio
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -111,7 +112,8 @@ private ApiCall, ApiException> prepareListSubscri
.templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -155,7 +157,8 @@ private ApiCall prepareReadSubscriptionN
.templateParam(param -> param.key("note_id").value(noteId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -204,7 +207,8 @@ private ApiCall prepareUpdateSubscriptio
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -244,7 +248,8 @@ private ApiCall prepareDeleteSubscriptionNoteRequest(
.shouldEncode(true))
.templateParam(param -> param.key("note_id").value(noteId).isRequired(false)
.shouldEncode(true))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
index e41c7344..bc65f5cf 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
@@ -119,7 +119,8 @@ private ApiCall prepareMigrateSubscriptionPr
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -170,7 +171,8 @@ private ApiCall preparePrevi
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
index 6634a6f2..3ceda14e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
@@ -67,7 +67,8 @@ private ApiCall prepareRetrySubscriptionRequ
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -115,7 +116,8 @@ private ApiCall prepareCancelSubscriptionReq
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -167,7 +169,8 @@ private ApiCall prepareResumeSubscriptionReq
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -215,7 +218,8 @@ private ApiCall preparePauseSubscriptionRequ
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -266,7 +270,8 @@ private ApiCall prepareUpdateAutomaticSubscr
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -381,7 +386,8 @@ private ApiCall prepareReactivateSubscriptio
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -431,7 +437,8 @@ private ApiCall prepareInitiateDelaye
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -474,7 +481,8 @@ private ApiCall prepareCancelDelayedC
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.DELETE))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -515,7 +523,8 @@ private ApiCall prepareCancelDunningRequest(
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -579,7 +588,8 @@ private ApiCall preparePreviewRenewalReque
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
index 2fba0146..845c4b3f 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
@@ -438,7 +438,8 @@ private ApiCall prepareCreateSubscriptionReq
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.POST))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -511,7 +512,8 @@ private ApiCall, ApiException> prepareListSubscriptio
.queryParam(param -> param.key("include[]")
.value(SubscriptionListInclude.toValue(input.getInclude())).isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -595,7 +597,8 @@ private ApiCall prepareUpdateSubscriptionReq
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -643,7 +646,8 @@ private ApiCall prepareReadSubscriptionReque
.templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false)
.shouldEncode(true))
.headerParam(param -> param.key("accept").value("application/json"))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.GET))
.responseHandler(responseHandler -> responseHandler
.deserializer(
@@ -705,7 +709,8 @@ private ApiCall prepareOverrideSubscriptionRequest(
.shouldEncode(true))
.headerParam(param -> param.key("Content-Type")
.value("application/json").isRequired(false))
- .authenticationKey(BaseController.AUTHENTICATION_KEY)
+ .withAuth(auth -> auth
+ .add("BasicAuth"))
.httpMethod(HttpMethod.PUT))
.responseHandler(responseHandler -> responseHandler
.nullify404(false)
@@ -743,7 +748,8 @@ private ApiCall