Skip to content

Commit 99b8b6e

Browse files
authored
Merge pull request #65 from codatio/speakeasy-sdk-regen-1730382189
chore: 🐝 Update SDK - Generate Sync for Payables library SYNC-FOR-PAYABLES-LIBRARY 4.0.0
2 parents 5ac1081 + 34594a5 commit 99b8b6e

File tree

15 files changed

+222
-110
lines changed

15 files changed

+222
-110
lines changed

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.423.3
1+
speakeasyVersion: 1.423.5
22
sources:
33
accounting-source:
44
sourceNamespace: accounting-source
@@ -51,8 +51,8 @@ sources:
5151
- main
5252
sync-for-payables-source:
5353
sourceNamespace: sync-for-payables-source
54-
sourceRevisionDigest: sha256:57c05de30b96f1efc4952dda7371aa0b982442e1bd7c4e304fb9413b7c94e715
55-
sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5
54+
sourceRevisionDigest: sha256:b7ab686758f0afcdfdea71a46fe64a0cc9e8e4ce32af1314372c9134dbb13ad6
55+
sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693
5656
tags:
5757
- latest
5858
- main
@@ -102,8 +102,8 @@ targets:
102102
sync-for-payables-library:
103103
source: sync-for-payables-source
104104
sourceNamespace: sync-for-payables-source
105-
sourceRevisionDigest: sha256:57c05de30b96f1efc4952dda7371aa0b982442e1bd7c4e304fb9413b7c94e715
106-
sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5
105+
sourceRevisionDigest: sha256:b7ab686758f0afcdfdea71a46fe64a0cc9e8e4ce32af1314372c9134dbb13ad6
106+
sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693
107107
sync-for-payroll-library:
108108
source: sync-for-payroll-source
109109
sourceNamespace: sync-for-payroll-source

sync-for-payables/.speakeasy/gen.lock

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 18757ebf-96ad-433f-80e1-10950345f2fe
33
management:
4-
docChecksum: 16c2aba5060738f14671556b6526c400
4+
docChecksum: c0f4a56a46c488781ea9be7def894f8c
55
docVersion: 3.0.0
6-
speakeasyVersion: 1.423.3
7-
generationVersion: 2.442.11
8-
releaseVersion: 3.0.0
9-
configChecksum: 9521bc2d0a62f4454590ebbed600f9c8
6+
speakeasyVersion: 1.423.5
7+
generationVersion: 2.445.1
8+
releaseVersion: 4.0.0
9+
configChecksum: 0d7af15455983e0b6530d6cf34cf6862
1010
repoURL: https://github.com/codatio/client-sdk-java.git
1111
repoSubDirectory: sync-for-payables
1212
published: true
@@ -782,6 +782,15 @@ examples:
782782
responses:
783783
"401":
784784
application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
785+
Attachments:
786+
parameters:
787+
path:
788+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
789+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
790+
billId: "EILBDVJVNUAGVKRQ"
791+
responses:
792+
"200":
793+
application/json: [{"contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "id": "422f093f-e556-4bf3-91c0-93af70c3e850", "includeWhenSent": true, "name": "receipt.png", "sourceModifiedDate": "2022-05-26T10:34:10Z"}, {"contentType": "image/png", "dateCreated": "2022-10-24T00:00:00.000Z", "fileSize": 98, "id": "20cfd269-2f0f-44ef-a28c-7b5f725cf1aa", "includeWhenSent": true, "name": "another_receipt.png", "sourceModifiedDate": "2022-05-27T12:38:10Z"}]
785794
upload-bill-attachment:
786795
Malformed query:
787796
parameters:
@@ -792,6 +801,15 @@ examples:
792801
responses:
793802
"400":
794803
application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
804+
Attachment metadata:
805+
parameters:
806+
path:
807+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
808+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
809+
billId: "EILBDVJVNUAGVKRQ"
810+
responses:
811+
"201":
812+
application/json: {"contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "id": "422f093f-e556-4bf3-91c0-93af70c3e850", "includeWhenSent": true, "name": "receipt.png", "sourceModifiedDate": "2022-05-26T10:34:10Z"}
795813
create-bank-account:
796814
Bank account example:
797815
parameters:

sync-for-payables/.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ generation:
1111
oAuth2ClientCredentialsEnabled: false
1212
telemetryEnabled: true
1313
java:
14-
version: 3.0.0
14+
version: 4.0.0
1515
additionalDependencies: []
1616
additionalPlugins: []
1717
artifactID: sync.payables

sync-for-payables/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ The samples below show how a published SDK artifact is used:
6262

6363
Gradle:
6464
```groovy
65-
implementation 'io.codat:sync.payables:3.0.0'
65+
implementation 'io.codat:sync.payables:4.0.0'
6666
```
6767

6868
Maven:
6969
```xml
7070
<dependency>
7171
<groupId>io.codat</groupId>
7272
<artifactId>sync.payables</artifactId>
73-
<version>3.0.0</version>
73+
<version>4.0.0</version>
7474
</dependency>
7575
```
7676

sync-for-payables/RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,14 @@ Based on:
6868
### Generated
6969
- [java v3.0.0] sync-for-payables
7070
### Releases
71-
- [Maven Central v3.0.0] https://central.sonatype.com/artifact/io.codat.sync/payables/3.0.0 - sync-for-payables
71+
- [Maven Central v3.0.0] https://central.sonatype.com/artifact/io.codat.sync/payables/3.0.0 - sync-for-payables
72+
73+
## 2024-10-31 13:43:02
74+
### Changes
75+
Based on:
76+
- OpenAPI Doc
77+
- Speakeasy CLI 1.423.5 (2.445.1) https://github.com/speakeasy-api/speakeasy
78+
### Generated
79+
- [java v4.0.0] sync-for-payables
80+
### Releases
81+
- [Maven Central v4.0.0] https://central.sonatype.com/artifact/io.codat.sync/payables/4.0.0 - sync-for-payables

sync-for-payables/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
6363
}
6464

6565
group = "io.codat"
66-
version = "3.0.0"
66+
version = "4.0.0"
6767

6868
sourcesJar {
6969
archiveBaseName = "sync.payables"
@@ -101,7 +101,7 @@ publishing {
101101
maven(MavenPublication) {
102102
groupId = 'io.codat'
103103
artifactId = 'sync.payables'
104-
version = '3.0.0'
104+
version = '4.0.0'
105105

106106
from components.java
107107

sync-for-payables/docs/models/operations/ListBillAttachmentsResponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
| Field | Type | Required | Description |
77
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
8-
| `attachment` | [JsonNullable\<Attachment>](../../models/components/Attachment.md) | :heavy_minus_sign: | Success |
98
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
109
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
11-
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
10+
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11+
| `attachments` | List\<[Attachment](../../models/components/Attachment.md)> | :heavy_minus_sign: | Success |

sync-for-payables/docs/models/operations/UploadBillAttachmentResponse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
| Field | Type | Required | Description |
77
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
8+
| `attachment` | [JsonNullable\<Attachment>](../../models/components/Attachment.md) | :heavy_minus_sign: | Created |
89
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
910
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
1011
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |

sync-for-payables/docs/sdks/bills/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public class Application {
305305
.request(req)
306306
.call();
307307

308-
if (res.attachment().isPresent()) {
308+
if (res.attachments().isPresent()) {
309309
// handle response
310310
}
311311
}
@@ -364,7 +364,9 @@ public class Application {
364364
.request(req)
365365
.call();
366366

367-
// handle response
367+
if (res.attachment().isPresent()) {
368+
// handle response
369+
}
368370
}
369371
}
370372
```

sync-for-payables/src/main/java/io/codat/sync/payables/Bills.java

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ public ListBillAttachmentsResponse listAttachments(
860860
String _url = Utils.generateURL(
861861
ListBillAttachmentsRequest.class,
862862
_baseUrl,
863-
"/companies/{companyId}/connections/{connectionId}/bills/{billId}/attachments",
863+
"/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}/attachments",
864864
request, null);
865865

866866
HTTPRequest _req = new HTTPRequest(_url, "GET");
@@ -945,10 +945,10 @@ public ListBillAttachmentsResponse listAttachments(
945945

946946
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
947947
if (Utils.contentTypeMatches(_contentType, "application/json")) {
948-
Attachment _out = Utils.mapper().readValue(
948+
List<Attachment> _out = Utils.mapper().readValue(
949949
Utils.toUtf8AndClose(_httpRes.body()),
950-
new TypeReference<Attachment>() {});
951-
_res.withAttachment(JsonNullable.of(_out));
950+
new TypeReference<List<Attachment>>() {});
951+
_res.withAttachments(Optional.ofNullable(_out));
952952
return _res;
953953
} else {
954954
throw new SDKError(
@@ -1129,8 +1129,19 @@ public UploadBillAttachmentResponse uploadAttachment(
11291129
UploadBillAttachmentResponse _res = _resBuilder.build();
11301130

11311131
if (Utils.statusCodeMatches(_httpRes.statusCode(), "201")) {
1132-
// no content
1133-
return _res;
1132+
if (Utils.contentTypeMatches(_contentType, "application/json")) {
1133+
Attachment _out = Utils.mapper().readValue(
1134+
Utils.toUtf8AndClose(_httpRes.body()),
1135+
new TypeReference<Attachment>() {});
1136+
_res.withAttachment(JsonNullable.of(_out));
1137+
return _res;
1138+
} else {
1139+
throw new SDKError(
1140+
_httpRes,
1141+
_httpRes.statusCode(),
1142+
"Unexpected content-type received: " + _contentType,
1143+
Utils.extractByteArrayFromBody(_httpRes));
1144+
}
11341145
}
11351146
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "402", "403", "404", "429", "500", "503")) {
11361147
if (Utils.contentTypeMatches(_contentType, "application/json")) {

0 commit comments

Comments
 (0)