Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/fax api faxes #48

Merged
merged 56 commits into from
May 23, 2024
Merged

Feat/fax api faxes #48

merged 56 commits into from
May 23, 2024

Conversation

Dovchik
Copy link
Contributor

@Dovchik Dovchik commented Apr 3, 2024

Introduce Fax Api support

This PR brings in FaxClient interface and implementation of Faxes tag.

This is a PR sink for other fax related PRs as well.

Will be merged only when other child PRs regarding other tags will be merge into current.

spacedsweden and others added 30 commits January 11, 2024 16:10
Co-authored-by: Volodymyr Lisovskyi <erehonvl@gmail.com>
Co-authored-by: Volodymyr Lisovskyi <erehonvl@gmail.com>
Co-authored-by: Volodymyr Lisovskyi <erehonvl@gmail.com>
Co-authored-by: Volodymyr Lisovskyi <erehonvl@gmail.com>
…ime` property in the `Fax.cs` file, the addition of a new `Download` method in the `Faxes.cs` file, and the update of package versions in the `Sinch.csproj` file.

1. The `CreateTime` property in the `Fax.cs` file under the `Sinch.Faxes` namespace has been altered. Previously, it was a string type, but it has now been changed to a DateTime type. This change will ensure that the `CreateTime` property holds date and time information in a more structured and accurate manner.

2. A new asynchronous method named `Download` has been added to the `Faxes.cs` file under the `Sinch.Faxes` namespace. This method accepts an id as a parameter and returns a Stream. This addition will allow users to download fax data asynchronously using the provided id.

3. The versions of the `Microsoft.Extensions.Http` and `System.Text.Json` packages in the `Sinch.csproj` file have been updated. The `Microsoft.Extensions.Http` package has been updated from version 7.0.0 to 8.0.0, and the `System.Text.Json` package has been updated from version 7.0.3 to 8.0.2. These updates will ensure that the project uses the latest and most secure versions of these packages.

References:
- `Fax.cs` file under the `Sinch.Faxes` namespace for the `CreateTime` property change.
- `Faxes.cs` file under the `Sinch.Faxes` namespace for the new `Download` method.
- `Sinch.csproj` file for the package version updates.
@Dovchik Dovchik requested a review from JPPortier as a code owner May 20, 2024 11:03
Copy link

@asein-sinch asein-sinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I've put some comments that also apply to the implementation of this API in the Node.js SDK 🙂

tests/Sinch.Tests/e2e/Fax/FaxesTests.cs Outdated Show resolved Hide resolved
src/Sinch/Core/Utils.cs Show resolved Hide resolved
src/Sinch/Core/StringUtils.cs Show resolved Hide resolved
src/Sinch/Fax/Faxes/SendFaxRequest.cs Outdated Show resolved Hide resolved
src/Sinch/Fax/Faxes/SendFaxRequest.cs Outdated Show resolved Hide resolved
src/Sinch/Fax/Faxes/Utils.cs Show resolved Hide resolved
src/Sinch/Core/StreamExtensions.cs Show resolved Hide resolved
src/Sinch/Core/Http.cs Outdated Show resolved Hide resolved
examples/Console/Fax/DownloadFax.cs Outdated Show resolved Hide resolved
examples/Console/Fax/DownloadFax.cs Outdated Show resolved Hide resolved
Copy link
Contributor Author

@Dovchik Dovchik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review Antoine! Here you will find adjustment to mocks https://github.com/sinch/doppelganger/pull/25

examples/Console/Fax/DownloadFax.cs Outdated Show resolved Hide resolved
examples/Console/Fax/DownloadFax.cs Outdated Show resolved Hide resolved
src/Sinch/Core/Http.cs Outdated Show resolved Hide resolved
src/Sinch/Core/Http.cs Outdated Show resolved Hide resolved
src/Sinch/Core/StreamExtensions.cs Show resolved Hide resolved
src/Sinch/Fax/Faxes/Utils.cs Show resolved Hide resolved
src/Sinch/Fax/Faxes/Fax.cs Show resolved Hide resolved
src/Sinch/Fax/Faxes/FaxesClient.cs Outdated Show resolved Hide resolved
src/Sinch/Fax/Faxes/FaxesClient.cs Show resolved Hide resolved
src/Sinch/Fax/Faxes/SendFaxRequest.cs Show resolved Hide resolved
@Dovchik Dovchik requested a review from asein-sinch May 21, 2024 14:17
@Dovchik
Copy link
Contributor Author

Dovchik commented May 22, 2024

Added an override for send fax https://github.com/sinch/doppelganger/pull/26

@Dovchik Dovchik requested a review from asein-sinch May 22, 2024 10:02
Copy link

@asein-sinch asein-sinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. Regarding the PR organization, maybe you can create another branch from main where all the sub-features for Fax (this PR being one of the sub-features) will be merged. Otherwise, I fear it will be a mess if you need to come back to the Faxes part once Email will be merged

@Dovchik Dovchik changed the base branch from main to feat/fax-api-support May 23, 2024 09:46
@Dovchik Dovchik merged commit ca8c550 into feat/fax-api-support May 23, 2024
3 checks passed
@Dovchik Dovchik deleted the feat/fax-api-faxes branch May 23, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants