Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 committed Dec 13, 2022
2 parents 1f65472 + 38497f7 commit a8abfbe
Show file tree
Hide file tree
Showing 24 changed files with 315 additions and 140 deletions.
17 changes: 11 additions & 6 deletions buildSrc/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2021, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

import org.gradle.api.JavaVersion
Expand Down
17 changes: 11 additions & 6 deletions buildSrc/src/main/kotlin/ProjectConfiguration.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2022, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

import com.android.build.api.dsl.BaseFlavor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

@file:Suppress("unused")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2022, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2021, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2021, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.data
Expand All @@ -22,8 +27,8 @@ open class StatusResponse(@SerializedName("status") val status: Status) {
@SerializedName("OK")
OK,

@SerializedName("ERROR")
ERROR
@SerializedName("ERROR")
ERROR
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright 2022 Wultra s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error

/**
* Error reported in functions using callback with `Result<T>` type.
*/
class ApiErrorException(
/**
* Error code extracted from the response's error.
*/
val errorCode: ApiErrorCode? = null,
/**
* The detailed message.
*/
message: String? = null,
/**
* The cause of the exception.
*/
cause: Throwable? = null

): Exception(message, cause) {

/**
* Construct exception from existing [ApiError].
*
* @param apiError Instance of [ApiError].
*/
constructor(apiError: ApiError) : this(apiError.error, apiError.e.message, apiError.e)

/**
* Construct exception from another exception. If exception is one from known exceptions,
* then the [errorCode] property is also initialized.
*/
constructor(cause: Throwable) : this(ApiError(cause).error, cause.message, cause)

companion object {
/**
* Wrap any [Throwable] object into [ApiErrorException]. If throwable is already [ApiErrorException]
* then return the object as is.
*/
fun wrap(t: Throwable): ApiErrorException {
return if (t is ApiErrorException) t else ApiErrorException(t)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/*
* Copyright (c) 2020, Wultra s.r.o. (www.wultra.com).
* Copyright 2022 Wultra s.r.o.
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Wultra s.r.o.
* This source code can be used only by the owner of the license.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
*/

package com.wultra.android.powerauth.networking.error
Expand Down
Loading

0 comments on commit a8abfbe

Please sign in to comment.