-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from fabra-io/speakeasy-sdk-regen-1678140113
chore: speakeasy sdk regeneration - Generate
- Loading branch information
Showing
29 changed files
with
195 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
configVersion: 1.0.0 | ||
management: | ||
docChecksum: 5bdbad96d6d347d81789110337cf504a | ||
docVersion: 0.1.0 | ||
speakeasyVersion: 1.8.4 | ||
docChecksum: 8b6e699ac2ed042ca62a8341762bfe53 | ||
docVersion: 0.1.0 | ||
speakeasyVersion: 1.8.5 | ||
generation: | ||
telemetryEnabled: false | ||
sdkClassName: Fabra | ||
telemetryEnabled: false | ||
sdkClassName: Fabra | ||
sdkFlattening: false | ||
python: | ||
version: 0.5.1 | ||
author: fabra | ||
description: Python Client SDK Generated by Speakeasy | ||
packageName: fabra | ||
version: 0.5.2 | ||
author: fabra | ||
description: Python Client SDK Generated by Speakeasy | ||
packageName: fabra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import requests as requests_http | ||
from . import utils | ||
from fabra.models import operations, shared | ||
from typing import Optional | ||
|
||
class LinkToken: | ||
_client: requests_http.Session | ||
_security_client: requests_http.Session | ||
_server_url: str | ||
_language: str | ||
_sdk_version: str | ||
_gen_version: str | ||
|
||
def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None: | ||
self._client = client | ||
self._security_client = security_client | ||
self._server_url = server_url | ||
self._language = language | ||
self._sdk_version = sdk_version | ||
self._gen_version = gen_version | ||
|
||
def create_link_token(self, request: operations.CreateLinkTokenRequest) -> operations.CreateLinkTokenResponse: | ||
r"""Create a new link token | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = base_url.removesuffix('/') + '/link_token' | ||
|
||
headers = {} | ||
req_content_type, data, form = utils.serialize_request_body(request) | ||
if req_content_type not in ('multipart/form-data', 'multipart/mixed'): | ||
headers['content-type'] = req_content_type | ||
if data is None and form is None: | ||
raise Exception('request body is required') | ||
|
||
client = self._security_client | ||
|
||
http_res = client.request('POST', url, data=data, files=form, headers=headers) | ||
content_type = http_res.headers.get('Content-Type') | ||
|
||
res = operations.CreateLinkTokenResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) | ||
|
||
if http_res.status_code == 200: | ||
if utils.match_content_type(content_type, 'application/json'): | ||
out = utils.unmarshal_json(http_res.text, Optional[shared.CreateLinkTokenResponse]) | ||
res.create_link_token_response = out | ||
elif http_res.status_code == 401: | ||
pass | ||
elif http_res.status_code == 500: | ||
pass | ||
|
||
return res | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from __future__ import annotations | ||
import dataclasses | ||
import requests as requests_http | ||
from ..shared import createlinktokenrequest as shared_createlinktokenrequest | ||
from ..shared import createlinktokenresponse as shared_createlinktokenresponse | ||
from typing import Optional | ||
|
||
|
||
@dataclasses.dataclass | ||
class CreateLinkTokenRequest: | ||
request: shared_createlinktokenrequest.CreateLinkTokenRequest = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }}) | ||
|
||
|
||
@dataclasses.dataclass | ||
class CreateLinkTokenResponse: | ||
content_type: str = dataclasses.field() | ||
status_code: int = dataclasses.field() | ||
create_link_token_response: Optional[shared_createlinktokenresponse.CreateLinkTokenResponse] = dataclasses.field(default=None) | ||
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.