Skip to content

Commit

Permalink
Merge pull request #1106 from Adyen/automation/release
Browse files Browse the repository at this point in the history
Release v21.1.0
  • Loading branch information
AdyenAutomationBot authored Aug 9, 2023
2 parents b647fae + 0b13155 commit 3f35b25
Show file tree
Hide file tree
Showing 123 changed files with 4,604 additions and 5,492 deletions.
19 changes: 0 additions & 19 deletions .github/scripts/helper.js

This file was deleted.

37 changes: 8 additions & 29 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
name: Github Release

on:
workflow_dispatch:
push:
branches:
- main
workflow_dispatch:
push:
branches:
- main

jobs:
gh_release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
- name: Grab version
uses: actions/github-script@v6
id: release
with:
script: |
const helper = require('./.github/scripts/helper.js')
core.setOutput('version', helper.pomJavaVersion())
- name: Create new release
env:
GH_TOKEN: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
run: |
gh release create v${{steps.release.outputs.version}} \
--title 'Adyen Java API Library v${{steps.release.outputs.version}}' \
--generate-notes --target main
- name: Update develop branch
run: |
git checkout develop
git merge main
git push origin develop
uses: Adyen/adyen-node-api-library/.github/workflows/lib-gh-release.yml@develop
with:
project-name: Java
secrets: inherit
69 changes: 14 additions & 55 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,23 @@
name: Release request

on:
workflow_dispatch:
push:
branches:
- develop
workflow_dispatch:
inputs:
prerelease:
required: false
type: boolean
default: false
description: "This release will be labeled as non-production ready"
push:
branches:
- develop

jobs:
release:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Reset promotion branch
run: |
git fetch origin develop:develop
git reset --hard develop
- name: Get the release script
run: |
wget https://raw.githubusercontent.com/Adyen/adyen-node-api-library/develop/.github/scripts/release.js -P ./.github/scripts
- name: Prepare release request
uses: actions/github-script@v6
id: release
with:
script: |
const helper = require('./.github/scripts/helper.js')
const release = require('./.github/scripts/release.js')
const options = { github, context, core, getCurrentVersion: helper.pomJavaVersion };
await release.bump(options);
- name: Bump version
uses: actions/github-script@v6
with:
script: |
const helper = require('./.github/scripts/helper.js')
await helper.updateJavaVersion("${{steps.release.outputs.nextVersion}}");
- name: Delete the release script
run: |
rm -f ./.github/scripts/release.js
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
branch: automation/release
title: Release v${{steps.release.outputs.nextVersion}}
body: |
Merged pull requests to be released:
${{steps.release.outputs.changelog}}
commit-message: "chore(release): bump to ${{steps.release.outputs.nextVersion}}"
delete-branch: true
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: merge
uses: Adyen/adyen-node-api-library/.github/workflows/lib-release.yml@develop
with:
prerelease: ${{ inputs.prerelease || false }}
secrets: inherit
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,13 @@ clean:
git checkout $(models)
git clean -f -d $(models)

## Releases

.PHONY: templates models $(services)
version:
perl -lne 'print "currentVersion=$$1" if /version>(.+?)<\/version/' < pom.xml | head -1 >> "$$GITHUB_OUTPUT"

version_files:=pom.xml src/main/java/com/adyen/Client.java README.md
bump:
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' $(version_files)

.PHONY: templates models $(services) version bump
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can use Maven and add this dependency to your project's POM:
<dependency>
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<version>21.0.0</version>
<version>21.1.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<packaging>jar</packaging>
<version>21.0.0</version>
<version>21.1.0</version>
<name>Adyen Java API Library</name>
<description>Adyen API Client Library for Java</description>
<url>https://github.com/adyen/adyen-java-api-library</url>
Expand Down Expand Up @@ -248,7 +248,7 @@
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<scope>test</scope>
</dependency>
<!-- Generated model annotations -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/adyen/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Client {
private Config config;
public static final String ENDPOINT_CERT_LIVE = "https://palcert-live.adyen.com";
public static final String LIB_NAME = "adyen-java-api-library";
public static final String LIB_VERSION = "21.0.0";
public static final String LIB_VERSION = "21.1.0";
public static final String CHECKOUT_ENDPOINT_CERT_LIVE = "https://checkoutcert-live-%s.adyen.com/checkout";
public static final String TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
public static final String TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";
Expand Down
37 changes: 34 additions & 3 deletions src/main/java/com/adyen/model/balanceplatform/AccountHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
AccountHolder.JSON_PROPERTY_ID,
AccountHolder.JSON_PROPERTY_LEGAL_ENTITY_ID,
AccountHolder.JSON_PROPERTY_METADATA,
AccountHolder.JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE,
AccountHolder.JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT,
AccountHolder.JSON_PROPERTY_REFERENCE,
AccountHolder.JSON_PROPERTY_STATUS,
Expand Down Expand Up @@ -74,6 +75,9 @@ public class AccountHolder {
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map<String, String> metadata = null;

public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE = "migratedAccountHolderCode";
private String migratedAccountHolderCode;

public static final String JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT = "primaryBalanceAccount";
private String primaryBalanceAccount;

Expand Down Expand Up @@ -303,10 +307,10 @@ public AccountHolder putMetadataItem(String key, String metadataItem) {
}

/**
* A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. &gt; Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.
* A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. &gt; Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.
* @return metadata
**/
@ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.")
@ApiModelProperty(value = "A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.")
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -322,6 +326,31 @@ public void setMetadata(Map<String, String> metadata) {
}


public AccountHolder migratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
return this;
}

/**
* The unique identifier of the migrated account holder in the classic integration.
* @return migratedAccountHolderCode
**/
@ApiModelProperty(value = "The unique identifier of the migrated account holder in the classic integration.")
@JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getMigratedAccountHolderCode() {
return migratedAccountHolderCode;
}


@JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMigratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
}


public AccountHolder primaryBalanceAccount(String primaryBalanceAccount) {
this.primaryBalanceAccount = primaryBalanceAccount;
return this;
Expand Down Expand Up @@ -474,6 +503,7 @@ public boolean equals(Object o) {
Objects.equals(this.id, accountHolder.id) &&
Objects.equals(this.legalEntityId, accountHolder.legalEntityId) &&
Objects.equals(this.metadata, accountHolder.metadata) &&
Objects.equals(this.migratedAccountHolderCode, accountHolder.migratedAccountHolderCode) &&
Objects.equals(this.primaryBalanceAccount, accountHolder.primaryBalanceAccount) &&
Objects.equals(this.reference, accountHolder.reference) &&
Objects.equals(this.status, accountHolder.status) &&
Expand All @@ -483,7 +513,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(balancePlatform, capabilities, contactDetails, description, id, legalEntityId, metadata, primaryBalanceAccount, reference, status, timeZone, verificationDeadlines);
return Objects.hash(balancePlatform, capabilities, contactDetails, description, id, legalEntityId, metadata, migratedAccountHolderCode, primaryBalanceAccount, reference, status, timeZone, verificationDeadlines);
}

@Override
Expand All @@ -497,6 +527,7 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" migratedAccountHolderCode: ").append(toIndentedString(migratedAccountHolderCode)).append("\n");
sb.append(" primaryBalanceAccount: ").append(toIndentedString(primaryBalanceAccount)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
AccountHolderInfo.JSON_PROPERTY_DESCRIPTION,
AccountHolderInfo.JSON_PROPERTY_LEGAL_ENTITY_ID,
AccountHolderInfo.JSON_PROPERTY_METADATA,
AccountHolderInfo.JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE,
AccountHolderInfo.JSON_PROPERTY_REFERENCE,
AccountHolderInfo.JSON_PROPERTY_TIME_ZONE
})
Expand All @@ -65,6 +66,9 @@ public class AccountHolderInfo {
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map<String, String> metadata = null;

public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE = "migratedAccountHolderCode";
private String migratedAccountHolderCode;

public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;

Expand Down Expand Up @@ -221,10 +225,10 @@ public AccountHolderInfo putMetadataItem(String key, String metadataItem) {
}

/**
* A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. &gt; Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.
* A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. &gt; Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.
* @return metadata
**/
@ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.")
@ApiModelProperty(value = "A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.")
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -240,6 +244,31 @@ public void setMetadata(Map<String, String> metadata) {
}


public AccountHolderInfo migratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
return this;
}

/**
* The unique identifier of the migrated account holder in the classic integration.
* @return migratedAccountHolderCode
**/
@ApiModelProperty(value = "The unique identifier of the migrated account holder in the classic integration.")
@JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getMigratedAccountHolderCode() {
return migratedAccountHolderCode;
}


@JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMigratedAccountHolderCode(String migratedAccountHolderCode) {
this.migratedAccountHolderCode = migratedAccountHolderCode;
}


public AccountHolderInfo reference(String reference) {
this.reference = reference;
return this;
Expand Down Expand Up @@ -308,13 +337,14 @@ public boolean equals(Object o) {
Objects.equals(this.description, accountHolderInfo.description) &&
Objects.equals(this.legalEntityId, accountHolderInfo.legalEntityId) &&
Objects.equals(this.metadata, accountHolderInfo.metadata) &&
Objects.equals(this.migratedAccountHolderCode, accountHolderInfo.migratedAccountHolderCode) &&
Objects.equals(this.reference, accountHolderInfo.reference) &&
Objects.equals(this.timeZone, accountHolderInfo.timeZone);
}

@Override
public int hashCode() {
return Objects.hash(balancePlatform, capabilities, contactDetails, description, legalEntityId, metadata, reference, timeZone);
return Objects.hash(balancePlatform, capabilities, contactDetails, description, legalEntityId, metadata, migratedAccountHolderCode, reference, timeZone);
}

@Override
Expand All @@ -327,6 +357,7 @@ public String toString() {
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" migratedAccountHolderCode: ").append(toIndentedString(migratedAccountHolderCode)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n");
sb.append("}");
Expand Down
Loading

0 comments on commit 3f35b25

Please sign in to comment.