Skip to content

Commit

Permalink
0.0.4 Release (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpierog authored Jan 29, 2024
1 parent e0fa540 commit fa50ad9
Show file tree
Hide file tree
Showing 19 changed files with 236 additions and 48 deletions.
3 changes: 1 addition & 2 deletions doc/models/bank-account-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| `BankBranchCode` | `String` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided | String getBankBranchCode() | setBankBranchCode(String bankBranchCode) |
| `BankIban` | `String` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided | String getBankIban() | setBankIban(String bankIban) |
| `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | BankAccountHolderType getBankAccountHolderType() | setBankAccountHolderType(BankAccountHolderType bankAccountHolderType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `CurrentVault` | [`BankAccountVault`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. | BankAccountVault getCurrentVault() | setCurrentVault(BankAccountVault currentVault) |
| `VaultToken` | `String` | Optional | - | String getVaultToken() | setVaultToken(String vaultToken) |
| `CustomerVaultToken` | `String` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) |
Expand All @@ -27,7 +27,6 @@
```json
{
"bank_account_type": "checking",
"payment_type": "credit_card",
"chargify_token": "chargify_token0",
"bank_name": "bank_name2",
"bank_routing_number": "bank_routing_number8",
Expand Down
3 changes: 1 addition & 2 deletions doc/models/bank-account-payment-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
| `MaskedBankAccountNumber` | `String` | Required | A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) | String getMaskedBankAccountNumber() | setMaskedBankAccountNumber(String maskedBankAccountNumber) |
| `BankAccountType` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking<br>**Default**: `BankAccountType.CHECKING` | BankAccountType getBankAccountType() | setBankAccountType(BankAccountType bankAccountType) |
| `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | BankAccountHolderType getBankAccountHolderType() | setBankAccountHolderType(BankAccountHolderType bankAccountHolderType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `Verified` | `Boolean` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account<br>**Default**: `false` | Boolean getVerified() | setVerified(Boolean verified) |
| `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) |
| `GatewayHandle` | `String` | Optional | - | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) |
Expand All @@ -39,7 +39,6 @@
"masked_bank_routing_number": "masked_bank_routing_number8",
"masked_bank_account_number": "masked_bank_account_number8",
"bank_account_type": "checking",
"payment_type": "credit_card",
"verified": false,
"id": 188,
"first_name": "first_name6",
Expand Down
1 change: 0 additions & 1 deletion doc/models/bank-account-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"masked_bank_routing_number": "masked_bank_routing_number0",
"masked_bank_account_number": "masked_bank_account_number6",
"bank_account_type": "checking",
"payment_type": "credit_card",
"verified": false,
"id": 44,
"first_name": "first_name4",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Void Invoice Event Data Credit Note Attributes

## Class Name

`VoidInvoiceEventDataCreditNoteAttributes`

## Cases

| Type | Factory Method |
| --- | --- |
| [`CreditNote`](../../../doc/models/credit-note.md) | VoidInvoiceEventDataCreditNoteAttributes.fromCreditNote(CreditNote creditNote) |

2 changes: 1 addition & 1 deletion doc/models/create-payment-profile-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
{
"payment_profile": {
"chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt",
"payment_type": "credit_card",
"full_number": "5424000000000015",
"bank_account_type": "checking",
"id": 44,
"payment_type": "bank_account",
"first_name": "first_name4",
"last_name": "last_name2"
}
Expand Down
4 changes: 2 additions & 2 deletions doc/models/create-payment-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| --- | --- | --- | --- | --- | --- |
| `ChargifyToken` | `String` | Optional | Token received after sending billing informations using chargify.js. | String getChargifyToken() | setChargifyToken(String chargifyToken) |
| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `FirstName` | `String` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | String getFirstName() | setFirstName(String firstName) |
| `LastName` | `String` | Optional | Last name on card or bank account. If omitted, the last_name from customer attributes will be used. | String getLastName() | setLastName(String lastName) |
| `MaskedCardNumber` | `String` | Optional | - | String getMaskedCardNumber() | setMaskedCardNumber(String maskedCardNumber) |
Expand Down Expand Up @@ -47,10 +47,10 @@
```json
{
"chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt",
"payment_type": "credit_card",
"full_number": "5424000000000015",
"bank_account_type": "checking",
"id": 76,
"payment_type": "paypal_account",
"first_name": "first_name8",
"last_name": "last_name6"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/credit-card-payment-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| `BillingCountry` | `String` | Optional | The current billing address country for the card. | String getBillingCountry() | setBillingCountry(String billingCountry) |
| `CustomerVaultToken` | `String` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) |
| `BillingAddress2` | `String` | Optional | The current billing street address, second line, for the card. | String getBillingAddress2() | setBillingAddress2(String billingAddress2) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `Disabled` | `Boolean` | Optional | - | Boolean getDisabled() | setDisabled(Boolean disabled) |
| `ChargifyToken` | `String` | Optional | Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | String getChargifyToken() | setChargifyToken(String chargifyToken) |
| `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) |
Expand Down
1 change: 1 addition & 0 deletions doc/models/invoice-event-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The event data is the data that, when combined with the command, results in the
| `RefundId` | `Integer` | Optional | The ID of the refund transaction. | Integer getRefundId() | setRefundId(Integer refundId) |
| `Prepayment` | `Boolean` | Optional | The flag that shows whether the original payment was a prepayment or not | Boolean getPrepayment() | setPrepayment(Boolean prepayment) |
| `IsAdvanceInvoice` | `Boolean` | Optional | If true, the invoice is an advance invoice. | Boolean getIsAdvanceInvoice() | setIsAdvanceInvoice(Boolean isAdvanceInvoice) |
| `Reason` | `String` | Optional | The reason for the void. | String getReason() | setReason(String reason) |

## Example (as JSON)

Expand Down
1 change: 0 additions & 1 deletion doc/models/payment-profile-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"masked_bank_routing_number": "masked_bank_routing_number8",
"masked_bank_account_number": "masked_bank_account_number8",
"bank_account_type": "checking",
"payment_type": "credit_card",
"verified": false,
"id": 188,
"first_name": "first_name6",
Expand Down
3 changes: 1 addition & 2 deletions doc/models/subscription-group-bank-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| `BankBranchCode` | `String` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided | String getBankBranchCode() | setBankBranchCode(String bankBranchCode) |
| `BankAccountType` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking<br>**Default**: `BankAccountType.CHECKING` | BankAccountType getBankAccountType() | setBankAccountType(BankAccountType bankAccountType) |
| `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | BankAccountHolderType getBankAccountHolderType() | setBankAccountHolderType(BankAccountHolderType bankAccountHolderType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `BillingAddress` | `String` | Optional | - | String getBillingAddress() | setBillingAddress(String billingAddress) |
| `BillingCity` | `String` | Optional | - | String getBillingCity() | setBillingCity(String billingCity) |
| `BillingState` | `String` | Optional | - | String getBillingState() | setBillingState(String billingState) |
Expand All @@ -31,7 +31,6 @@
```json
{
"bank_account_type": "checking",
"payment_type": "credit_card",
"bank_name": "bank_name2",
"bank_account_number": "bank_account_number4",
"bank_routing_number": "bank_routing_number8",
Expand Down
12 changes: 7 additions & 5 deletions doc/models/void-invoice-event-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,29 @@ Example schema for an `void_invoice` event

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `CreditNoteAttributes` | [`CreditNote`](../../doc/models/credit-note.md) | Required | - | CreditNote getCreditNoteAttributes() | setCreditNoteAttributes(CreditNote creditNoteAttributes) |
| `CreditNoteAttributes` | [`VoidInvoiceEventDataCreditNoteAttributes`](../../doc/models/containers/void-invoice-event-data-credit-note-attributes.md) | Required | This is a container for one-of cases. | VoidInvoiceEventDataCreditNoteAttributes getCreditNoteAttributes() | setCreditNoteAttributes(VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes) |
| `Memo` | `String` | Required | The memo provided during invoice voiding. | String getMemo() | setMemo(String memo) |
| `AppliedAmount` | `String` | Required | The amount of the void. | String getAppliedAmount() | setAppliedAmount(String appliedAmount) |
| `TransactionTime` | `ZonedDateTime` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | ZonedDateTime getTransactionTime() | setTransactionTime(ZonedDateTime transactionTime) |
| `IsAdvanceInvoice` | `boolean` | Required | If true, the invoice is an advance invoice. | boolean getIsAdvanceInvoice() | setIsAdvanceInvoice(boolean isAdvanceInvoice) |
| `Reason` | `String` | Required | The reason for the void. | String getReason() | setReason(String reason) |

## Example (as JSON)

```json
{
"credit_note_attributes": {
"uid": "uid2",
"site_id": 72,
"customer_id": 184,
"subscription_id": 0,
"site_id": 218,
"customer_id": 74,
"subscription_id": 146,
"number": "number0"
},
"memo": "memo6",
"applied_amount": "applied_amount6",
"transaction_time": "2016-03-13T12:52:32.123Z",
"is_advance_invoice": false
"is_advance_invoice": false,
"reason": "reason8"
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class BankAccountAttributes {
*/
public BankAccountAttributes() {
bankAccountType = BankAccountType.CHECKING;
paymentType = PaymentType.CREDIT_CARD;
}

/**
Expand Down Expand Up @@ -386,7 +385,7 @@ public static class Builder {
private String bankBranchCode;
private String bankIban;
private BankAccountHolderType bankAccountHolderType;
private PaymentType paymentType = PaymentType.CREDIT_CARD;
private PaymentType paymentType;
private BankAccountVault currentVault;
private String vaultToken;
private String customerVaultToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class BankAccountPaymentProfile {
*/
public BankAccountPaymentProfile() {
bankAccountType = BankAccountType.CHECKING;
paymentType = PaymentType.CREDIT_CARD;
verified = false;
}

Expand Down Expand Up @@ -888,7 +887,7 @@ public static class Builder {
private String bankName;
private BankAccountType bankAccountType = BankAccountType.CHECKING;
private BankAccountHolderType bankAccountHolderType;
private PaymentType paymentType = PaymentType.CREDIT_CARD;
private PaymentType paymentType;
private Boolean verified = false;
private Integer siteGatewaySettingId;
private OptionalNullable<String> gatewayHandle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public class CreatePaymentProfile {
* Default constructor.
*/
public CreatePaymentProfile() {
paymentType = PaymentType.CREDIT_CARD;
bankAccountType = BankAccountType.CHECKING;
}

Expand Down Expand Up @@ -1060,7 +1059,7 @@ public Builder toBuilder() {
public static class Builder {
private String chargifyToken;
private Integer id;
private PaymentType paymentType = PaymentType.CREDIT_CARD;
private PaymentType paymentType;
private String firstName;
private String lastName;
private String maskedCardNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class CreditCardPaymentProfile {
* Default constructor.
*/
public CreditCardPaymentProfile() {
paymentType = PaymentType.CREDIT_CARD;
}

/**
Expand Down Expand Up @@ -923,7 +922,7 @@ public static class Builder {
private OptionalNullable<String> billingCountry;
private OptionalNullable<String> customerVaultToken;
private OptionalNullable<String> billingAddress2;
private PaymentType paymentType = PaymentType.CREDIT_CARD;
private PaymentType paymentType;
private Boolean disabled;
private String chargifyToken;
private OptionalNullable<Integer> siteGatewaySettingId;
Expand Down
46 changes: 42 additions & 4 deletions src/main/java/com/maxio/advancedbilling/models/InvoiceEvent1.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class InvoiceEvent1 {
private Integer refundId;
private Boolean prepayment;
private Boolean isAdvanceInvoice;
private String reason;

/**
* Default constructor.
Expand Down Expand Up @@ -85,6 +86,7 @@ public InvoiceEvent1() {
* @param refundId Integer value for refundId.
* @param prepayment Boolean value for prepayment.
* @param isAdvanceInvoice Boolean value for isAdvanceInvoice.
* @param reason String value for reason.
*/
public InvoiceEvent1(
String uid,
Expand Down Expand Up @@ -114,7 +116,8 @@ public InvoiceEvent1(
String refundAmount,
Integer refundId,
Boolean prepayment,
Boolean isAdvanceInvoice) {
Boolean isAdvanceInvoice,
String reason) {
this.uid = uid;
this.creditNoteNumber = creditNoteNumber;
this.creditNoteUid = creditNoteUid;
Expand Down Expand Up @@ -143,6 +146,7 @@ public InvoiceEvent1(
this.refundId = refundId;
this.prepayment = prepayment;
this.isAdvanceInvoice = isAdvanceInvoice;
this.reason = reason;
}

/**
Expand Down Expand Up @@ -759,6 +763,27 @@ public void setIsAdvanceInvoice(Boolean isAdvanceInvoice) {
this.isAdvanceInvoice = isAdvanceInvoice;
}

/**
* Getter for Reason.
* The reason for the void.
* @return Returns the String
*/
@JsonGetter("reason")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getReason() {
return reason;
}

/**
* Setter for Reason.
* The reason for the void.
* @param reason Value for String
*/
@JsonSetter("reason")
public void setReason(String reason) {
this.reason = reason;
}

/**
* Converts this InvoiceEvent1 into string format.
* @return String representation of this class
Expand All @@ -778,7 +803,8 @@ public String toString() {
+ dueAmount + ", totalAmount=" + totalAmount + ", applyCredit=" + applyCredit
+ ", creditNoteAttributes=" + creditNoteAttributes + ", paymentId=" + paymentId
+ ", refundAmount=" + refundAmount + ", refundId=" + refundId + ", prepayment="
+ prepayment + ", isAdvanceInvoice=" + isAdvanceInvoice + "]";
+ prepayment + ", isAdvanceInvoice=" + isAdvanceInvoice + ", reason=" + reason
+ "]";
}

/**
Expand Down Expand Up @@ -815,7 +841,8 @@ public Builder toBuilder() {
.refundAmount(getRefundAmount())
.refundId(getRefundId())
.prepayment(getPrepayment())
.isAdvanceInvoice(getIsAdvanceInvoice());
.isAdvanceInvoice(getIsAdvanceInvoice())
.reason(getReason());
return builder;
}

Expand Down Expand Up @@ -851,6 +878,7 @@ public static class Builder {
private Integer refundId;
private Boolean prepayment;
private Boolean isAdvanceInvoice;
private String reason;



Expand Down Expand Up @@ -1134,6 +1162,16 @@ public Builder isAdvanceInvoice(Boolean isAdvanceInvoice) {
return this;
}

/**
* Setter for reason.
* @param reason String value for reason.
* @return Builder
*/
public Builder reason(String reason) {
this.reason = reason;
return this;
}

/**
* Builds a new {@link InvoiceEvent1} object using the set fields.
* @return {@link InvoiceEvent1}
Expand All @@ -1144,7 +1182,7 @@ public InvoiceEvent1 build() {
appliedCreditNotes, debitNoteNumber, debitNoteUid, paymentMethod, transactionId,
fromCollectionMethod, toCollectionMethod, consolidationLevel, fromStatus,
toStatus, dueAmount, totalAmount, applyCredit, creditNoteAttributes, paymentId,
refundAmount, refundId, prepayment, isAdvanceInvoice);
refundAmount, refundId, prepayment, isAdvanceInvoice, reason);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class SubscriptionGroupBankAccount {
*/
public SubscriptionGroupBankAccount() {
bankAccountType = BankAccountType.CHECKING;
paymentType = PaymentType.CREDIT_CARD;
}

/**
Expand Down Expand Up @@ -479,7 +478,7 @@ public static class Builder {
private String bankBranchCode;
private BankAccountType bankAccountType = BankAccountType.CHECKING;
private BankAccountHolderType bankAccountHolderType;
private PaymentType paymentType = PaymentType.CREDIT_CARD;
private PaymentType paymentType;
private String billingAddress;
private String billingCity;
private String billingState;
Expand Down
Loading

0 comments on commit fa50ad9

Please sign in to comment.