diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d42f326..48967d2 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: dff72156-4bdf-460f-b5b3-0759c9c474fb management: - docChecksum: 23b71b6873e3cd10fe3efd3d45af41e1 + docChecksum: c3800b8a888fa4e6c6e677c573c8de90 docVersion: 1.0.0 speakeasyVersion: 1.556.2 generationVersion: 2.621.3 - releaseVersion: 1.0.0-beta.18 - configChecksum: feca478965784e3a78a821e606e5fe22 + releaseVersion: 1.0.0-beta.19 + configChecksum: 40ce241e85c49557c7116ca6db10efde repoURL: https://github.com/gr4vy/gr4vy-csharp.git published: true features: @@ -351,6 +351,7 @@ generatedFiles: - docs/sdks/paymentservicetokens/README.md - docs/sdks/payouts/README.md - docs/sdks/refunds/README.md + - docs/sdks/reportexecutions/README.md - docs/sdks/reports/README.md - docs/sdks/sessions/README.md - docs/sdks/settlements/README.md @@ -677,6 +678,7 @@ generatedFiles: - src/Gr4vy/PaymentServices.cs - src/Gr4vy/Payouts.cs - src/Gr4vy/Refunds.cs + - src/Gr4vy/ReportExecutions.cs - src/Gr4vy/Reports.cs - src/Gr4vy/SDKConfig.cs - src/Gr4vy/Sessions.cs diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fb7f1a3..5291a10 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -17,7 +17,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false csharp: - version: 1.0.0-beta.18 + version: 1.0.0-beta.19 additionalDependencies: - package: System.IdentityModel.Tokens.Jwt version: 8.9.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b7cee82..32cc1d3 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -8,20 +8,20 @@ sources: - latest openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:2c9c5b65ad0b0332f453b029150ad582071b3ca5ef2acfa33f5ff22f9ca389bb - sourceBlobDigest: sha256:c0b53e03cf56d3fad6052f2385939060c0566a519808392fc5265bdf2bd39a4e + sourceRevisionDigest: sha256:9f453a0ed2d532e5939c6a0c480b944a743153a615e389cc3c0b0ac8451ea2fa + sourceBlobDigest: sha256:0d636c48b27d36bcf41dfb8d3178df7ca3be2bd8d34f960b0800f777dd125bf3 tags: - latest - - speakeasy-sdk-regen-1749145531 + - speakeasy-sdk-regen-1749154292 - 1.0.0 targets: csharp: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:2c9c5b65ad0b0332f453b029150ad582071b3ca5ef2acfa33f5ff22f9ca389bb - sourceBlobDigest: sha256:c0b53e03cf56d3fad6052f2385939060c0566a519808392fc5265bdf2bd39a4e + sourceRevisionDigest: sha256:9f453a0ed2d532e5939c6a0c480b944a743153a615e389cc3c0b0ac8451ea2fa + sourceBlobDigest: sha256:0d636c48b27d36bcf41dfb8d3178df7ca3be2bd8d34f960b0800f777dd125bf3 codeSamplesNamespace: openapi-csharp-code-samples - codeSamplesRevisionDigest: sha256:f7e39346ba20082c94a859d546a93dc73e2f7bac1f9999d0ac135607b34885fb + codeSamplesRevisionDigest: sha256:f491652ce1fcf10c5cc04c64d03187ade8dd2f852ce2daca930fe2042b1566ba workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 5c9acf3..6ca2b39 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,10 @@ catch(ArgumentException ex) { * [Get](docs/sdks/refunds/README.md#get) - Get refund +### [ReportExecutions](docs/sdks/reportexecutions/README.md) + +* [List](docs/sdks/reportexecutions/README.md#list) - List executed reports + ### [Reports](docs/sdks/reports/README.md) * [List](docs/sdks/reports/README.md#list) - List configured reports @@ -356,7 +360,6 @@ catch(ArgumentException ex) { * [List](docs/sdks/executions/README.md#list) - List executions for report * [Url](docs/sdks/executions/README.md#url) - Create URL for executed report -* [All](docs/sdks/executions/README.md#all) - List executed reports * [Get](docs/sdks/executions/README.md#get) - Get executed report ### [Transactions](docs/sdks/transactions/README.md) diff --git a/RELEASES.md b/RELEASES.md index 17b4219..5fc8a8e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -158,4 +158,14 @@ Based on: ### Generated - [csharp v1.0.0-beta.18] . ### Releases -- [NuGet v1.0.0-beta.18] https://www.nuget.org/packages/Gr4vy/1.0.0-beta.18 - . \ No newline at end of file +- [NuGet v1.0.0-beta.18] https://www.nuget.org/packages/Gr4vy/1.0.0-beta.18 - . + +## 2025-06-05 20:11:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.556.2 (2.621.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v1.0.0-beta.19] . +### Releases +- [NuGet v1.0.0-beta.19] https://www.nuget.org/packages/Gr4vy/1.0.0-beta.19 - . \ No newline at end of file diff --git a/docs/Models/Components/GiftCardTokenTransactionCreate.md b/docs/Models/Components/GiftCardTokenTransactionCreate.md index 2d5e813..2c17379 100644 --- a/docs/Models/Components/GiftCardTokenTransactionCreate.md +++ b/docs/Models/Components/GiftCardTokenTransactionCreate.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Id` | *string* | :heavy_check_mark: | The ID for the gift card to charge. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | -| `Amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction to charge against the gift card, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. | 1299 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `Id` | *string* | :heavy_check_mark: | The ID for the gift card to charge. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | +| `Amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction to charge against the gift card, in the smallest currency unit (for example, cents or pence). | 1299 | \ No newline at end of file diff --git a/docs/Models/Components/GiftCardTransactionCreate.md b/docs/Models/Components/GiftCardTransactionCreate.md index c1b0cdd..628db53 100644 --- a/docs/Models/Components/GiftCardTransactionCreate.md +++ b/docs/Models/Components/GiftCardTransactionCreate.md @@ -5,8 +5,8 @@ Create a charge against a gift card ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Number` | *string* | :heavy_check_mark: | The 16-19 digit number for the gift card. | 4123455541234561234 | -| `Pin` | *string* | :heavy_check_mark: | The PIN for this gift card. | 1234 | -| `Amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction to charge against the gift card, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. | 1299 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `Number` | *string* | :heavy_check_mark: | The 16-19 digit number for the gift card. | 4123455541234561234 | +| `Pin` | *string* | :heavy_check_mark: | The PIN for this gift card. | 1234 | +| `Amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction to charge against the gift card, in the smallest currency unit (for example, cents or pence). | 1299 | \ No newline at end of file diff --git a/docs/Models/Components/Refund.md b/docs/Models/Components/Refund.md index f0e9ae6..c24acf3 100644 --- a/docs/Models/Components/Refund.md +++ b/docs/Models/Components/Refund.md @@ -6,12 +6,12 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Type` | *string* | :heavy_minus_sign: | Always `refund`. | refund | -| `Id` | *string* | :heavy_check_mark: | The ID for the refund. | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | +| `Id` | *string* | :heavy_check_mark: | The unique identifier for the refund. | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | | `TransactionId` | *string* | :heavy_check_mark: | The ID of the transaction associated with this refund. | 7099948d-7286-47e4-aad8-b68f7eb44591 | | `PaymentServiceRefundId` | *string* | :heavy_minus_sign: | The payment service's unique ID for the refund. | refund_xYqd43gySMtori | | `Status` | *string* | :heavy_check_mark: | N/A | | -| `Currency` | *string* | :heavy_check_mark: | The currency code for this refund. Will always match that of the associated transaction. | EUR | -| `Amount` | *long* | :heavy_check_mark: | The amount requested for this refund. | 1299 | +| `Currency` | *string* | :heavy_check_mark: | The ISO 4217 currency code for this refund. Will always match that of the associated transaction. | EUR | +| `Amount` | *long* | :heavy_check_mark: | The amount of this refund, in the smallest currency unit (for example, cents or pence). | 1299 | | `Reason` | *string* | :heavy_minus_sign: | The reason for this refund. Could be a multiline string. | Refund due to user request. | | `TargetType` | *string* | :heavy_check_mark: | N/A | | | `TargetId` | *string* | :heavy_minus_sign: | The optional ID of the instrument that was refunded. This may be `null` if the instrument was not stored. | 07e70d14-a0c0-4ff5-bd4a-509959af0e4d | diff --git a/docs/Models/Components/Settlement.md b/docs/Models/Components/Settlement.md index ce31ac1..2c9efab 100644 --- a/docs/Models/Components/Settlement.md +++ b/docs/Models/Components/Settlement.md @@ -10,10 +10,10 @@ A settlement record for a transaction. | `Type` | *string* | :heavy_minus_sign: | Always 'settlement'. | settlement | | `Id` | *string* | :heavy_check_mark: | The unique identifier for the settlement. | b1e2c3d4-5678-1234-9abc-1234567890ab | | `MerchantAccountId` | *string* | :heavy_check_mark: | The merchant account this settlement belongs to. | default | -| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | Date and time the settlement was created. | 2024-06-01T12:00:00.000Z | -| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | Date and time the settlement was last updated. | 2024-06-01T12:00:00.000Z | -| `PostedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | Date and time the settlement was posted. | 2024-06-01T12:00:00.000Z | -| `IngestedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | Date and time the settlement was ingested. | 2024-06-01T12:00:00.000Z | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time the settlement was created, in ISO 8601 format. | 2024-06-01T12:00:00.000Z | +| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time the settlement was last updated, in ISO 8601 format. | 2024-06-01T12:00:00.000Z | +| `PostedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time the settlement was posted, in ISO 8601 format. | 2024-06-01T12:00:00.000Z | +| `IngestedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time the settlement was ingested, in ISO 8601 format. | 2024-06-01T12:00:00.000Z | | `Currency` | *string* | :heavy_check_mark: | ISO 4217 currency code for the settlement. | EUR | | `Amount` | *long* | :heavy_check_mark: | The total settled amount in the smallest currency unit (e.g. cents). | 1100 | | `ExchangeRate` | *double* | :heavy_minus_sign: | The exchange rate used for settlement, if applicable. | 1 | diff --git a/docs/Models/Components/Transaction.md b/docs/Models/Components/Transaction.md index 9716cf0..d3aa321 100644 --- a/docs/Models/Components/Transaction.md +++ b/docs/Models/Components/Transaction.md @@ -15,12 +15,12 @@ A full transaction resource. | `Amount` | *long* | :heavy_check_mark: | The total amount for this transaction across all funding sources including gift cards. | 1299 | | `Status` | *string* | :heavy_check_mark: | N/A | | | `AuthorizedAmount` | *long* | :heavy_check_mark: | The amount for this transaction that has been authorized for the `payment_method`. This can be less than the `amount` if gift cards were used. | 1299 | -| `CapturedAmount` | *long* | :heavy_check_mark: | The captured amount for this transaction. This can be the full value of the `authorized_amount` or less. | 1299 | -| `RefundedAmount` | *long* | :heavy_check_mark: | The refunded amount for this transaction. This can be the full value of the `captured_amount` or less. | 1299 | -| `SettledCurrency` | *string* | :heavy_minus_sign: | The currency of this transaction's settlement in ISO 4217 three-letter code format. | USD | -| `SettledAmount` | *long* | :heavy_check_mark: | The net amount settled for this transaction. | 1100 | +| `CapturedAmount` | *long* | :heavy_check_mark: | The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `authorized_amount` or less. | 1299 | +| `RefundedAmount` | *long* | :heavy_check_mark: | The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `captured_amount` or less. | 1299 | +| `SettledCurrency` | *string* | :heavy_minus_sign: | The ISO 4217 currency code of this transaction's settlement. | USD | +| `SettledAmount` | *long* | :heavy_check_mark: | The net amount settled for this transaction, in the smallest currency unit (for example, cents or pence). | 1100 | | `Settled` | *bool* | :heavy_check_mark: | Indicates whether this transaction has been settled. | true | -| `Country` | *string* | :heavy_minus_sign: | The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction. | US | +| `Country` | *string* | :heavy_minus_sign: | The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing. | US | | `ExternalIdentifier` | *string* | :heavy_minus_sign: | An external identifier that can be used to match the transaction against your own records. | transaction-12345 | | `Intent` | *string* | :heavy_check_mark: | N/A | | | `PaymentMethod` | [TransactionPaymentMethod](../../Models/Components/TransactionPaymentMethod.md) | :heavy_minus_sign: | The payment method used for this transaction. | | @@ -36,8 +36,8 @@ A full transaction resource. | `CheckoutSessionId` | *string* | :heavy_minus_sign: | The identifier for the checkout session this transaction is associated with. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | | `GiftCardRedemptions` | List<[GiftCardRedemption](../../Models/Components/GiftCardRedemption.md)> | :heavy_check_mark: | The gift cards redeemed for this transaction. | | | `GiftCardService` | [GiftCardService](../../Models/Components/GiftCardService.md) | :heavy_minus_sign: | The gift card service used for this transaction. | | -| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date this buyer was created at. | 2013-07-16T19:23:00.000+00:00 | -| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date this buyer was last updated at. | 2013-07-16T19:23:00.000+00:00 | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time when the transaction was created, in ISO 8601 format. | 2013-07-16T19:23:00.000+00:00 | +| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time when the transaction was last updated, in ISO 8601 format. | 2013-07-16T19:23:00.000+00:00 | | `Airline` | [Airline](../../Models/Components/Airline.md) | :heavy_minus_sign: | Contains information about an airline travel, if applicable. | | | `AuthResponseCode` | *string* | :heavy_minus_sign: | This is the response description received from the processor. | 00 | | `AvsResponseCode` | *string* | :heavy_minus_sign: | The response code received from the payment service for the Address Verification Check (AVS). This code is mapped to a standardized Gr4vy AVS response code. | match | diff --git a/docs/Models/Components/TransactionCapture.md b/docs/Models/Components/TransactionCapture.md index 8dff533..8e8e856 100644 --- a/docs/Models/Components/TransactionCapture.md +++ b/docs/Models/Components/TransactionCapture.md @@ -1,11 +1,11 @@ # TransactionCapture -Request body for capturing an authorized transaction +Request body for capturing an authorized transaction. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `Amount` | *long* | :heavy_minus_sign: | The amount to capture. This normally needs to be equal or less than the authorized amount, unless over-capture is available. | 1299 | -| `Airline` | [Airline](../../Models/Components/Airline.md) | :heavy_minus_sign: | The airline data to submit to the payment service during the capture call. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Amount` | *long* | :heavy_minus_sign: | The amount to capture, in the smallest currency unit (e.g., cents). This must be less than or equal to the authorized amount, unless over-capture is available. | 1299 | +| `Airline` | [Airline](../../Models/Components/Airline.md) | :heavy_minus_sign: | The airline data to submit to the payment service during the capture call. | | \ No newline at end of file diff --git a/docs/Models/Components/TransactionCreate.md b/docs/Models/Components/TransactionCreate.md index 3e6a4fb..d2c1368 100644 --- a/docs/Models/Components/TransactionCreate.md +++ b/docs/Models/Components/TransactionCreate.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Amount` | *long* | :heavy_check_mark: | The monetary amount for this transaction, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. If the `intent` is set to `capture`, an amount greater than zero must be supplied. All gift card amounts are subtracted from this amount before the remainder is charged to the provided `payment_method`. | 1299 | -| `Currency` | *string* | :heavy_check_mark: | A supported ISO-4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. | EUR | +| `Currency` | *string* | :heavy_check_mark: | A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. | EUR | | `Country` | *string* | :heavy_minus_sign: | The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly. | US | | `PaymentMethod` | [TransactionCreatePaymentMethod](../../Models/Components/TransactionCreatePaymentMethod.md) | :heavy_minus_sign: | The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added. | | | `Buyer` | [GuestBuyerInput](../../Models/Components/GuestBuyerInput.md) | :heavy_minus_sign: | Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used. | | diff --git a/docs/Models/Components/TransactionRefundCreate.md b/docs/Models/Components/TransactionRefundCreate.md index eb5ce8d..6856a52 100644 --- a/docs/Models/Components/TransactionRefundCreate.md +++ b/docs/Models/Components/TransactionRefundCreate.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `Amount` | *long* | :heavy_minus_sign: | The amount requested to refund. If omitted, a full refund will be requested. | 1299 | +| `Amount` | *long* | :heavy_minus_sign: | The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested. | 1299 | | `TargetType` | *string* | :heavy_minus_sign: | N/A | | | `TargetId` | *string* | :heavy_minus_sign: | The optional ID of the instrument to refund for. This is only required when the `target_type` is set to `gift-card-redemption`. | 7a6c366d-9205-45ab-8021-0d9ee37f20f2 | | `Reason` | *string* | :heavy_minus_sign: | An optional reason to attach extra context to the refund request. | Refund due to user request. | diff --git a/docs/Models/Components/TransactionSummary.md b/docs/Models/Components/TransactionSummary.md index 2fcf6c5..6192bbb 100644 --- a/docs/Models/Components/TransactionSummary.md +++ b/docs/Models/Components/TransactionSummary.md @@ -15,12 +15,12 @@ A transaction, summarised | `Amount` | *long* | :heavy_check_mark: | The total amount for this transaction across all funding sources including gift cards. | 1299 | | `Status` | *string* | :heavy_check_mark: | N/A | | | `AuthorizedAmount` | *long* | :heavy_check_mark: | The amount for this transaction that has been authorized for the `payment_method`. This can be less than the `amount` if gift cards were used. | 1299 | -| `CapturedAmount` | *long* | :heavy_check_mark: | The captured amount for this transaction. This can be the full value of the `authorized_amount` or less. | 1299 | -| `RefundedAmount` | *long* | :heavy_check_mark: | The refunded amount for this transaction. This can be the full value of the `captured_amount` or less. | 1299 | -| `SettledCurrency` | *string* | :heavy_minus_sign: | The currency of this transaction's settlement in ISO 4217 three-letter code format. | USD | -| `SettledAmount` | *long* | :heavy_check_mark: | The net amount settled for this transaction. | 1100 | +| `CapturedAmount` | *long* | :heavy_check_mark: | The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `authorized_amount` or less. | 1299 | +| `RefundedAmount` | *long* | :heavy_check_mark: | The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `captured_amount` or less. | 1299 | +| `SettledCurrency` | *string* | :heavy_minus_sign: | The ISO 4217 currency code of this transaction's settlement. | USD | +| `SettledAmount` | *long* | :heavy_check_mark: | The net amount settled for this transaction, in the smallest currency unit (for example, cents or pence). | 1100 | | `Settled` | *bool* | :heavy_check_mark: | Indicates whether this transaction has been settled. | true | -| `Country` | *string* | :heavy_minus_sign: | The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction. | US | +| `Country` | *string* | :heavy_minus_sign: | The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing. | US | | `ExternalIdentifier` | *string* | :heavy_minus_sign: | An external identifier that can be used to match the transaction against your own records. | transaction-12345 | | `Intent` | *string* | :heavy_check_mark: | N/A | | | `PaymentMethod` | [TransactionPaymentMethod](../../Models/Components/TransactionPaymentMethod.md) | :heavy_minus_sign: | The payment method used for this transaction. | | @@ -36,5 +36,5 @@ A transaction, summarised | `CheckoutSessionId` | *string* | :heavy_minus_sign: | The identifier for the checkout session this transaction is associated with. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | | `GiftCardRedemptions` | List<[GiftCardRedemption](../../Models/Components/GiftCardRedemption.md)> | :heavy_check_mark: | The gift cards redeemed for this transaction. | | | `GiftCardService` | [GiftCardService](../../Models/Components/GiftCardService.md) | :heavy_minus_sign: | The gift card service used for this transaction. | | -| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date this buyer was created at. | 2013-07-16T19:23:00.000+00:00 | -| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date this buyer was last updated at. | 2013-07-16T19:23:00.000+00:00 | \ No newline at end of file +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time when the transaction was created, in ISO 8601 format. | 2013-07-16T19:23:00.000+00:00 | +| `UpdatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | The date and time when the transaction was last updated, in ISO 8601 format. | 2013-07-16T19:23:00.000+00:00 | \ No newline at end of file diff --git a/docs/Models/Requests/ListAllReportExecutionsResponse.md b/docs/Models/Requests/ListAllReportExecutionsResponse.md index 7306802..ebc9768 100644 --- a/docs/Models/Requests/ListAllReportExecutionsResponse.md +++ b/docs/Models/Requests/ListAllReportExecutionsResponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Result` | [ReportExecutions](../../Models/Components/ReportExecutions.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Result` | [Models.Components.ReportExecutions](../../Models/Components/ReportExecutions.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/ListReportExecutionsResponse.md b/docs/Models/Requests/ListReportExecutionsResponse.md index 9cd0e78..ed60f61 100644 --- a/docs/Models/Requests/ListReportExecutionsResponse.md +++ b/docs/Models/Requests/ListReportExecutionsResponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Result` | [ReportExecutions](../../Models/Components/ReportExecutions.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Result` | [Models.Components.ReportExecutions](../../Models/Components/ReportExecutions.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 0c6001a..fc8d47a 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -9,7 +9,7 @@ ## List -Fetch a list of events for a transaction. +Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first. ### Example Usage diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md index 16b8cbc..29c3592 100644 --- a/docs/sdks/executions/README.md +++ b/docs/sdks/executions/README.md @@ -7,7 +7,6 @@ * [List](#list) - List executions for report * [Url](#url) - Create URL for executed report -* [All](#all) - List executed reports * [Get](#get) - Get executed report ## List @@ -123,62 +122,6 @@ var res = await sdk.Reports.Executions.UrlAsync( | Gr4vy.Models.Errors.Error504 | 504 | application/json | | Gr4vy.Models.Errors.APIException | 4XX, 5XX | \*/\* | -## All - -List all executed reports that have been generated. - -### Example Usage - -```csharp -using Gr4vy; -using Gr4vy.Models.Components; -using Gr4vy.Models.Requests; - -var sdk = new Gr4vySDK( - merchantAccountId: "default", - bearerAuth: "" -); - -ListAllReportExecutionsRequest req = new ListAllReportExecutionsRequest() {}; - -ListAllReportExecutionsResponse? res = await sdk.Reports.Executions.AllAsync(req); - -while(res != null) -{ - // handle items - - res = await res.Next!(); -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [ListAllReportExecutionsRequest](../../Models/Requests/ListAllReportExecutionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[ListAllReportExecutionsResponse](../../Models/Requests/ListAllReportExecutionsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| Gr4vy.Models.Errors.Error400 | 400 | application/json | -| Gr4vy.Models.Errors.Error401 | 401 | application/json | -| Gr4vy.Models.Errors.Error403 | 403 | application/json | -| Gr4vy.Models.Errors.Error404 | 404 | application/json | -| Gr4vy.Models.Errors.Error405 | 405 | application/json | -| Gr4vy.Models.Errors.Error409 | 409 | application/json | -| Gr4vy.Models.Errors.HTTPValidationError | 422 | application/json | -| Gr4vy.Models.Errors.Error425 | 425 | application/json | -| Gr4vy.Models.Errors.Error429 | 429 | application/json | -| Gr4vy.Models.Errors.Error500 | 500 | application/json | -| Gr4vy.Models.Errors.Error502 | 502 | application/json | -| Gr4vy.Models.Errors.Error504 | 504 | application/json | -| Gr4vy.Models.Errors.APIException | 4XX, 5XX | \*/\* | - ## Get Fetch a specific executed report. diff --git a/docs/sdks/reportexecutions/README.md b/docs/sdks/reportexecutions/README.md new file mode 100644 index 0000000..9e33317 --- /dev/null +++ b/docs/sdks/reportexecutions/README.md @@ -0,0 +1,64 @@ +# ReportExecutions +(*ReportExecutions*) + +## Overview + +### Available Operations + +* [List](#list) - List executed reports + +## List + +List all executed reports that have been generated. + +### Example Usage + +```csharp +using Gr4vy; +using Gr4vy.Models.Components; +using Gr4vy.Models.Requests; + +var sdk = new Gr4vySDK( + merchantAccountId: "default", + bearerAuth: "" +); + +ListAllReportExecutionsRequest req = new ListAllReportExecutionsRequest() {}; + +ListAllReportExecutionsResponse? res = await sdk.ReportExecutions.ListAsync(req); + +while(res != null) +{ + // handle items + + res = await res.Next!(); +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [ListAllReportExecutionsRequest](../../Models/Requests/ListAllReportExecutionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListAllReportExecutionsResponse](../../Models/Requests/ListAllReportExecutionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| Gr4vy.Models.Errors.Error400 | 400 | application/json | +| Gr4vy.Models.Errors.Error401 | 401 | application/json | +| Gr4vy.Models.Errors.Error403 | 403 | application/json | +| Gr4vy.Models.Errors.Error404 | 404 | application/json | +| Gr4vy.Models.Errors.Error405 | 405 | application/json | +| Gr4vy.Models.Errors.Error409 | 409 | application/json | +| Gr4vy.Models.Errors.HTTPValidationError | 422 | application/json | +| Gr4vy.Models.Errors.Error425 | 425 | application/json | +| Gr4vy.Models.Errors.Error429 | 429 | application/json | +| Gr4vy.Models.Errors.Error500 | 500 | application/json | +| Gr4vy.Models.Errors.Error502 | 502 | application/json | +| Gr4vy.Models.Errors.Error504 | 504 | application/json | +| Gr4vy.Models.Errors.APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index a5a439e..52f5ea4 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -14,7 +14,7 @@ ## List -List all transactions for a specific merchant account sorted by most recently created. +Returns a paginated list of transactions for the merchant account, sorted by most recently updated. You can filter, sort, and search transactions using query parameters. ### Example Usage @@ -136,7 +136,7 @@ while(res != null) ## Create -Create a transaction. +Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported. ### Example Usage @@ -197,7 +197,7 @@ var res = await sdk.Transactions.CreateAsync( ## Get -Fetch a single transaction by its ID. +Retrieve the details of a transaction by its unique identifier. ### Example Usage @@ -246,7 +246,7 @@ var res = await sdk.Transactions.GetAsync(transactionId: "7099948d-7286-47e4-aad ## Capture -Capture a previously authorized transaction. +Captures a previously authorized transaction. You can capture the full or a partial amount, as long as it does not exceed the authorized amount (unless over-capture is enabled). ### Example Usage @@ -299,7 +299,7 @@ var res = await sdk.Transactions.CaptureAsync( ## Void -Void a previously authorized transaction. +Voids a previously authorized transaction. If the transaction was not yet successfully authorized, or was already captured, the void will not be processed. This operation releases the hold on the buyer's funds. Captured transactions can be refunded instead. ### Example Usage @@ -348,7 +348,7 @@ var res = await sdk.Transactions.VoidAsync(transactionId: "7099948d-7286-47e4-aa ## Sync -Fetch the latest status for a transaction. +Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers. ### Example Usage diff --git a/src/Gr4vy/AccountUpdater.cs b/src/Gr4vy/AccountUpdater.cs index 414b7da..2ea47f3 100644 --- a/src/Gr4vy/AccountUpdater.cs +++ b/src/Gr4vy/AccountUpdater.cs @@ -23,7 +23,7 @@ public class AccountUpdater: IAccountUpdater { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IJobs Jobs { get; private set; } diff --git a/src/Gr4vy/All.cs b/src/Gr4vy/All.cs index 72c8236..228b4a7 100644 --- a/src/Gr4vy/All.cs +++ b/src/Gr4vy/All.cs @@ -39,7 +39,7 @@ public class All: IAll { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/AuditLogs.cs b/src/Gr4vy/AuditLogs.cs index 54adeca..e8fd131 100644 --- a/src/Gr4vy/AuditLogs.cs +++ b/src/Gr4vy/AuditLogs.cs @@ -41,7 +41,7 @@ public class AuditLogs: IAuditLogs { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Balances.cs b/src/Gr4vy/Balances.cs index 83d9237..3667473 100644 --- a/src/Gr4vy/Balances.cs +++ b/src/Gr4vy/Balances.cs @@ -39,7 +39,7 @@ public class Balances: IBalances { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Buyers.cs b/src/Gr4vy/Buyers.cs index ab76460..99c3fc9 100644 --- a/src/Gr4vy/Buyers.cs +++ b/src/Gr4vy/Buyers.cs @@ -80,7 +80,7 @@ public class Buyers: IBuyers { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IBuyersPaymentMethods PaymentMethods { get; private set; } diff --git a/src/Gr4vy/BuyersGiftCards.cs b/src/Gr4vy/BuyersGiftCards.cs index 42538d9..15aa673 100644 --- a/src/Gr4vy/BuyersGiftCards.cs +++ b/src/Gr4vy/BuyersGiftCards.cs @@ -39,7 +39,7 @@ public class BuyersGiftCards: IBuyersGiftCards { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/BuyersPaymentMethods.cs b/src/Gr4vy/BuyersPaymentMethods.cs index f66c08f..c946fd2 100644 --- a/src/Gr4vy/BuyersPaymentMethods.cs +++ b/src/Gr4vy/BuyersPaymentMethods.cs @@ -39,7 +39,7 @@ public class BuyersPaymentMethods: IBuyersPaymentMethods { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/CardSchemeDefinitions.cs b/src/Gr4vy/CardSchemeDefinitions.cs index 045958a..a7ce8e5 100644 --- a/src/Gr4vy/CardSchemeDefinitions.cs +++ b/src/Gr4vy/CardSchemeDefinitions.cs @@ -39,7 +39,7 @@ public class CardSchemeDefinitions: ICardSchemeDefinitions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/CheckoutSessions.cs b/src/Gr4vy/CheckoutSessions.cs index b5398e3..c1cc434 100644 --- a/src/Gr4vy/CheckoutSessions.cs +++ b/src/Gr4vy/CheckoutSessions.cs @@ -66,7 +66,7 @@ public class CheckoutSessions: ICheckoutSessions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Cryptogram.cs b/src/Gr4vy/Cryptogram.cs index 8de0c4c..61e0101 100644 --- a/src/Gr4vy/Cryptogram.cs +++ b/src/Gr4vy/Cryptogram.cs @@ -39,7 +39,7 @@ public class Cryptogram: ICryptogram { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/DigitalWallets.cs b/src/Gr4vy/DigitalWallets.cs index b316307..cdfd0cd 100644 --- a/src/Gr4vy/DigitalWallets.cs +++ b/src/Gr4vy/DigitalWallets.cs @@ -77,7 +77,7 @@ public class DigitalWallets: IDigitalWallets { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public ISessions Sessions { get; private set; } diff --git a/src/Gr4vy/Domains.cs b/src/Gr4vy/Domains.cs index 40d4e62..03e0bb6 100644 --- a/src/Gr4vy/Domains.cs +++ b/src/Gr4vy/Domains.cs @@ -48,7 +48,7 @@ public class Domains: IDomains { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Events.cs b/src/Gr4vy/Events.cs index b807c2b..a408f90 100644 --- a/src/Gr4vy/Events.cs +++ b/src/Gr4vy/Events.cs @@ -29,7 +29,7 @@ public interface IEvents /// List transaction events /// /// - /// Fetch a list of events for a transaction. + /// Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first. /// /// Task ListAsync(string transactionId, string? cursor = null, long? limit = 100, string? merchantAccountId = null, RetryConfig? retryConfig = null); @@ -39,7 +39,7 @@ public class Events: IEvents { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Executions.cs b/src/Gr4vy/Executions.cs index 5a59f28..24ad640 100644 --- a/src/Gr4vy/Executions.cs +++ b/src/Gr4vy/Executions.cs @@ -45,15 +45,6 @@ public interface IExecutions /// Task UrlAsync(string reportId, string reportExecutionId, string? merchantAccountId = null); - /// - /// List executed reports - /// - /// - /// List all executed reports that have been generated. - /// - /// - Task AllAsync(ListAllReportExecutionsRequest? request = null, RetryConfig? retryConfig = null); - /// /// Get executed report /// @@ -68,7 +59,7 @@ public class Executions: IExecutions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; @@ -198,7 +189,7 @@ public async Task ListAsync(string reportId, strin { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); var result = obj!; var response = new ListReportExecutionsResponse() { @@ -542,273 +533,6 @@ public async Task UrlAsync(string reportId, string reportExe throw new Models.Errors.APIException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task AllAsync(ListAllReportExecutionsRequest? request = null, RetryConfig? retryConfig = null) - { - request.MerchantAccountId ??= SDKConfiguration.MerchantAccountId; - - string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/report-executions", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); - HeaderSerializer.PopulateHeaders(ref httpRequest, request); - - if (SDKConfiguration.SecuritySource != null) - { - httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); - } - - var hookCtx = new HookContext(SDKConfiguration, baseUrl, "list_all_report_executions", new List { }, SDKConfiguration.SecuritySource); - - httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); - if (retryConfig == null) - { - if (this.SDKConfiguration.RetryConfig != null) - { - retryConfig = this.SDKConfiguration.RetryConfig; - } - else - { - var backoff = new BackoffStrategy( - initialIntervalMs: 200L, - maxIntervalMs: 200L, - maxElapsedTimeMs: 1000L, - exponent: 1 - ); - retryConfig = new RetryConfig( - strategy: RetryConfig.RetryStrategy.BACKOFF, - backoff: backoff, - retryConnectionErrors: true - ); - } - } - - List statusCodes = new List - { - "5XX", - }; - - Func> retrySend = async () => - { - var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); - return await SDKConfiguration.Client.SendAsync(_httpRequest); - }; - var retries = new Gr4vy.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); - - HttpResponseMessage httpResponse; - try - { - httpResponse = await retries.Run(); - int _statusCode = (int)httpResponse.StatusCode; - - if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 405 || _statusCode == 409 || _statusCode == 422 || _statusCode == 425 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 502 || _statusCode == 504 || _statusCode >= 500 && _statusCode < 600) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - } - } - catch (Exception error) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - else - { - throw; - } - } - - httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); - - - Func> nextFunc = async delegate() - { - var body = JObject.Parse(await httpResponse.Content.ReadAsStringAsync()); - var nextCursorToken = body.SelectToken("$.next_cursor"); - - if(nextCursorToken == null) - { - return null; - } - var nextCursor = nextCursorToken.Value(); - if (nextCursor == null) - { - return null; - } - - var newRequest = new ListAllReportExecutionsRequest - { - Cursor = nextCursor, - Limit = request?.Limit, - ReportName = request?.ReportName, - CreatedAtLte = request?.CreatedAtLte, - CreatedAtGte = request?.CreatedAtGte, - Status = request?.Status, - CreatorId = request?.CreatorId, - MerchantAccountId = request?.MerchantAccountId - }; - - return await AllAsync ( - request: newRequest, - retryConfig: retryConfig - ); - }; - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - int responseStatusCode = (int)httpResponse.StatusCode; - if(responseStatusCode == 200) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - var result = obj!; - var response = new ListAllReportExecutionsResponse() - { - Result = result, - Next = nextFunc - }; - return response; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 400) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 401) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 403) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 404) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 405) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 409) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 422) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 425) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 429) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 500) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 502) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 504) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); - throw obj!; - } - - throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode >= 400 && responseStatusCode < 500) - { - throw new Models.Errors.APIException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode >= 500 && responseStatusCode < 600) - { - throw new Models.Errors.APIException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - - throw new Models.Errors.APIException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - public async Task GetAsync(string reportExecutionId, string? merchantAccountId = null, RetryConfig? retryConfig = null) { var request = new GetReportExecutionRequest() diff --git a/src/Gr4vy/GiftCards.cs b/src/Gr4vy/GiftCards.cs index 15fa92b..80c3d74 100644 --- a/src/Gr4vy/GiftCards.cs +++ b/src/Gr4vy/GiftCards.cs @@ -69,7 +69,7 @@ public class GiftCards: IGiftCards { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IBalances Balances { get; private set; } diff --git a/src/Gr4vy/Gr4vy.csproj b/src/Gr4vy/Gr4vy.csproj index d70d7fc..a4ec4db 100644 --- a/src/Gr4vy/Gr4vy.csproj +++ b/src/Gr4vy/Gr4vy.csproj @@ -3,7 +3,7 @@ true Gr4vy - 1.0.0-beta.18 + 1.0.0-beta.19 net8.0 Gr4vy Copyright (c) Gr4vy 2025 diff --git a/src/Gr4vy/Gr4vySDK.cs b/src/Gr4vy/Gr4vySDK.cs index f2df26b..f31e3c7 100644 --- a/src/Gr4vy/Gr4vySDK.cs +++ b/src/Gr4vy/Gr4vySDK.cs @@ -39,6 +39,7 @@ public interface IGr4vySDK public IPaymentServices PaymentServices { get; } public IAuditLogs AuditLogs { get; } public IReports Reports { get; } + public IReportExecutions ReportExecutions { get; } public ICheckoutSessions CheckoutSessions { get; } public IMerchantAccounts MerchantAccounts { get; } public IPayouts Payouts { get; } @@ -54,7 +55,7 @@ public class Gr4vySDK: IGr4vySDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IAccountUpdater AccountUpdater { get; private set; } @@ -70,6 +71,7 @@ public class Gr4vySDK: IGr4vySDK public IPaymentServices PaymentServices { get; private set; } public IAuditLogs AuditLogs { get; private set; } public IReports Reports { get; private set; } + public IReportExecutions ReportExecutions { get; private set; } public ICheckoutSessions CheckoutSessions { get; private set; } public IMerchantAccounts MerchantAccounts { get; private set; } public IPayouts Payouts { get; private set; } @@ -106,6 +108,8 @@ public Gr4vySDK(SDKConfig config) Reports = new Reports(SDKConfiguration); + ReportExecutions = new ReportExecutions(SDKConfiguration); + CheckoutSessions = new CheckoutSessions(SDKConfiguration); MerchantAccounts = new MerchantAccounts(SDKConfiguration); @@ -182,6 +186,8 @@ public Gr4vySDK(string? bearerAuth = null, Func? bearerAuthSource = null Reports = new Reports(SDKConfiguration); + ReportExecutions = new ReportExecutions(SDKConfiguration); + CheckoutSessions = new CheckoutSessions(SDKConfiguration); MerchantAccounts = new MerchantAccounts(SDKConfiguration); diff --git a/src/Gr4vy/Jobs.cs b/src/Gr4vy/Jobs.cs index 6613a84..ffeb6b9 100644 --- a/src/Gr4vy/Jobs.cs +++ b/src/Gr4vy/Jobs.cs @@ -39,7 +39,7 @@ public class Jobs: IJobs { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/MerchantAccounts.cs b/src/Gr4vy/MerchantAccounts.cs index 20520de..a626f63 100644 --- a/src/Gr4vy/MerchantAccounts.cs +++ b/src/Gr4vy/MerchantAccounts.cs @@ -68,7 +68,7 @@ public class MerchantAccounts: IMerchantAccounts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Models/Components/GiftCardTokenTransactionCreate.cs b/src/Gr4vy/Models/Components/GiftCardTokenTransactionCreate.cs index 536bd6c..70871b3 100644 --- a/src/Gr4vy/Models/Components/GiftCardTokenTransactionCreate.cs +++ b/src/Gr4vy/Models/Components/GiftCardTokenTransactionCreate.cs @@ -22,7 +22,7 @@ public class GiftCardTokenTransactionCreate public string Id { get; set; } = default!; /// - /// The monetary amount for this transaction to charge against the gift card, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. + /// The monetary amount for this transaction to charge against the gift card, in the smallest currency unit (for example, cents or pence). /// [JsonProperty("amount")] public long Amount { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/GiftCardTransactionCreate.cs b/src/Gr4vy/Models/Components/GiftCardTransactionCreate.cs index 4dcb038..88f1e18 100644 --- a/src/Gr4vy/Models/Components/GiftCardTransactionCreate.cs +++ b/src/Gr4vy/Models/Components/GiftCardTransactionCreate.cs @@ -31,7 +31,7 @@ public class GiftCardTransactionCreate public string Pin { get; set; } = default!; /// - /// The monetary amount for this transaction to charge against the gift card, in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`. + /// The monetary amount for this transaction to charge against the gift card, in the smallest currency unit (for example, cents or pence). /// [JsonProperty("amount")] public long Amount { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/Refund.cs b/src/Gr4vy/Models/Components/Refund.cs index 5206fb8..883ca7a 100644 --- a/src/Gr4vy/Models/Components/Refund.cs +++ b/src/Gr4vy/Models/Components/Refund.cs @@ -24,7 +24,7 @@ public class Refund public string Type { get; } = "refund"; /// - /// The ID for the refund. + /// The unique identifier for the refund. /// [JsonProperty("id")] public string Id { get; set; } = default!; @@ -45,13 +45,13 @@ public class Refund public string Status { get; set; } = default!; /// - /// The currency code for this refund. Will always match that of the associated transaction. + /// The ISO 4217 currency code for this refund. Will always match that of the associated transaction. /// [JsonProperty("currency")] public string Currency { get; set; } = default!; /// - /// The amount requested for this refund. + /// The amount of this refund, in the smallest currency unit (for example, cents or pence). /// [JsonProperty("amount")] public long Amount { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/Settlement.cs b/src/Gr4vy/Models/Components/Settlement.cs index a3ad819..d53f892 100644 --- a/src/Gr4vy/Models/Components/Settlement.cs +++ b/src/Gr4vy/Models/Components/Settlement.cs @@ -39,25 +39,25 @@ public class Settlement public string MerchantAccountId { get; set; } = default!; /// - /// Date and time the settlement was created. + /// The date and time the settlement was created, in ISO 8601 format. /// [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } = default!; /// - /// Date and time the settlement was last updated. + /// The date and time the settlement was last updated, in ISO 8601 format. /// [JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; } = default!; /// - /// Date and time the settlement was posted. + /// The date and time the settlement was posted, in ISO 8601 format. /// [JsonProperty("posted_at")] public DateTime PostedAt { get; set; } = default!; /// - /// Date and time the settlement was ingested. + /// The date and time the settlement was ingested, in ISO 8601 format. /// [JsonProperty("ingested_at")] public DateTime IngestedAt { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/Transaction.cs b/src/Gr4vy/Models/Components/Transaction.cs index 97b3dc7..abeb5c0 100644 --- a/src/Gr4vy/Models/Components/Transaction.cs +++ b/src/Gr4vy/Models/Components/Transaction.cs @@ -67,25 +67,25 @@ public class Transaction public long AuthorizedAmount { get; set; } = default!; /// - /// The captured amount for this transaction. This can be the full value of the `authorized_amount` or less. + /// The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `authorized_amount` or less. /// [JsonProperty("captured_amount")] public long CapturedAmount { get; set; } = default!; /// - /// The refunded amount for this transaction. This can be the full value of the `captured_amount` or less. + /// The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `captured_amount` or less. /// [JsonProperty("refunded_amount")] public long RefundedAmount { get; set; } = default!; /// - /// The currency of this transaction's settlement in ISO 4217 three-letter code format. + /// The ISO 4217 currency code of this transaction's settlement. /// [JsonProperty("settled_currency")] public string? SettledCurrency { get; set; } = null; /// - /// The net amount settled for this transaction. + /// The net amount settled for this transaction, in the smallest currency unit (for example, cents or pence). /// [JsonProperty("settled_amount")] public long SettledAmount { get; set; } = default!; @@ -97,7 +97,7 @@ public class Transaction public bool Settled { get; set; } = default!; /// - /// The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction. + /// The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing. /// [JsonProperty("country")] public string? Country { get; set; } = null; @@ -190,13 +190,13 @@ public class Transaction public GiftCardService? GiftCardService { get; set; } = null; /// - /// The date this buyer was created at. + /// The date and time when the transaction was created, in ISO 8601 format. /// [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } = default!; /// - /// The date this buyer was last updated at. + /// The date and time when the transaction was last updated, in ISO 8601 format. /// [JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/TransactionCapture.cs b/src/Gr4vy/Models/Components/TransactionCapture.cs index 006b098..67fe359 100644 --- a/src/Gr4vy/Models/Components/TransactionCapture.cs +++ b/src/Gr4vy/Models/Components/TransactionCapture.cs @@ -14,13 +14,13 @@ namespace Gr4vy.Models.Components using Newtonsoft.Json; /// - /// Request body for capturing an authorized transaction + /// Request body for capturing an authorized transaction. /// public class TransactionCapture { /// - /// The amount to capture. This normally needs to be equal or less than the authorized amount, unless over-capture is available. + /// The amount to capture, in the smallest currency unit (e.g., cents). This must be less than or equal to the authorized amount, unless over-capture is available. /// [JsonProperty("amount")] public long? Amount { get; set; } = null; diff --git a/src/Gr4vy/Models/Components/TransactionCreate.cs b/src/Gr4vy/Models/Components/TransactionCreate.cs index 13448c6..534fd95 100644 --- a/src/Gr4vy/Models/Components/TransactionCreate.cs +++ b/src/Gr4vy/Models/Components/TransactionCreate.cs @@ -24,7 +24,7 @@ public class TransactionCreate public long Amount { get; set; } = default!; /// - /// A supported ISO-4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. + /// A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`. /// [JsonProperty("currency")] public string Currency { get; set; } = default!; diff --git a/src/Gr4vy/Models/Components/TransactionRefundCreate.cs b/src/Gr4vy/Models/Components/TransactionRefundCreate.cs index 4ddfc1c..32fdc79 100644 --- a/src/Gr4vy/Models/Components/TransactionRefundCreate.cs +++ b/src/Gr4vy/Models/Components/TransactionRefundCreate.cs @@ -16,7 +16,7 @@ public class TransactionRefundCreate { /// - /// The amount requested to refund. If omitted, a full refund will be requested. + /// The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested. /// [JsonProperty("amount")] public long? Amount { get; set; } = null; diff --git a/src/Gr4vy/Models/Components/TransactionSummary.cs b/src/Gr4vy/Models/Components/TransactionSummary.cs index 9037c48..c4afa19 100644 --- a/src/Gr4vy/Models/Components/TransactionSummary.cs +++ b/src/Gr4vy/Models/Components/TransactionSummary.cs @@ -67,25 +67,25 @@ public class TransactionSummary public long AuthorizedAmount { get; set; } = default!; /// - /// The captured amount for this transaction. This can be the full value of the `authorized_amount` or less. + /// The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `authorized_amount` or less. /// [JsonProperty("captured_amount")] public long CapturedAmount { get; set; } = default!; /// - /// The refunded amount for this transaction. This can be the full value of the `captured_amount` or less. + /// The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `captured_amount` or less. /// [JsonProperty("refunded_amount")] public long RefundedAmount { get; set; } = default!; /// - /// The currency of this transaction's settlement in ISO 4217 three-letter code format. + /// The ISO 4217 currency code of this transaction's settlement. /// [JsonProperty("settled_currency")] public string? SettledCurrency { get; set; } = null; /// - /// The net amount settled for this transaction. + /// The net amount settled for this transaction, in the smallest currency unit (for example, cents or pence). /// [JsonProperty("settled_amount")] public long SettledAmount { get; set; } = default!; @@ -97,7 +97,7 @@ public class TransactionSummary public bool Settled { get; set; } = default!; /// - /// The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction. + /// The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing. /// [JsonProperty("country")] public string? Country { get; set; } = null; @@ -190,13 +190,13 @@ public class TransactionSummary public GiftCardService? GiftCardService { get; set; } = null; /// - /// The date this buyer was created at. + /// The date and time when the transaction was created, in ISO 8601 format. /// [JsonProperty("created_at")] public DateTime CreatedAt { get; set; } = default!; /// - /// The date this buyer was last updated at. + /// The date and time when the transaction was last updated, in ISO 8601 format. /// [JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; } = default!; diff --git a/src/Gr4vy/Models/Requests/ListAllReportExecutionsResponse.cs b/src/Gr4vy/Models/Requests/ListAllReportExecutionsResponse.cs index 1a3f7db..3ad5c73 100644 --- a/src/Gr4vy/Models/Requests/ListAllReportExecutionsResponse.cs +++ b/src/Gr4vy/Models/Requests/ListAllReportExecutionsResponse.cs @@ -19,6 +19,6 @@ public class ListAllReportExecutionsResponse public Func>? Next {get;set;} [SpeakeasyMetadata("")] - public ReportExecutions Result { get; set; } = default!; + public Models.Components.ReportExecutions Result { get; set; } = default!; } } \ No newline at end of file diff --git a/src/Gr4vy/Models/Requests/ListReportExecutionsResponse.cs b/src/Gr4vy/Models/Requests/ListReportExecutionsResponse.cs index cd24964..aff6fa5 100644 --- a/src/Gr4vy/Models/Requests/ListReportExecutionsResponse.cs +++ b/src/Gr4vy/Models/Requests/ListReportExecutionsResponse.cs @@ -19,6 +19,6 @@ public class ListReportExecutionsResponse public Func>? Next {get;set;} [SpeakeasyMetadata("")] - public ReportExecutions Result { get; set; } = default!; + public Models.Components.ReportExecutions Result { get; set; } = default!; } } \ No newline at end of file diff --git a/src/Gr4vy/NetworkTokens.cs b/src/Gr4vy/NetworkTokens.cs index f85ee17..1cfe503 100644 --- a/src/Gr4vy/NetworkTokens.cs +++ b/src/Gr4vy/NetworkTokens.cs @@ -76,7 +76,7 @@ public class NetworkTokens: INetworkTokens { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public ICryptogram Cryptogram { get; private set; } diff --git a/src/Gr4vy/PaymentLinks.cs b/src/Gr4vy/PaymentLinks.cs index 1ef3288..7d0428c 100644 --- a/src/Gr4vy/PaymentLinks.cs +++ b/src/Gr4vy/PaymentLinks.cs @@ -68,7 +68,7 @@ public class PaymentLinks: IPaymentLinks { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/PaymentMethods.cs b/src/Gr4vy/PaymentMethods.cs index 5710bde..9bf83fb 100644 --- a/src/Gr4vy/PaymentMethods.cs +++ b/src/Gr4vy/PaymentMethods.cs @@ -70,7 +70,7 @@ public class PaymentMethods: IPaymentMethods { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IPaymentServiceTokens PaymentServiceTokens { get; private set; } diff --git a/src/Gr4vy/PaymentOptions.cs b/src/Gr4vy/PaymentOptions.cs index 79d9290..564de14 100644 --- a/src/Gr4vy/PaymentOptions.cs +++ b/src/Gr4vy/PaymentOptions.cs @@ -39,7 +39,7 @@ public class PaymentOptions: IPaymentOptions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/PaymentServiceDefinitions.cs b/src/Gr4vy/PaymentServiceDefinitions.cs index afa3eab..39d8c0d 100644 --- a/src/Gr4vy/PaymentServiceDefinitions.cs +++ b/src/Gr4vy/PaymentServiceDefinitions.cs @@ -59,7 +59,7 @@ public class PaymentServiceDefinitions: IPaymentServiceDefinitions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/PaymentServiceTokens.cs b/src/Gr4vy/PaymentServiceTokens.cs index 7156b5f..cef9e56 100644 --- a/src/Gr4vy/PaymentServiceTokens.cs +++ b/src/Gr4vy/PaymentServiceTokens.cs @@ -57,7 +57,7 @@ public class PaymentServiceTokens: IPaymentServiceTokens { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/PaymentServices.cs b/src/Gr4vy/PaymentServices.cs index 2f07b73..311f1dd 100644 --- a/src/Gr4vy/PaymentServices.cs +++ b/src/Gr4vy/PaymentServices.cs @@ -95,7 +95,7 @@ public class PaymentServices: IPaymentServices { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Payouts.cs b/src/Gr4vy/Payouts.cs index b2e9b9b..556e75c 100644 --- a/src/Gr4vy/Payouts.cs +++ b/src/Gr4vy/Payouts.cs @@ -59,7 +59,7 @@ public class Payouts: IPayouts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Refunds.cs b/src/Gr4vy/Refunds.cs index 7cb4ce6..8d3815f 100644 --- a/src/Gr4vy/Refunds.cs +++ b/src/Gr4vy/Refunds.cs @@ -39,7 +39,7 @@ public class Refunds: IRefunds { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/ReportExecutions.cs b/src/Gr4vy/ReportExecutions.cs new file mode 100644 index 0000000..db52a2d --- /dev/null +++ b/src/Gr4vy/ReportExecutions.cs @@ -0,0 +1,320 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Gr4vy +{ + using Gr4vy.Hooks; + using Gr4vy.Models.Components; + using Gr4vy.Models.Errors; + using Gr4vy.Models.Requests; + using Gr4vy.Utils; + using Gr4vy.Utils.Retries; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public interface IReportExecutions + { + + /// + /// List executed reports + /// + /// + /// List all executed reports that have been generated. + /// + /// + Task ListAsync(ListAllReportExecutionsRequest? request = null, RetryConfig? retryConfig = null); + } + + public class ReportExecutions: IReportExecutions + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "1.0.0-beta.19"; + private const string _sdkGenVersion = "2.621.3"; + private const string _openapiDocVersion = "1.0.0"; + + public ReportExecutions(SDKConfig config) + { + SDKConfiguration = config; + } + + public async Task ListAsync(ListAllReportExecutionsRequest? request = null, RetryConfig? retryConfig = null) + { + request.MerchantAccountId ??= SDKConfiguration.MerchantAccountId; + + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/report-executions", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + HeaderSerializer.PopulateHeaders(ref httpRequest, request); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "list_all_report_executions", new List { }, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 200L, + maxIntervalMs: 200L, + maxElapsedTimeMs: 1000L, + exponent: 1 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Gr4vy.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 405 || _statusCode == 409 || _statusCode == 422 || _statusCode == 425 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 502 || _statusCode == 504 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + + Func> nextFunc = async delegate() + { + var body = JObject.Parse(await httpResponse.Content.ReadAsStringAsync()); + var nextCursorToken = body.SelectToken("$.next_cursor"); + + if(nextCursorToken == null) + { + return null; + } + var nextCursor = nextCursorToken.Value(); + if (nextCursor == null) + { + return null; + } + + var newRequest = new ListAllReportExecutionsRequest + { + Cursor = nextCursor, + Limit = request?.Limit, + ReportName = request?.ReportName, + CreatedAtLte = request?.CreatedAtLte, + CreatedAtGte = request?.CreatedAtGte, + Status = request?.Status, + CreatorId = request?.CreatorId, + MerchantAccountId = request?.MerchantAccountId + }; + + return await ListAsync ( + request: newRequest, + retryConfig: retryConfig + ); + }; + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var result = obj!; + var response = new ListAllReportExecutionsResponse() + { + Result = result, + Next = nextFunc + }; + return response; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 400) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 403) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 404) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 405) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 409) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 422) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 425) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 429) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 502) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 504) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + + throw new Models.Errors.APIException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.APIException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.APIException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.APIException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } +} \ No newline at end of file diff --git a/src/Gr4vy/Reports.cs b/src/Gr4vy/Reports.cs index 7b49c83..1a9af00 100644 --- a/src/Gr4vy/Reports.cs +++ b/src/Gr4vy/Reports.cs @@ -69,7 +69,7 @@ public class Reports: IReports { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IExecutions Executions { get; private set; } diff --git a/src/Gr4vy/SDKConfig.cs b/src/Gr4vy/SDKConfig.cs index ac757ab..3ff094a 100644 --- a/src/Gr4vy/SDKConfig.cs +++ b/src/Gr4vy/SDKConfig.cs @@ -66,7 +66,7 @@ public SDKConfig(ISpeakeasyHttpClient? client = null) }}, }; MerchantAccountId = null; - UserAgent = "speakeasy-sdk/csharp 1.0.0-beta.18 2.621.3 1.0.0 Gr4vy"; + UserAgent = "speakeasy-sdk/csharp 1.0.0-beta.19 2.621.3 1.0.0 Gr4vy"; SecuritySource = null; Hooks = new SDKHooks(); RetryConfig = null; diff --git a/src/Gr4vy/Sessions.cs b/src/Gr4vy/Sessions.cs index 8029dff..f7472b6 100644 --- a/src/Gr4vy/Sessions.cs +++ b/src/Gr4vy/Sessions.cs @@ -57,7 +57,7 @@ public class Sessions: ISessions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Settlements.cs b/src/Gr4vy/Settlements.cs index 6aa8767..085be93 100644 --- a/src/Gr4vy/Settlements.cs +++ b/src/Gr4vy/Settlements.cs @@ -48,7 +48,7 @@ public class Settlements: ISettlements { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/ShippingDetails.cs b/src/Gr4vy/ShippingDetails.cs index 52aad1f..35d3e1c 100644 --- a/src/Gr4vy/ShippingDetails.cs +++ b/src/Gr4vy/ShippingDetails.cs @@ -75,7 +75,7 @@ public class ShippingDetails: IShippingDetails { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; diff --git a/src/Gr4vy/Transactions.cs b/src/Gr4vy/Transactions.cs index 75c68b2..394f3dd 100644 --- a/src/Gr4vy/Transactions.cs +++ b/src/Gr4vy/Transactions.cs @@ -34,7 +34,7 @@ public interface ITransactions /// List transactions /// /// - /// List all transactions for a specific merchant account sorted by most recently created. + /// Returns a paginated list of transactions for the merchant account, sorted by most recently updated. You can filter, sort, and search transactions using query parameters. /// /// Task ListAsync(ListTransactionsRequest? request = null, RetryConfig? retryConfig = null); @@ -43,7 +43,7 @@ public interface ITransactions /// Create transaction /// /// - /// Create a transaction. + /// Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported. /// /// Task CreateAsync(TransactionCreate transactionCreate, string? merchantAccountId = null, string? idempotencyKey = null); @@ -52,7 +52,7 @@ public interface ITransactions /// Get transaction /// /// - /// Fetch a single transaction by its ID. + /// Retrieve the details of a transaction by its unique identifier. /// /// Task GetAsync(string transactionId, string? merchantAccountId = null, RetryConfig? retryConfig = null); @@ -61,7 +61,7 @@ public interface ITransactions /// Capture transaction /// /// - /// Capture a previously authorized transaction. + /// Captures a previously authorized transaction. You can capture the full or a partial amount, as long as it does not exceed the authorized amount (unless over-capture is enabled). /// /// Task CaptureAsync(string transactionId, TransactionCapture transactionCapture, string? merchantAccountId = null); @@ -70,7 +70,7 @@ public interface ITransactions /// Void transaction /// /// - /// Void a previously authorized transaction. + /// Voids a previously authorized transaction. If the transaction was not yet successfully authorized, or was already captured, the void will not be processed. This operation releases the hold on the buyer's funds. Captured transactions can be refunded instead. /// /// Task VoidAsync(string transactionId, string? merchantAccountId = null); @@ -79,7 +79,7 @@ public interface ITransactions /// Sync transaction /// /// - /// Fetch the latest status for a transaction. + /// Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers. /// /// Task SyncAsync(string transactionId, string? merchantAccountId = null); @@ -89,7 +89,7 @@ public class Transactions: ITransactions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public ITransactionsRefunds Refunds { get; private set; } diff --git a/src/Gr4vy/TransactionsRefunds.cs b/src/Gr4vy/TransactionsRefunds.cs index 89bc6a5..1b8b879 100644 --- a/src/Gr4vy/TransactionsRefunds.cs +++ b/src/Gr4vy/TransactionsRefunds.cs @@ -58,7 +58,7 @@ public class TransactionsRefunds: ITransactionsRefunds { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "1.0.0-beta.18"; + private const string _sdkVersion = "1.0.0-beta.19"; private const string _sdkGenVersion = "2.621.3"; private const string _openapiDocVersion = "1.0.0"; public IAll All { get; private set; }