-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull request #29: added donate feature toggle changes
Merge in PPCT/carbon-tracker-reference-app from feature/S3035231-DonateFeature_toggle_update to master Squashed commit of the following: commit 8922e467cf97a1c22bb8b678af28df9b90ad8ae8 Author: Srivastava, Ayushee <[email protected]> Date: Mon Jan 23 15:49:26 2023 +0530 S3035231:feat added donate feature toggle changes commit c64d958e83f223c12762eabb394ce654fec48102 Author: Srivastava, Ayushee <[email protected]> Date: Thu Jan 19 16:24:53 2023 +0530 S3035231:feat added donate feature toggle changes
- Loading branch information
Srivastava, Ayushee
authored and
Srivastava, Ayushee
committed
Apr 13, 2023
1 parent
88b878b
commit c069a8a
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,10 @@ paths: | |
Used to enroll users for the Carbon Calculator Experience API so that | ||
they can track the carbon usage for their transactions and and provides | ||
them with an option to donate towards tree plantations. | ||
**Note-** | ||
If the issuer has opted for the Donation feature then the fields - *name, billing address, email, locale, cardholder name, card number, card base currency and card expiry date* fields are **mandatory** in the payload. | ||
operationId: userRegistration | ||
x-mastercard-api-encrypted: true | ||
requestBody: | ||
|
@@ -123,7 +127,7 @@ paths: | |
"400": | ||
$ref: '#/components/responses/UserEnrolmentBadRequestError' | ||
"401": | ||
$ref: '#/components/responses/UserEnrolmentUnauthorisedError' | ||
$ref: '#/components/responses/UpdateUserUnauthorisedError' | ||
"404": | ||
$ref: '#/components/responses/IssuerNotFoundError' | ||
"415": | ||
|
@@ -336,10 +340,7 @@ components: | |
Experience API. | ||
required: | ||
- cardNumber | ||
- billingAddress | ||
- locale | ||
- name | ||
- expiryInfo | ||
- cardBaseCurrency | ||
- cardholderName | ||
|
@@ -963,6 +964,21 @@ components: | |
$ref: '#/components/examples/IssuerSuspendedError' | ||
IssuerTerminatedError: | ||
$ref: '#/components/examples/IssuerTerminatedError' | ||
UpdateUserUnauthorisedError: | ||
description: This response code is returned for unauthorized Issuer and User. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorWrapper' | ||
examples: | ||
IssuerInactiveError: | ||
$ref: '#/components/examples/IssuerInactiveError' | ||
IssuerSuspendedError: | ||
$ref: '#/components/examples/IssuerSuspendedError' | ||
IssuerTerminatedError: | ||
$ref: '#/components/examples/IssuerTerminatedError' | ||
UpdateUserNotAccessible: | ||
$ref: '#/components/examples/UpdateUserNotAccessible' | ||
AggregateCarbonScoreNotFoundError: | ||
description: This response code is returned when a user or Issuer is not present. | ||
content: | ||
|
@@ -1007,6 +1023,7 @@ components: | |
examples: | ||
InvalidUserIdError: | ||
$ref: '#/components/examples/InvalidUserIdError' | ||
|
||
AggregateCarbonScoreBadRequestError: | ||
description: >- | ||
This response code is returned when a request is invalid or data in the | ||
|
@@ -1138,6 +1155,17 @@ components: | |
request. | ||
Recoverable: false | ||
Details: 'Email must be in the format: [email protected]' | ||
UpdateUserNotAccessible: | ||
value: | ||
Errors: | ||
Error: | ||
- Source: CARBON CALCULATOR EXPERIENCE | ||
ReasonCode: UPDATE_USER_NOT_ACCESSIBLE | ||
Description: >- | ||
You do not have permission to access this API. The Donate feature for your bank is disabled. | ||
Recoverable: false | ||
Details: >- | ||
You do not have permission to access this API. The Donate feature for your bank is disabled. | ||
IssuerEmptyRequestBodyError: | ||
value: | ||
Errors: | ||
|