Skip to content

Commit

Permalink
Automated commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
maxio-sdk committed Feb 15, 2024
1 parent 179da9f commit 069141b
Show file tree
Hide file tree
Showing 81 changed files with 2,415 additions and 685 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,19 @@ The following parameters are configurable for the API Client:
| `domain` | `String` | The Chargify server domain.<br>*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment. <br> **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:

```java
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")
Expand All @@ -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

Expand Down
35 changes: 35 additions & 0 deletions doc/auth/basic-authentication.md
Original file line number Diff line number Diff line change
@@ -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();
```


10 changes: 7 additions & 3 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ The following parameters are configurable for the API Client:
| `domain` | `String` | The Chargify server domain.<br>*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment. <br> **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:

```java
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")
Expand Down Expand Up @@ -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` |

2 changes: 1 addition & 1 deletion doc/configuration-interface.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
18 changes: 7 additions & 11 deletions doc/controllers/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand All @@ -1927,7 +1927,7 @@ PaymentResponse recordPaymentForSubscription(

## Response Type

[`PaymentResponse`](../../doc/models/payment-response.md)
[`RecordPaymentResponse`](../../doc/models/record-payment-response.md)

## Example Usage

Expand All @@ -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();
Expand All @@ -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
}
```

Expand Down
12 changes: 6 additions & 6 deletions doc/controllers/proforma-invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -136,7 +136,7 @@ ProformaInvoice readProformaInvoice(
## Example Usage

```java
int proformaInvoiceUid = 242;
String proformaInvoiceUid = "proforma_invoice_uid4";

try {
ProformaInvoice result = proformaInvoicesController.readProformaInvoice(proformaInvoiceUid);
Expand Down Expand Up @@ -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<ProformaInvoice> listProformaInvoices(
ListProformaInvoicesResponse listProformaInvoices(
final ListProformaInvoicesInput input)
```

Expand All @@ -231,7 +231,7 @@ List<ProformaInvoice> listProformaInvoices(

## Response Type

[`List<ProformaInvoice>`](../../doc/models/proforma-invoice.md)
[`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md)

## Example Usage

Expand All @@ -251,7 +251,7 @@ ListProformaInvoicesInput listProformaInvoicesInput = new ListProformaInvoicesIn
.build();

try {
List<ProformaInvoice> result = proformaInvoicesController.listProformaInvoices(listProformaInvoicesInput);
ListProformaInvoicesResponse result = proformaInvoicesController.listProformaInvoices(listProformaInvoicesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/subscription-invoice-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ CreatePrepaymentRequest body = new CreatePrepaymentRequest.Builder(
100D,
"John Doe signup for $100",
"Signup for $100",
PrepaymentMethod.CHECK
CreatePrepaymentMethod.CHECK
)
.build()
)
Expand Down
13 changes: 13 additions & 0 deletions doc/models/containers/record-payment-response-prepayment.md
Original file line number Diff line number Diff line change
@@ -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) |

4 changes: 2 additions & 2 deletions doc/models/create-or-update-product-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
```
Expand Down
10 changes: 8 additions & 2 deletions doc/models/create-or-update-product.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>**Constraints**: *Maximum Length*: `10` | String getTaxCode() | setTaxCode(String taxCode) |

Expand All @@ -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
}
```

4 changes: 2 additions & 2 deletions doc/models/create-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -21,7 +21,7 @@
"amount": "amount6",
"memo": "memo8",
"payment_details": "payment_details4",
"payment_method": "payment_method6"
"payment_method": "cash"
}
```

22 changes: 22 additions & 0 deletions doc/models/create-prepayment-method.md
Original file line number Diff line number Diff line change
@@ -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` |

2 changes: 1 addition & 1 deletion doc/models/create-prepayment-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"amount": 11.6,
"details": "details8",
"memo": "memo2",
"method": "cash",
"method": "money_order",
"payment_profile_id": 240
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-prepayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -22,7 +22,7 @@
"amount": 23.92,
"details": "details6",
"memo": "memo0",
"method": "paypal_account",
"method": "credit_card_on_file",
"payment_profile_id": 240
}
```
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-product-price-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |

Expand Down
12 changes: 6 additions & 6 deletions doc/models/invoice-pre-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Loading

0 comments on commit 069141b

Please sign in to comment.