-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Source Klarna: Migrate Python CDK to Low-code CDK (#31003)
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com> Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
- Loading branch information
1 parent
6ff299e
commit dcfa331
Showing
16 changed files
with
178 additions
and
367 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
File renamed without changes.
1 change: 1 addition & 0 deletions
1
airbyte-integrations/connectors/source-klarna/acceptance-test-docker.sh
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,2 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" |
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
23 changes: 15 additions & 8 deletions
23
airbyte-integrations/connectors/source-klarna/metadata.yaml
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,24 +1,31 @@ | ||
data: | ||
allowedHosts: | ||
hosts: | ||
- api.klarna.com | ||
- api.playground.klarna.com | ||
- api-${config.region}.klarna.com | ||
- api-${config.region}.playground.klarna.com | ||
registries: | ||
oss: | ||
enabled: true | ||
cloud: | ||
enabled: true | ||
connectorSubtype: api | ||
connectorType: source | ||
definitionId: 60c24725-00ae-490c-991d-55b78c3197e0 | ||
dockerImageTag: 0.1.0 | ||
dockerImageTag: 0.2.0 | ||
dockerRepository: airbyte/source-klarna | ||
githubIssueLabel: source-klarna | ||
icon: klarna.svg | ||
license: MIT | ||
name: Klarna | ||
registries: | ||
cloud: | ||
enabled: true | ||
oss: | ||
enabled: true | ||
releaseDate: 2022-10-24 | ||
releaseStage: alpha | ||
supportLevel: community | ||
documentationUrl: https://docs.airbyte.com/integrations/sources/klarna | ||
tags: | ||
- language:python | ||
- language:low-code | ||
ab_internal: | ||
sl: 100 | ||
ql: 100 | ||
supportLevel: community | ||
metadataSpecVersion: "1.0" |
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
117 changes: 117 additions & 0 deletions
117
airbyte-integrations/connectors/source-klarna/source_klarna/manifest.yaml
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,117 @@ | ||
version: "0.29.0" | ||
|
||
type: DeclarativeSource | ||
check: | ||
type: CheckStream | ||
stream_names: | ||
- payouts | ||
streams: | ||
- type: DeclarativeStream | ||
name: payouts | ||
primary_key: | ||
- payout_date | ||
retriever: | ||
type: SimpleRetriever | ||
requester: | ||
type: HttpRequester | ||
url_base: https://api{{ '-' + config.region if config.region != 'eu' }}.{{ 'playground.' if config.playground }}klarna.com/ | ||
path: /settlements/v1/payouts | ||
http_method: GET | ||
request_parameters: {} | ||
request_headers: {} | ||
authenticator: | ||
type: BasicHttpAuthenticator | ||
username: "{{ config['username'] }}" | ||
password: "{{ config['password'] }}" | ||
request_body_json: {} | ||
record_selector: | ||
type: RecordSelector | ||
extractor: | ||
type: DpathExtractor | ||
field_path: | ||
- payouts | ||
paginator: | ||
type: DefaultPaginator | ||
page_token_option: | ||
type: RequestPath | ||
page_size_option: | ||
inject_into: request_parameter | ||
type: RequestOption | ||
field_name: size | ||
pagination_strategy: | ||
type: CursorPagination | ||
page_size: 500 | ||
cursor_value: '{{ response.get("pagination", {}).get("next", {}) }}' | ||
stop_condition: '{{ not response.get("pagination", {}).get("next", {}) }}' | ||
- type: DeclarativeStream | ||
name: transactions | ||
retriever: | ||
type: SimpleRetriever | ||
requester: | ||
type: HttpRequester | ||
url_base: >- | ||
https://api{{ '-'+config.region if config.region != 'eu' }}.{{ | ||
'playground.' if config.playground }}klarna.com/ | ||
path: /settlements/v1/transactions | ||
http_method: GET | ||
request_parameters: {} | ||
request_headers: {} | ||
authenticator: | ||
type: BasicHttpAuthenticator | ||
username: "{{ config['username'] }}" | ||
password: "{{ config['password'] }}" | ||
request_body_json: {} | ||
record_selector: | ||
type: RecordSelector | ||
extractor: | ||
type: DpathExtractor | ||
field_path: | ||
- transactions | ||
paginator: | ||
type: DefaultPaginator | ||
page_token_option: | ||
type: RequestPath | ||
page_size_option: | ||
inject_into: request_parameter | ||
type: RequestOption | ||
field_name: size | ||
pagination_strategy: | ||
type: CursorPagination | ||
page_size: 500 | ||
cursor_value: '{{ response.get("pagination", {}).get("next", {}) }}' | ||
stop_condition: '{{ not response.get("pagination", {}).get("next", {}) }}' | ||
spec: | ||
documentation_url: https://docs.airbyte.com/integrations/sources/klarna | ||
connection_specification: | ||
$schema: http://json-schema.org/draft-07/schema# | ||
title: Klarna Spec | ||
type: object | ||
required: | ||
- region | ||
- playground | ||
- username | ||
- password | ||
additionalProperties: true | ||
properties: | ||
region: | ||
title: Region | ||
type: string | ||
enum: | ||
- eu | ||
- us | ||
- oc | ||
description: Base url region (For playground eu https://docs.klarna.com/klarna-payments/api/payments-api/#tag/API-URLs). Supported 'eu', 'us', 'oc' | ||
playground: | ||
title: Playground | ||
type: boolean | ||
description: Propertie defining if connector is used against playground or production environment | ||
default: false | ||
username: | ||
title: Username | ||
type: string | ||
description: Consists of your Merchant ID (eid) - a unique number that identifies your e-store, combined with a random string (https://developers.klarna.com/api/#authentication) | ||
password: | ||
title: Password | ||
type: string | ||
description: A string which is associated with your Merchant ID and is used to authorize use of Klarna's APIs (https://developers.klarna.com/api/#authentication) | ||
airbyte_secret: true |
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.