Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Apr 11, 2024
1 parent bff8911 commit fcf3d83
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/fax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you are using this SDK as part of the Sinch SDK (`@sinch/sdk-core`) you can a
```typescript
import {
FaxService,
SendFaxRequestData,
Fax,
SinchClient,
UnifiedCredentials,
} from '@sinch/sdk-core';
Expand All @@ -55,7 +55,7 @@ const sinch = new SinchClient(credentials);
const faxService: FaxService = sinch.fax;

// Build the request data
const requestData: SendFaxRequestData = {
const requestData: Fax.SendFaxRequestData = {
sendFaxRequestBody: {
to: '+12015555555',
contentUrl: 'https://developers.sinch.com/fax/fax.pdf',
Expand All @@ -77,7 +77,7 @@ import {
} from '@sinch/sdk-client';
import {
FaxService,
SendFaxRequestData,
Fax,
} from '@sinch/fax';

const credentials: UnifiedCredentials = {
Expand All @@ -90,7 +90,7 @@ const credentials: UnifiedCredentials = {
const faxService = new FaxService(credentials);

// Build the request data
const requestData: SendFaxRequestData = {
const requestData: Fax.SendFaxRequestData = {
sendFaxRequestBody: {
to: '+12015555555',
contentUrl: 'https://developers.sinch.com/fax/fax.pdf',
Expand All @@ -108,7 +108,7 @@ All the methods that interact with the Sinch APIs use Promises. You can use `awa

```typescript
// Method 1: Wait for the Promise to complete (you need to be in an 'async' method)
let sendFaxResult: Fax;
let sendFaxResult: Fax.Fax;
try {
sendFaxResult = await faxService.faxes.send(requestData);
console.log(`Fax successfully created at '${sendFaxResult.createTime}'. Status = '${sendFaxResult.status}`);
Expand Down

0 comments on commit fcf3d83

Please sign in to comment.