Skip to content

Commit

Permalink
Release 1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 22, 2024
1 parent 4466fc1 commit aee21c3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
version = "1.4.2"
version = "1.4.3"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "1.4.2",
"X-Fern-SDK-Version": "1.4.3",
}
headers["x-api-key"] = self.api_key
return headers
Expand Down
4 changes: 2 additions & 2 deletions src/flagright/resources/business_users/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create(self, *, request: Business) -> BusinessUsersCreateResponse:
### Payload
Each consumer Business entity needs three mandatory fields:
Each business user needs three mandatory fields:
- `userId` - Unique identifier for the user
- `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
Expand Down Expand Up @@ -446,7 +446,7 @@ async def create(self, *, request: Business) -> BusinessUsersCreateResponse:
### Payload
Each consumer Business entity needs three mandatory fields:
Each business user needs three mandatory fields:
- `userId` - Unique identifier for the user
- `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
Expand Down
4 changes: 2 additions & 2 deletions src/flagright/resources/consumer_users/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create(self, *, request: User) -> ConsumerUsersCreateResponse:
### Payload
Each consumer User entity needs three mandatory fields:
Each consumer user needs two mandatory fields:
- `userId` - Unique identifier for the user
- `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
Expand Down Expand Up @@ -277,7 +277,7 @@ async def create(self, *, request: User) -> ConsumerUsersCreateResponse:
### Payload
Each consumer User entity needs three mandatory fields:
Each consumer user needs two mandatory fields:
- `userId` - Unique identifier for the user
- `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
Expand Down
16 changes: 8 additions & 8 deletions src/flagright/resources/transaction_events/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def create(self, *, request: TransactionEvent) -> TransactionEventMonitoringResu
"""
## POST Transaction Events
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](https://docs.flagright.com/guides/overview/entities#transaction-event)
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
- Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](https://docs.flagright.com/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- Update the transaction details, using the `updatedTransactionAttributes` field.
> If you have neither of the above two use cases, you do not need to use transaction events.
Expand Down Expand Up @@ -159,9 +159,9 @@ def get(self, event_id: str) -> TransactionEvent:
"""
### GET Transaction Events
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](https://docs.flagright.com/guides/overview/entities#transaction-event).
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
You can retrieve any transaction event you create using the [POST Transaction Events](https://docs.flagright.com/api-reference/api-reference/transaction-events/create) call.
You can retrieve any transaction event you create using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
Parameters:
- event_id: str. Unique Transaction Identifier
Expand Down Expand Up @@ -202,11 +202,11 @@ async def create(self, *, request: TransactionEvent) -> TransactionEventMonitori
"""
## POST Transaction Events
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](https://docs.flagright.com/guides/overview/entities#transaction-event)
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
- Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](https://docs.flagright.com/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- Update the transaction details, using the `updatedTransactionAttributes` field.
> If you have neither of the above two use cases, you do not need to use transaction events.
Expand Down Expand Up @@ -331,9 +331,9 @@ async def get(self, event_id: str) -> TransactionEvent:
"""
### GET Transaction Events
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](https://docs.flagright.com/guides/overview/entities#transaction-event).
`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
You can retrieve any transaction event you create using the [POST Transaction Events](https://docs.flagright.com/api-reference/api-reference/transaction-events/create) call.
You can retrieve any transaction event you create using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
Parameters:
- event_id: str. Unique Transaction Identifier
Expand Down
28 changes: 14 additions & 14 deletions src/flagright/resources/transactions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ def verify(
"""
## POST Transactions
`/transactions` endpoint allows you to operate on the [Transaction entity.](https://docs.flagright.com/guides/overview/entities#transaction)
`/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
In order to pass the payload of a transaction to Flagright and verify the transaciton, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
### Payload
Here are some of the most used payload fields explained (you can find the full payload [schema below](https://docs.flagright.com/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
- `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
- `timestamp` - UNIX timestamp in _milliseconds_ of when the transaction took place
- `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](https://docs.flagright.com/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](https://docs.flagright.com/api-reference/api-reference/consumer-users/create) or [create a business user](https://docs.flagright.com/api-reference/api-reference/business-users/create) endpoint
- `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](https://docs.flagright.com/api-reference/api-reference/consumer-users/create) or [create a business user](https://docs.flagright.com/api-reference/api-reference/business-users/create) endpoint
- `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- `originAmountDetails` - Details of the amount being sent from the origin
- `destinationAmountDetails` - Details of the amount being received at the destination
- `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
Expand Down Expand Up @@ -171,7 +171,7 @@ def get(self, transaction_id: str) -> TransactionWithRulesResult:
"""
### GET Transactions
`/transactions` endpoint allows you to operate on the [Transaction entity](https://docs.flagright.com/guides/overview/entities#transaction).
`/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
Expand Down Expand Up @@ -220,20 +220,20 @@ async def verify(
"""
## POST Transactions
`/transactions` endpoint allows you to operate on the [Transaction entity.](https://docs.flagright.com/guides/overview/entities#transaction)
`/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
In order to pass the payload of a transaction to Flagright and verify the transaciton, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
### Payload
Here are some of the most used payload fields explained (you can find the full payload [schema below](https://docs.flagright.com/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
- `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
- `timestamp` - UNIX timestamp in _milliseconds_ of when the transaction took place
- `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](https://docs.flagright.com/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](https://docs.flagright.com/api-reference/api-reference/consumer-users/create) or [create a business user](https://docs.flagright.com/api-reference/api-reference/business-users/create) endpoint
- `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](https://docs.flagright.com/api-reference/api-reference/consumer-users/create) or [create a business user](https://docs.flagright.com/api-reference/api-reference/business-users/create) endpoint
- `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- `originAmountDetails` - Details of the amount being sent from the origin
- `destinationAmountDetails` - Details of the amount being received at the destination
- `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
Expand Down Expand Up @@ -351,7 +351,7 @@ async def get(self, transaction_id: str) -> TransactionWithRulesResult:
"""
### GET Transactions
`/transactions` endpoint allows you to operate on the [Transaction entity](https://docs.flagright.com/guides/overview/entities#transaction).
`/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/types/company_general_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CompanyGeneralDetails(pydantic.BaseModel):

legal_name: str = pydantic.Field(alias="legalName", description="Legal name of the company")
business_industry: typing.Optional[typing.List[str]] = pydantic.Field(
alias="businessIndustry", description="The industry the business operates in for a business customer"
alias="businessIndustry", description="The industry in which the business operates for a business customer"
)
main_products_services_sold: typing.Optional[typing.List[str]] = pydantic.Field(
alias="mainProductsServicesSold", description="The key products and services provided by the company"
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/types/company_registration_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CompanyRegistrationDetails(pydantic.BaseModel):
alias="taxIdentifier", description="Tax ID number of the registered entity"
)
legal_entity_type: typing.Optional[str] = pydantic.Field(
alias="legalEntityType", description="Type of legal entity. Ex: Limited Liability"
alias="legalEntityType", description="Type of legal entity, e.g., Limited Liability"
)
date_of_registration: typing.Optional[str] = pydantic.Field(alias="dateOfRegistration")
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
Expand Down

0 comments on commit aee21c3

Please sign in to comment.