From d82799dc2fef4a0bd781d983d540fdcbf2b1e17b Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Mon, 22 Jan 2024 21:21:50 -0600 Subject: [PATCH 01/36] Start Silver certification. Add new streams --- .../source_paypal_transaction/manifest.yaml | 99 ++++++++++++++++++- .../unit_tests/conftest.py | 15 +++ 2 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 58f6d026171a..95eb696c5c2e 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -16,7 +16,7 @@ definitions: requester: type: HttpRequester - url_base: 'https://api-m.{{ "sandbox." if config["is_sandbox"] }}paypal.com/v1/reporting/' + url_base: 'https://api-m.{{ "sandbox." if config["is_sandbox"] }}paypal.com/' path: "{{ parameters.path }}" http_method: GET request_headers: @@ -106,7 +106,7 @@ definitions: step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S $parameters: - path: "transactions" + path: "v1/reporting/transactions" field_path: transaction_details balances_stream: @@ -150,7 +150,100 @@ definitions: field_name: as_of_time inject_into: request_parameter $parameters: - path: "balances" + path: "v1/reporting/balances" + + search_invoices_stream: + type: DeclarativeStream + primary_key: id + name: "search_invoices" + #json_schema: "./schemas/search_invoices.json" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 100 + requester: + $ref: "#/definitions/requester" + http_method: POST + #path: "search-invoices" + request_parameters: + fields: all + request_body_json: + # payment_date_range: + # start: "{{ config['payment_start_date'] }}" + # end: "{{ config['payment_end_date'] }}" + # invoice_date_range: + # start: "{{ config['invoice_start_date'] }}" + # end: "{{ config['invoice_end_date'] }}" + # due_date_range: + # start: "{{ config['due_start_date'] }}" + # end: "{{ config['due_end_date'] }}" + creation_date_range: + start: "{{ config['creation_start_date'] }}" + end: "{{ config['creation_end_date'] }}" + transformations: + # - type: AddFields + # fields: + # - path: + # - invoice_created_by + # value: >- + # {{ format_datetime(record['detail']['metadata']['created_by'], '%Y-%m-%dT%H:%M:%SZ') }} + # - type: AddFields + # fields: + # - path: + # - invoice_updated_by + # value: >- + # {{ format_datetime(record['detail']['metadata']['last_updated_by'], '%Y-%m-%dT%H:%M:%SZ') }} + - type: AddFields + fields: + - path: + - invoice_updated_date + value: >- + {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + $parameters: + path: "v2/invoicing/search-invoices" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: invoice_updated_date + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: start + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: end + inject_into: request_parameter + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S + #incremental_sync: null + $parameters: + field_path: items + path: "v2/invoicing/invoices" streams: - "#/definitions/transactions_stream" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py new file mode 100644 index 000000000000..9a3cce34d229 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -0,0 +1,15 @@ +import pytest +from source_paypal_transaction import SourcePaypalTransaction + +@pytest.fixture(name="config") +def config_fixture(): + return { + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "start_date": "2022-01-01T00:00:00Z", + "is_sandbox": True + } + +@pytest.fixture(name="source") +def source_fixture(): + return SourcePaypalTransaction() \ No newline at end of file From d1b8976d4b13451c762acb361d4b17a2d9fedc95 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 24 Jan 2024 13:57:57 -0600 Subject: [PATCH 02/36] Add Search invoices stream. Parametrize some variables. --- .../integration_tests/configured_catalog.json | 10 + .../configured_catalog_search_invoices.json | 14 + .../source-paypal-transaction/metadata.yaml | 2 +- .../source_paypal_transaction/components.py | 14 +- .../source_paypal_transaction/manifest.yaml | 89 ++--- .../schemas/search_invoices.json | 306 ++++++++++++++++++ .../source_paypal_transaction/source.py | 4 +- 7 files changed, 377 insertions(+), 62 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index e0992dea17b0..c7f9340e8f79 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -20,6 +20,16 @@ }, "sync_mode": "incremental", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "default_cursor_field": ["invoice_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json new file mode 100644 index 000000000000..2d054072e24e --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json @@ -0,0 +1,14 @@ +{ + "streams": [ + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "default_cursor_field": ["invoice_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 69b2bdd25bc6..24705a6a5436 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -1,6 +1,6 @@ data: ab_internal: - ql: 200 + ql: 300 sl: 200 allowedHosts: hosts: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 332549f3b617..6db50df60ccd 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -42,6 +42,7 @@ def get_headers(self): @backoff.on_exception( backoff.expo, DefaultBackoffException, + max_tries=2, on_backoff=lambda details: logger.info( f"Caught retryable error after {details['tries']} tries. Waiting {details['wait']} seconds then retrying..." ), @@ -49,8 +50,17 @@ def get_headers(self): ) def _get_refresh_access_token_response(self): try: + request_url = self.get_token_refresh_endpoint() + request_headers = self.get_headers() + request_body = self.build_refresh_request_body() + + logger.info(f"Sending request to URL: {request_url}") + response = requests.request( - method="POST", url=self.get_token_refresh_endpoint(), data=self.build_refresh_request_body(), headers=self.get_headers() + method="POST" + , url=request_url + , data=request_body + , headers=request_headers ) self._log_response(response) response.raise_for_status() @@ -61,3 +71,5 @@ def _get_refresh_access_token_response(self): raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e + + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 95eb696c5c2e..142f1584dcd2 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -38,7 +38,7 @@ definitions: - type: DefaultErrorHandler backoff_strategies: - type: ConstantBackoffStrategy - backoff_time_in_seconds: 300 + backoff_time_in_seconds: 100 request_body_json: {} transactions_stream: @@ -156,7 +156,6 @@ definitions: type: DeclarativeStream primary_key: id name: "search_invoices" - #json_schema: "./schemas/search_invoices.json" retriever: type: SimpleRetriever record_selector: @@ -178,76 +177,48 @@ definitions: requester: $ref: "#/definitions/requester" http_method: POST - #path: "search-invoices" - request_parameters: - fields: all - request_body_json: - # payment_date_range: - # start: "{{ config['payment_start_date'] }}" - # end: "{{ config['payment_end_date'] }}" - # invoice_date_range: - # start: "{{ config['invoice_start_date'] }}" - # end: "{{ config['invoice_end_date'] }}" - # due_date_range: - # start: "{{ config['due_start_date'] }}" - # end: "{{ config['due_end_date'] }}" - creation_date_range: - start: "{{ config['creation_start_date'] }}" - end: "{{ config['creation_end_date'] }}" + request_headers: + Content-Type: application/json transformations: - # - type: AddFields - # fields: - # - path: - # - invoice_created_by - # value: >- - # {{ format_datetime(record['detail']['metadata']['created_by'], '%Y-%m-%dT%H:%M:%SZ') }} - # - type: AddFields - # fields: - # - path: - # - invoice_updated_by - # value: >- - # {{ format_datetime(record['detail']['metadata']['last_updated_by'], '%Y-%m-%dT%H:%M:%SZ') }} - type: AddFields fields: - path: - invoice_updated_date value: >- {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + incremental_sync: + type: DatetimeBasedCursor + cursor_field: invoice_updated_date + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: creation_date_range.start + inject_into: body_json + end_time_option: + type: RequestOption + field_name: creation_date_range.end + inject_into: body_json + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S $parameters: + field_path: items path: "v2/invoicing/search-invoices" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: invoice_updated_date - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_time_option: - type: RequestOption - field_name: start - inject_into: request_parameter - end_time_option: - type: RequestOption - field_name: end - inject_into: request_parameter - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S - #incremental_sync: null - $parameters: - field_path: items - path: "v2/invoicing/invoices" streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" + - "#/definitions/search_invoices_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json new file mode 100644 index 000000000000..288be6f5abab --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -0,0 +1,306 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "properties": { + "id": { "type": "string" }, + "status": { "type": "string" }, + "primary_recipients": { + "type": "object", + "properties": { + "billing_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": {"type": "string"}, + "address": {"type": "string"}, + "phones": {"type": "array"}, + "additiona_info": {"type": "string"}, + "email_address": {"type": "string"}, + "language": {"type": "string"} + }, + "shipping_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + } + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + } + } + } + } + } + } + }, + "additional_recipients": { "type": "array"}, + "detail": { + "type": "object", + "properties": { + "reference": { "type": "string" }, + "note": { "type": "string" }, + "terms_and_conditions": { "type": "string" }, + "memo": { "type": "string" }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "reference_url": { "type": "string" }, + "content_type": { "type": "string" }, + "size": { "type": "string" }, + "create_time": { "type": "string" } + } + } + }, + "currency_code": { "type": "string" }, + "invoice_number": { "type": "string" }, + "invoice_date": { "type": "string", "format": "date-time" }, + "payment_term": { + "type": "object", + "properties": { + "term_type": { "type": "string"}, + "due_date": { "type": "string", "format": "date-time" } + } + }, + "metadata": { + "type": "object", + "properties": { + "created_by": { "type": "string"}, + "last_updated_by": { "type": "string"}, + "create_time": { "type": "string", "format": "date-time" }, + "last_update_time": { "type": "string", "format": "date-time" }, + "cancelled_by": { "type": "string"}, + "last_seen_by": { "type": "string"}, + "recipient_view_url": { "type": "string"}, + "invoicer_view_url": { "type": "string"}, + "cancel_time": { "type": "string", "format": "date-time" }, + "first_sent_time": { "type": "string", "format": "date-time" }, + "last_sent_time": { "type": "string", "format": "date-time" }, + "created_by_flow": { "type": "string"} + } + } + } + }, + "invoicer": { + "type": "object", + "properties": { + "business_name": { "type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + }, + "phones": { + "type": "array", + "items": { + "type": "object", + "properties": { + "country_code": {"type": "string"}, + "national_number": {"type": "string"}, + "extension_number": {"type": "string"}, + "phone_type": {"type": "string"} + } + } + }, + "website": {"type": "string"}, + "tax_id": {"type": "string"}, + "additional_notes": {"type": "string"}, + "email_address": { "type": "string"} + } + } + + + } + }, + "configuration": { + "type": "object", + "properties": { + "tax_calculated_after_discount": {"type": "string"}, + "tax_inclusive": {"type": "string"}, + "allow_tip": {"type": "string"}, + "partial_payment": { + "type": "object", + "properties": { + "allow_partial_payment": {"type": "string"}, + "minimum_amount_due": {"type": "object"} + } + }, + "template_id": {"type": "string"} + } + }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"}, + "breakdown": { + "type": "object", + "properties": { + "item_total": {"type": "object"}, + "discount": {"type": "object"}, + "tax_total": {"type": "object"}, + "shipping": {"type": "object"}, + "custom": {"type": "object"} + } + } + } + }, + "due_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "gratuity": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "payments": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "payment_id": { "type": "string" }, + "note": { "type": "string" }, + "type": { "type": "string" }, + "payment_date":{ "type": "string", "format": "date-time" }, + "method": { "type": "string" }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "shipping_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + } + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + + } + } + } + } + } + } + }, + "paid_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + }, + "refunds": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "refund_id": { "type": "string" }, + "type": { "type": "string" }, + "refund_date":{ "type": "string", "format": "date-time" }, + "method": { "type": "string" }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + } + } + }, + "refund_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": "string", "format": "uri" }, + "rel": { "type": "string" }, + "method": { "type": "string" } + } + } + } + } + } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index afd56a9278a1..e86db7b35cc9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -3,6 +3,9 @@ # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource +import logging +logger = logging.getLogger("airbyte") + """ This file provides the necessary constructs to interpret a provided declarative YAML configuration file into @@ -11,7 +14,6 @@ WARNING: Do not modify this file. """ - # Declarative Source class SourcePaypalTransaction(YamlDeclarativeSource): def __init__(self): From 8a0a6bbbf2840554fa45e56179adfc467eb5d794 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 24 Jan 2024 22:57:47 -0600 Subject: [PATCH 03/36] Add new stream - Product catalog -. Add error handling for transactions incremental sync. Other Minor adjustments --- .../integration_tests/configured_catalog.json | 13 +- .../configured_catalog_products.json | 14 + .../expected_records_sandbox.jsonl | 3 +- .../source_paypal_transaction/components.py | 4 + .../source_paypal_transaction/manifest.yaml | 56 ++- .../schemas/products.json | 26 ++ .../schemas/search_invoices.json | 338 +++++++++--------- 7 files changed, 279 insertions(+), 175 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index c7f9340e8f79..0f97791daf76 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -25,11 +25,22 @@ "stream": { "name": "search_invoices", "json_schema": {}, - "default_cursor_field": ["invoice_updated_date"], + "source_defined_cursor": true, + "default_cursor_field": ["last_update_time"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "products", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json new file mode 100644 index 000000000000..39c22c39aaa1 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json @@ -0,0 +1,14 @@ +{ + "streams": [ + { + "stream": { + "name": "products", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl index da4775fecc29..53317576465a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl @@ -1,4 +1,5 @@ {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1694795587519} {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1694795587522} {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1694795587524} -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} \ No newline at end of file +{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} +{"stream": "products", "data": {"id": "1647236710", "name": "Blue M","description": "Blue M", "create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 6db50df60ccd..3d811723f3e4 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -10,6 +10,10 @@ import requests from airbyte_cdk.sources.declarative.auth import DeclarativeOauth2Authenticator from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException +from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester +from airbyte_cdk.sources.declarative.types import StreamState, StreamSlice +from typing import Any, MutableMapping, Optional, Mapping + logger = logging.getLogger("airbyte") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 142f1584dcd2..8f93f445d19b 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -41,6 +41,7 @@ definitions: backoff_time_in_seconds: 100 request_body_json: {} + #Stream Transactions transactions_stream: type: DeclarativeStream primary_key: transaction_id @@ -67,6 +68,15 @@ definitions: $ref: "#/definitions/requester" request_parameters: fields: all + error_handler: + type: CompositeErrorHandler + error_handlers: + - type: DefaultErrorHandler + description: "Handle HTTP 400 with error message: Data for the given start date is not available. " + response_filters: + - http_codes: [400] + action: IGNORE + predicate: "{{ 'Data for the given start date is not available' in response['message']}}" transformations: - type: AddFields fields: @@ -108,7 +118,8 @@ definitions: $parameters: path: "v1/reporting/transactions" field_path: transaction_details - + + #Stream balances balances_stream: type: DeclarativeStream primary_key: as_of_time @@ -152,6 +163,7 @@ definitions: $parameters: path: "v1/reporting/balances" + #Stream search Invoices search_invoices_stream: type: DeclarativeStream primary_key: id @@ -173,7 +185,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 100 + page_size: 20 requester: $ref: "#/definitions/requester" http_method: POST @@ -183,12 +195,11 @@ definitions: - type: AddFields fields: - path: - - invoice_updated_date - value: >- - {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + - last_update_time + value: "{{ format_datetime(record['detail']['metadata']['last_update_time'], '%Y-%m-%dT%H:%M:%SZ') }}" incremental_sync: type: DatetimeBasedCursor - cursor_field: invoice_updated_date + cursor_field: last_update_time cursor_datetime_formats: - "%Y-%m-%dT%H:%M:%SZ" datetime_format: "%Y-%m-%dT%H:%M:%SZ" @@ -214,11 +225,44 @@ definitions: $parameters: field_path: items path: "v2/invoicing/search-invoices" + + #New Stream + products_stream: + type: DeclarativeStream + primary_key: id + name: "products" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 10 + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + requester: + $ref: "#/definitions/requester" + http_method: GET + request_headers: + Content-Type: application/json + $parameters: + path: "v1/catalogs/products" + field_path: products streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/search_invoices_stream" + - "#/definitions/products_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json new file mode 100644 index 000000000000..d587291c7550 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "method": {"type": ["null", "string"]} + } + } + } + } +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json index 288be6f5abab..7075eb5865c9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -1,52 +1,52 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", + "type": ["null", "object"], "additionalProperties": true, "properties": { - "id": { "type": "string" }, - "status": { "type": "string" }, + "id": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, "primary_recipients": { - "type": "object", + "type": ["null", "object"], "properties": { "billing_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, - "name": {"type": "string"}, - "address": {"type": "string"}, - "phones": {"type": "array"}, - "additiona_info": {"type": "string"}, - "email_address": {"type": "string"}, - "language": {"type": "string"} + "business_name": {"type": ["null", "string"]}, + "name": {"type": ["null", "string"]}, + "address": {"type": ["null", "string"]}, + "phones": {"type": ["null", "array"]}, + "additiona_info": {"type": ["null", "string"]}, + "email_address": {"type": ["null", "string"]}, + "language": {"type": ["null", "string"]} }, "shipping_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, + "business_name": {"type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} } }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } } } @@ -54,100 +54,104 @@ } } }, - "additional_recipients": { "type": "array"}, + "additional_recipients": { "type": ["null", "array"]}, "detail": { - "type": "object", + "type": ["null", "object"], "properties": { - "reference": { "type": "string" }, - "note": { "type": "string" }, - "terms_and_conditions": { "type": "string" }, - "memo": { "type": "string" }, + "reference": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "terms_and_conditions": { "type": ["null", "string"] }, + "memo": { "type": ["null", "string"] }, "attachments": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "id": { "type": "string" }, - "reference_url": { "type": "string" }, - "content_type": { "type": "string" }, - "size": { "type": "string" }, - "create_time": { "type": "string" } + "id": { "type": ["null", "string"] }, + "reference_url": { "type": ["null", "string"] }, + "content_type": { "type": ["null", "string"] }, + "size": { "type": ["null", "string"] }, + "create_time": { "type": ["null", "string"] } } } }, - "currency_code": { "type": "string" }, - "invoice_number": { "type": "string" }, - "invoice_date": { "type": "string", "format": "date-time" }, + "currency_code": { "type": ["null", "string"] }, + "invoice_number": { "type": ["null", "string"] }, + "invoice_date": { "type": ["null", "string"], "format": "date-time" }, "payment_term": { - "type": "object", + "type": ["null", "object"], "properties": { - "term_type": { "type": "string"}, - "due_date": { "type": "string", "format": "date-time" } + "term_type": { "type": ["null", "string"]}, + "due_date": { "type": ["null", "string"], "format": "date-time" } } }, "metadata": { - "type": "object", + "type": ["null", "object"], "properties": { - "created_by": { "type": "string"}, - "last_updated_by": { "type": "string"}, - "create_time": { "type": "string", "format": "date-time" }, - "last_update_time": { "type": "string", "format": "date-time" }, - "cancelled_by": { "type": "string"}, - "last_seen_by": { "type": "string"}, - "recipient_view_url": { "type": "string"}, - "invoicer_view_url": { "type": "string"}, - "cancel_time": { "type": "string", "format": "date-time" }, - "first_sent_time": { "type": "string", "format": "date-time" }, - "last_sent_time": { "type": "string", "format": "date-time" }, - "created_by_flow": { "type": "string"} + "created_by": { "type": ["null", "string"]}, + "last_updated_by": { "type": ["null", "string"]}, + "create_time": { "type": ["null", "string"], "format": "date-time" }, + "last_update_time": { "type": ["null", "string"], "format": "date-time" }, + "cancelled_by": { "type": ["null", "string"]}, + "last_seen_by": { "type": ["null", "string"]}, + "recipient_view_url": { "type": ["null", "string"]}, + "invoicer_view_url": { "type": ["null", "string"]}, + "cancel_time": { "type": ["null", "string"], "format": "date-time" }, + "first_sent_time": { "type": ["null", "string"], "format": "date-time" }, + "last_sent_time": { "type": ["null", "string"], "format": "date-time" }, + "created_by_flow": { "type": ["null", "string"]} } } } }, + "last_update_time": { + "type": ["null", "string"], + "format": "date-time" + }, "invoicer": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": { "type": "string"}, + "business_name": { "type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} }, "phones": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "country_code": {"type": "string"}, - "national_number": {"type": "string"}, - "extension_number": {"type": "string"}, - "phone_type": {"type": "string"} + "country_code": {"type": ["null", "string"]}, + "national_number": {"type": ["null", "string"]}, + "extension_number": {"type": ["null", "string"]}, + "phone_type": {"type": ["null", "string"]} } } }, - "website": {"type": "string"}, - "tax_id": {"type": "string"}, - "additional_notes": {"type": "string"}, - "email_address": { "type": "string"} + "website": {"type": ["null", "string"]}, + "tax_id": {"type": ["null", "string"]}, + "additional_notes": {"type": ["null", "string"]}, + "email_address": { "type": ["null", "string"]} } } @@ -155,98 +159,98 @@ } }, "configuration": { - "type": "object", + "type": ["null", "object"], "properties": { - "tax_calculated_after_discount": {"type": "string"}, - "tax_inclusive": {"type": "string"}, - "allow_tip": {"type": "string"}, + "tax_calculated_after_discount": {"type": ["null", "string"]}, + "tax_inclusive": {"type": ["null", "string"]}, + "allow_tip": {"type": ["null", "string"]}, "partial_payment": { - "type": "object", + "type": ["null", "object"], "properties": { - "allow_partial_payment": {"type": "string"}, - "minimum_amount_due": {"type": "object"} + "allow_partial_payment": {"type": ["null", "string"]}, + "minimum_amount_due": {"type": ["null", "object"]} } }, - "template_id": {"type": "string"} + "template_id": {"type": ["null", "string"]} } }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"}, + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]}, "breakdown": { - "type": "object", + "type": ["null", "object"], "properties": { - "item_total": {"type": "object"}, - "discount": {"type": "object"}, - "tax_total": {"type": "object"}, - "shipping": {"type": "object"}, - "custom": {"type": "object"} + "item_total": {"type": ["null", "object"]}, + "discount": {"type": ["null", "object"]}, + "tax_total": {"type": ["null", "object"]}, + "shipping": {"type": ["null", "object"]}, + "custom": {"type": ["null", "object"]} } } } }, "due_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "gratuity": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "payments": { "transactions": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "payment_id": { "type": "string" }, - "note": { "type": "string" }, - "type": { "type": "string" }, - "payment_date":{ "type": "string", "format": "date-time" }, - "method": { "type": "string" }, + "payment_id": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "payment_date":{ "type": ["null", "string"], "format": "date-time" }, + "method": { "type": ["null", "string"] }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "shipping_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, + "business_name": {"type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} } }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } } @@ -256,49 +260,49 @@ } }, "paid_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } }, "refunds": { "transactions": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "refund_id": { "type": "string" }, - "type": { "type": "string" }, - "refund_date":{ "type": "string", "format": "date-time" }, - "method": { "type": "string" }, + "refund_id": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "refund_date":{ "type": ["null", "string"], "format": "date-time" }, + "method": { "type": ["null", "string"] }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } } } }, "refund_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } }, "links": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "href": { "type": "string", "format": "uri" }, - "rel": { "type": "string" }, - "method": { "type": "string" } + "href": { "type": ["null", "string"], "format": "uri" }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } From 57a62e992677d92eebc7db0a812aa3b557943781 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 25 Jan 2024 19:42:39 -0600 Subject: [PATCH 04/36] New Stream - list disputes. Add data generator to test data. --- .../source-paypal-transaction/bin/invoices.py | 240 ++++++++++++++++++ .../bin/paypal_transaction_generator.py | 8 +- .../bin/product_catalog.py | 77 ++++++ .../integration_tests/configured_catalog.json | 11 + .../configured_catalog_list_disputes.json | 16 ++ .../source_paypal_transaction/manifest.yaml | 93 ++++--- .../schemas/list_disputes.json | 28 ++ 7 files changed, 437 insertions(+), 36 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py create mode 100755 airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py new file mode 100644 index 000000000000..4a096a0cdf94 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py @@ -0,0 +1,240 @@ +import requests +import random +import string +import base64 +import json +import argparse +from datetime import datetime, timedelta + +# Function to generate a random alphanumeric string +def generate_random_string(length=10): + return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + + +# Function to create a draft invoice +def create_draft_invoice(access_token, invoice_date, term_type, due_date): + url = "https://api-m.sandbox.paypal.com/v2/invoicing/invoices" + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} + data = { + # "detail": { + # "invoice_number": generate_random_string(8), + # "invoice_date": invoice_date, + # "payment_term": {"term_type": term_type, "due_date": due_date}, + # } + "detail": { + "invoice_number": generate_random_string(8), + "invoice_date": invoice_date, + "payment_term": {"term_type": term_type, "due_date": due_date}, + "currency_code": "USD", + "reference": "", + "note": "", + "terms_and_conditions": "", + "memo": "" + }, + "invoicer": { + "name": { + "given_name": "David", + "surname": "Larusso" + }, + "address": { + "address_line_1": "123 Townsend St", + "address_line_2": "Floor 6", + "admin_area_2": "San Francisco", + "admin_area_1": "CA", + "postal_code": "94107", + "country_code": "US" + }, + "phones": [ + { + "country_code": "001", + "national_number": "4085551234", + "phone_type": "MOBILE" + } + ], + "website": "www.example.com", + "tax_id": "XX-XXXXXXX", + "logo_url": "https://example.com/logo.png", + "additional_notes": "" + }, + "primary_recipients": [ + { + "billing_info": { + "name": { + "given_name": "Stephanie", + "surname": "Meyers" + }, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US" + }, + "email_address": "foobuyer@example.com", + "phones": [ + { + "country_code": "001", + "national_number": "4884551234", + "phone_type": "HOME" + } + ], + "additional_info_value": "add-info" + }, + "shipping_info": { + "name": { + "given_name": "Stephanie", + "surname": "Meyers" + }, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US" + } + } + } + ], + "items": [ + { + "name": "Yoga Mat", + "description": "Elastic mat to practice yoga.", + "quantity": "1", + "unit_amount": { + "currency_code": "USD", + "value": "50.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + }, + "discount": { + "percent": "5" + }, + "unit_of_measure": "QUANTITY" + }, + { + "name": "Yoga t-shirt", + "quantity": "1", + "unit_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + }, + "discount": { + "amount": { + "currency_code": "USD", + "value": "5.00" + } + }, + "unit_of_measure": "QUANTITY" + } + ], + "configuration": { + "partial_payment": { + "allow_partial_payment": True, + "minimum_amount_due": { + "currency_code": "USD", + "value": "20.00" + } + }, + "allow_tip": True, + "tax_calculated_after_discount": True, + "tax_inclusive": False + }, + "amount": { + "breakdown": { + "custom": { + "label": "Packing Charges", + "amount": { + "currency_code": "USD", + "value": "10.00" + } + }, + "shipping": { + "amount": { + "currency_code": "USD", + "value": "10.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + } + }, + "discount": { + "invoice_discount": { + "percent": "5" + } + } + } + } + + } + response = requests.post(url, headers=headers, json=data) + return response.json() + +# Function to send an existing draft invoice +def send_draft_invoice(access_token, invoice_id, subject, note, additional_recipients): + url = f"https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/send" + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} + data = { + "subject": subject, + "note": note, + "send_to_recipient": True, + "additional_recipients": additional_recipients, + "send_to_invoicer": False + } + response = requests.post(url, headers=headers, json=data) + return response.json() + +# Main function +def main(): + parser = argparse.ArgumentParser(description="PayPal Invoice Actions") + parser.add_argument("action", help="Action to perform: create_draft or send_draft") + parser.add_argument("--invoice_id", help="Invoice ID (required for send_draft)") + parser.add_argument("--subject", help="Subject for the invoice email") + parser.add_argument("--note", help="Note for the invoice email") + parser.add_argument("--additional_recipients", nargs='*', help="Additional recipients for the invoice email") + args = parser.parse_args() + + CREDS = read_json("../secrets/config.json") + + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + access_token = get_paypal_token(client_id, secret_id) + + if args.action == 'create_draft': + invoice_date = datetime.now().strftime('%Y-%m-%d') + term_type = "NET_30" + due_date = (datetime.now() + timedelta(days=30)).strftime('%Y-%m-%d') + result = create_draft_invoice(access_token, invoice_date, term_type, due_date) + print("Draft Invoice Created:", result) + elif args.action == 'send_draft': + if not args.invoice_id: + print("Invoice ID is required for sending a draft invoice.") + return + result = send_draft_invoice(access_token, args.invoice_id, args.subject, args.note, args.additional_recipients) + print("Draft Invoice Sent:", result) + else: + print("Invalid action specified") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index 8fa96fae513f..4d4fcfc554a1 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -6,7 +6,7 @@ # REQUIREMENTS: # 1. sudo apt-get install chromium-chromedriver # 2. pip install selenium -# 3. ../secrets/creds.json with buyers email/password and account client_id/secret +# 3. ../secrets/config.json with buyers email/password and account client_id/secret # HOW TO USE: # python paypal_transaction_generator.py - will generate 3 transactions by default @@ -95,7 +95,7 @@ def read_json(filepath): def get_api_token(): client_id = CREDS.get("client_id") - secret = CREDS.get("secret") + secret = CREDS.get("client_secret") token_refresh_endpoint = "https://api-m.sandbox.paypal.com/v1/oauth2/token" data = "grant_type=client_credentials" @@ -103,7 +103,7 @@ def get_api_token(): auth = (client_id, secret) response = requests.request(method="POST", url=token_refresh_endpoint, data=data, headers=headers, auth=auth) response_json = response.json() - # print(response_json) + print("RESPONSE -->",response_json) API_TOKEN = response_json["access_token"] return API_TOKEN @@ -187,7 +187,7 @@ def execute_payment(url): TOTAL_TRANSACTIONS = int(sys.argv[1]) if len(sys.argv) > 1 else 3 -CREDS = read_json("../secrets/creds.json") +CREDS = read_json("../secrets/config.json") headers = {"Authorization": f"Bearer {get_api_token()}", "Content-Type": "application/json"} driver = login() cookies_accepted = False diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py new file mode 100755 index 000000000000..547c8e497772 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -0,0 +1,77 @@ +# +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# python product_catalog.py +# NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized +# TODO: Generate N products in one run. + +import requests +import random +import string +import base64 +import json + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def generate_random_string(length=10): + """Generate a random string of fixed length.""" + letters = string.ascii_letters + return ''.join(random.choice(letters) for i in range(length)) + +def get_paypal_token(client_id, secret_id): + """Get a bearer token from PayPal.""" + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = { + "grant_type": "client_credentials" + } + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def create_paypal_product(access_token): + """Create a product in PayPal.""" + url = "https://api-m.sandbox.paypal.com/v1/catalogs/products" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {access_token}" + } + payload = { + "name": "Pines-T-Shirt-" + generate_random_string(5), + "type": "PHYSICAL", + "id": generate_random_string(10), + "description": "Cotton XL", + "category": "CLOTHING", + "image_url": "https://example.com/gallary/images/" + generate_random_string(10) + ".jpg", + "home_url": "https://example.com/catalog/" + generate_random_string(10) + ".jpg" + } + response = requests.post(url=url, json=payload, headers=headers) + return response.json() +# Replace with your actual client_id and secret_id from PayPal + +CREDS = read_json("../secrets/config.json") + +client_id = CREDS.get("client_id") +secret_id = CREDS.get("client_secret") + +# Get the access token +access_token = get_paypal_token(client_id, secret_id) +# Create a product using the access token + +product = create_paypal_product(access_token) +print(product) + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index 0f97791daf76..2ba8b065fb8c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -41,6 +41,17 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json new file mode 100644 index 000000000000..5e67c67494c9 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json @@ -0,0 +1,16 @@ +{ + "streams": [ + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 8f93f445d19b..0e0b562e6c13 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -163,7 +163,9 @@ definitions: $parameters: path: "v1/reporting/balances" - #Stream search Invoices + #Stream search Invoices + # Currently it does not support incremental sync as metadata does not contain last_update_date + # TODO: Review if this is only a sandbox problem search_invoices_stream: type: DeclarativeStream primary_key: id @@ -191,37 +193,10 @@ definitions: http_method: POST request_headers: Content-Type: application/json - transformations: - - type: AddFields - fields: - - path: - - last_update_time - value: "{{ format_datetime(record['detail']['metadata']['last_update_time'], '%Y-%m-%dT%H:%M:%SZ') }}" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: last_update_time - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_time_option: - type: RequestOption - field_name: creation_date_range.start - inject_into: body_json - end_time_option: - type: RequestOption - field_name: creation_date_range.end - inject_into: body_json - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S + request_body_json: + creation_date_range: + start: "{{ config['start_date'] }}" + end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -258,11 +233,65 @@ definitions: path: "v1/catalogs/products" field_path: products + #Stream List Disputes + list_disputes_stream: + type: DeclarativeStream + primary_key: dispute_id + name: "list_disputes" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: next_page_token + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 50 + requester: + $ref: "#/definitions/requester" + http_method: GET + request_parameters: + start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" + # incremental_sync: + # type: DatetimeBasedCursor + # cursor_field: update_time + # cursor_datetime_formats: + # - "%Y-%m-%dT%H:%M:%SZ" + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # start_datetime: + # type: MinMaxDatetime + # datetime: >- + # {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # start_time_option: + # type: RequestOption + # field_name: start_time + # inject_into: request_parameter + # end_datetime: + # type: MinMaxDatetime + # datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # step: "P{{ config.get('time_window', 7) }}D" + # cursor_granularity: PT1S + $parameters: + path: "v1/customer/disputes" + field_path: items + streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/search_invoices_stream" - "#/definitions/products_stream" + - "#/definitions/list_disputes_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json new file mode 100644 index 000000000000..febfb55f7b58 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "dispute_id": { "type": ["null", "string"] }, + "create_time": { "type": "string", "format": "date-time" }, + "update_time": { "type": "string", "format": "date-time" }, + "status": { "type": ["null", "string"] }, + "reason": { "type": ["null", "string"] }, + "dispute_state": { "type": ["null", "string"] }, + "dispute_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "links": { + "type": ["null", "object"], + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "methid": {"type": ["null", "string"]} + } + } + } + } \ No newline at end of file From ca8e027dadcb99ed2a5b3317b0c780f32588c34f Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 26 Jan 2024 19:14:16 -0600 Subject: [PATCH 05/36] Add new stream and substream - show product details. --- .../bin/product_catalog.py | 51 +++++- .../integration_tests/configured_catalog.json | 32 ++-- ... => configured_catalog_list_products.json} | 2 +- ...nfigured_catalog_show_product_details.json | 15 ++ .../source_paypal_transaction/manifest.yaml | 158 +++++++++++------- .../{products.json => list_products.json} | 0 .../schemas/show_product_details.json | 29 ++++ 7 files changed, 202 insertions(+), 85 deletions(-) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{configured_catalog_products.json => configured_catalog_list_products.json} (88%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json rename airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/{products.json => list_products.json} (100%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index 547c8e497772..66ac7df719e3 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -11,7 +11,8 @@ # } # HOW TO USE: -# python product_catalog.py +# To create a new product: python script_name.py --action create +#To update an existing product: python script_name.py --action update --product_id # NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized # TODO: Generate N products in one run. @@ -20,6 +21,7 @@ import string import base64 import json +import argparse def read_json(filepath): with open(filepath, "r") as f: @@ -61,17 +63,48 @@ def create_paypal_product(access_token): } response = requests.post(url=url, json=payload, headers=headers) return response.json() -# Replace with your actual client_id and secret_id from PayPal -CREDS = read_json("../secrets/config.json") +def update_paypal_product(access_token, product_id, updates): + """Update a product in PayPal.""" + url = f"https://api-m.sandbox.paypal.com/v1/catalogs/products/{product_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {access_token}" + } + response = requests.patch(url=url, json=updates, headers=headers) + if response.status_code == 204: + print(f"Update Successful. Response {response.status_code}. This succesful repsonse has no response body") + return None + else: + print(f"Error: {response.status_code}, {response.text}") + return None + +# Parse command line arguments +parser = argparse.ArgumentParser(description='Create or Update a PayPal Product.') +parser.add_argument('--action', choices=['create', 'update'], required=True, help='Action to perform: create or update') +parser.add_argument('--product_id', help='Product ID for update action') +args = parser.parse_args() + +# Common setup +CREDS = read_json("../secrets/config.json") client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") - -# Get the access token access_token = get_paypal_token(client_id, secret_id) -# Create a product using the access token - -product = create_paypal_product(access_token) -print(product) +# Perform action based on arguments +if args.action == 'create': + product = create_paypal_product(access_token) + print("Created product:", product) +elif args.action == 'update' and args.product_id: + updates = [ + { + "op": "replace", + "path": "/description", + "value": "Anothe rUpdate. Let's see if something changes or not" + } + ] + product = update_paypal_product(access_token, args.product_id, updates) + print("Updated product:", product) +else: + print("Invalid arguments") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index 2ba8b065fb8c..e041d4a5db1a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -23,24 +23,24 @@ }, { "stream": { - "name": "search_invoices", + "name": "list_products", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["last_update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", - "destination_sync_mode": "append" + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" }, { "stream": { - "name": "products", + "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": false, - "supported_sync_modes": ["full_refresh"] + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] }, - "sync_mode": "full_refresh", - "destination_sync_mode": "overwrite" + "sync_mode": "incremental", + "destination_sync_mode": "append" }, { "stream": { @@ -52,6 +52,16 @@ }, "sync_mode": "incremental", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json similarity index 88% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json index 39c22c39aaa1..2fc44b85cdb7 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json @@ -2,7 +2,7 @@ "streams": [ { "stream": { - "name": "products", + "name": "list_products", "json_schema": {}, "source_defined_cursor": false, "supported_sync_modes": ["full_refresh"] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json new file mode 100644 index 000000000000..70244ebf32d3 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json @@ -0,0 +1,15 @@ +{ + "streams": [ + { + "stream": { + "name": "show_product_details", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 0e0b562e6c13..1b56cbc42782 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -162,50 +162,12 @@ definitions: inject_into: request_parameter $parameters: path: "v1/reporting/balances" - - #Stream search Invoices - # Currently it does not support incremental sync as metadata does not contain last_update_date - # TODO: Review if this is only a sandbox problem - search_invoices_stream: - type: DeclarativeStream - primary_key: id - name: "search_invoices" - retriever: - type: SimpleRetriever - record_selector: - $ref: "#/definitions/selector" - paginator: - type: DefaultPaginator - page_token_option: - type: RequestOption - inject_into: request_parameter - field_name: page - page_size_option: - inject_into: request_parameter - field_name: page_size - type: RequestOption - pagination_strategy: - type: PageIncrement - start_from_page: 1 - page_size: 20 - requester: - $ref: "#/definitions/requester" - http_method: POST - request_headers: - Content-Type: application/json - request_body_json: - creation_date_range: - start: "{{ config['start_date'] }}" - end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - $parameters: - field_path: items - path: "v2/invoicing/search-invoices" - #New Stream - products_stream: + #New Stream - List Product + list_products_stream: type: DeclarativeStream primary_key: id - name: "products" + name: "list_products" retriever: type: SimpleRetriever record_selector: @@ -233,6 +195,55 @@ definitions: path: "v1/catalogs/products" field_path: products + # New Stream - Show Product Details + show_product_details_stream: + type: DeclarativeStream + primary_key: id + name: "show_product_details" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: "/v1/catalogs/products/{{ stream_slice.product_id }}" + record_selector: + $ref: "#/definitions/selector" + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: NoPagination + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + partition_field: "product_id" + stream: + $ref: "#/definitions/list_products_stream" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: update_time + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S + transformations: + - type: AddFields + fields: + - path: + - product_id + value: "{{ stream_slice.product_id }}" + #Stream List Disputes list_disputes_stream: type: DeclarativeStream @@ -261,37 +272,56 @@ definitions: http_method: GET request_parameters: start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" - # incremental_sync: - # type: DatetimeBasedCursor - # cursor_field: update_time - # cursor_datetime_formats: - # - "%Y-%m-%dT%H:%M:%SZ" - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # start_datetime: - # type: MinMaxDatetime - # datetime: >- - # {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # start_time_option: - # type: RequestOption - # field_name: start_time - # inject_into: request_parameter - # end_datetime: - # type: MinMaxDatetime - # datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # step: "P{{ config.get('time_window', 7) }}D" - # cursor_granularity: PT1S $parameters: path: "v1/customer/disputes" field_path: items +#Stream search Invoices + # Currently it does not support incremental sync as metadata does not contain last_update_date + # TODO: Review if this is only a sandbox problem + search_invoices_stream: + type: DeclarativeStream + primary_key: id + name: "search_invoices" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 20 + requester: + $ref: "#/definitions/requester" + http_method: POST + request_headers: + Content-Type: application/json + request_body_json: + creation_date_range: + start: "{{ config['start_date'] }}" + end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + $parameters: + field_path: items + path: "v2/invoicing/search-invoices" + + streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - - "#/definitions/search_invoices_stream" - - "#/definitions/products_stream" + - "#/definitions/list_products_stream" + - "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" + - "#/definitions/search_invoices_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json rename to airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json new file mode 100644 index 000000000000..0316579b9b2d --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": {"type": ["null", "string"]}, + "name": {"type": ["null", "string"]}, + "description": {"type": ["null", "string"]}, + "type": {"type": ["null", "string"]}, + "category": {"type": ["null", "string"]}, + "image_url": {"type": ["null", "string"]}, + "home_url": {"type": ["null", "string"]}, + "create_time": {"type": ["null", "string"], "format": "date-time"}, + "update_time": {"type": ["null", "string"], "format": "date-time"}, + "links": { + "type": "array", + "items": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "method": {"type": ["null", "string"]} + } + } + } + } +} + \ No newline at end of file From 4d35714d4dcdcc78172897c7c7c9aacdc44e1435 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 31 Jan 2024 22:33:11 -0600 Subject: [PATCH 06/36] Add new streams. Add seeding to some tests. Change Metadata version. --- .../bin/payments_generator.py | 116 ++++++++++ .../bin/product_catalog.py | 2 +- .../integration_tests/configured_catalog.json | 11 + .../configured_catalog_list_payments.json | 15 ++ .../source-paypal-transaction/metadata.yaml | 2 +- .../source_paypal_transaction/components.py | 6 +- .../source_paypal_transaction/manifest.yaml | 142 ++++++++----- .../schemas/list_payments.json | 201 ++++++++++++++++++ 8 files changed, 436 insertions(+), 59 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py new file mode 100644 index 000000000000..ec540f075089 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -0,0 +1,116 @@ +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# To create a new payment: python script_name.py create +#To update an existing product: +# python script_name.py update PAYMENT_ID '[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "50.00", "currency": "USD"}}]' +# NOTE: This is version does not work for CREATE PAYMENT as the HEADER requires data I can't get + + +import requests +import json +import sys +import base64 + +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def create_payment(token, security_context): + """Create a PayPal payment.""" + url = "https://api-m.paypal.com/v1/payments/payment" + headers = { + "Content-Type": "application/json", + #"Authorization": f"Bearer {token}", + "X-PAYPAL-SECURITY-CONTEXT": security_context + } + payload = { + "intent": "sale", + "transactions": [{ + "amount": { + "total": "30.00", + "currency": "USD", + "details": { + "subtotal": "30.00" + } + }, + "description": "This is a test - Pines test.", + "item_list": { + "items": [{ + "name": "My item", + "sku": "123445667", + "price": "15.00", + "currency": "USD", + "quantity": 2 + }], + } + }], + "payer": { + "payment_method": "paypal" + }, + "redirect_urls": { + "return_url": "http://example.com/return", + "cancel_url": "http://example.com/cancel" + } + } + print("AQUIIIII") + response = requests.post(url, headers=headers, json=payload) + print("PASOOOOOOOO") + return response.json() + +def update_payment(token, payment_id, updates): + """Update a PayPal payment.""" + url = f"https://api-m.paypal.com/v1/payments/payment/{payment_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + response = requests.patch(url, headers=headers, json=updates) + return response.json() + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def main(): + + CREDS = read_json("../secrets/config.json") + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + token = get_paypal_token(client_id, secret_id) + #security_context = '{"actor":{"account_number":"MDXWPD67GEP5W","party_id":"1659371090107732880","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dmOUZMwuKocrqe72Zx9D-Lf4"},"auth_token":"A015QQVR4S3u79k.UvhQ-AP4EhQikqOogdx-wIbvcvZ7Qaw","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"2245934915437588879","party_id":"2245934915437588879","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' + + + if sys.argv[1] == 'create': + payment = create_payment(token, security_context) + print("Created Payment:", payment) + + elif sys.argv[1] == 'update': + payment_id = sys.argv[2] + updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument + update_response = update_payment(token, payment_id, updates) + print("Update Response:", update_response) + + else: + print("Invalid command. Use 'create' or 'update'.") + +if __name__ == "__main__": + main() + +#'[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "25000.00", "currency": "BTC"}}]' \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index 66ac7df719e3..811c85ef406e 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -100,7 +100,7 @@ def update_paypal_product(access_token, product_id, updates): { "op": "replace", "path": "/description", - "value": "Anothe rUpdate. Let's see if something changes or not" + "value": "My Update. Does it changes it?" } ] product = update_paypal_product(access_token, args.product_id, updates) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index e041d4a5db1a..f12617d2c1e4 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -62,6 +62,17 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json new file mode 100644 index 000000000000..5a688c56ed10 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json @@ -0,0 +1,15 @@ +{ + "streams": [ + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 24705a6a5436..ad1a7d8d4454 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -11,7 +11,7 @@ data: connectorSubtype: api connectorType: source definitionId: d913b0f2-cc51-4e55-a44c-8ba1697b9239 - dockerImageTag: 2.2.1 + dockerImageTag: 2.3.1 dockerRepository: airbyte/source-paypal-transaction documentationUrl: https://docs.airbyte.com/integrations/sources/paypal-transaction githubIssueLabel: source-paypal-transaction diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 3d811723f3e4..53255384da1c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -12,7 +12,8 @@ from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester from airbyte_cdk.sources.declarative.types import StreamState, StreamSlice -from typing import Any, MutableMapping, Optional, Mapping +from typing import Any, MutableMapping, Optional, Mapping, Iterable + logger = logging.getLogger("airbyte") @@ -75,5 +76,4 @@ def _get_refresh_access_token_response(self): raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e - - + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 1b56cbc42782..218e983cd7ed 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -41,7 +41,12 @@ definitions: backoff_time_in_seconds: 100 request_body_json: {} + #NOTE: The streams Payments, Orders and Subscriptions require a webhook so you can register + #the Ids of each event as these endpoints do not have a GET method to list the Ids and use it + #in other streams + #Stream Transactions + #Paypal API only has V1 for this stream transactions_stream: type: DeclarativeStream primary_key: transaction_id @@ -120,6 +125,7 @@ definitions: field_path: transaction_details #Stream balances + #Paypal API only has V1 for this stream balances_stream: type: DeclarativeStream primary_key: as_of_time @@ -164,6 +170,7 @@ definitions: path: "v1/reporting/balances" #New Stream - List Product + #Paypal API only has V1 for this stream list_products_stream: type: DeclarativeStream primary_key: id @@ -177,7 +184,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 10 + page_size: 20 page_token_option: type: RequestOption inject_into: request_parameter @@ -194,61 +201,16 @@ definitions: $parameters: path: "v1/catalogs/products" field_path: products - - # New Stream - Show Product Details - show_product_details_stream: - type: DeclarativeStream - primary_key: id - name: "show_product_details" - retriever: - type: SimpleRetriever - requester: - $ref: "#/definitions/requester" - path: "/v1/catalogs/products/{{ stream_slice.product_id }}" - record_selector: - $ref: "#/definitions/selector" - extractor: - type: DpathExtractor - field_path: [] - paginator: - type: NoPagination - partition_router: - type: SubstreamPartitionRouter - parent_stream_configs: - - type: ParentStreamConfig - parent_key: "id" - partition_field: "product_id" - stream: - $ref: "#/definitions/list_products_stream" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: update_time - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S - transformations: - - type: AddFields - fields: - - path: - - product_id - value: "{{ stream_slice.product_id }}" - + #Stream List Disputes + #Paypal API only has V1 for this stream + #There is no way to create disputes via API, thus no incremental sync will be added to this stream + #until we have a testing account that allows us to create disputes over transactions. list_disputes_stream: type: DeclarativeStream primary_key: dispute_id name: "list_disputes" + retriever: type: SimpleRetriever record_selector: @@ -270,13 +232,15 @@ definitions: requester: $ref: "#/definitions/requester" http_method: GET - request_parameters: - start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" + request_parameters: + #Searches for the optional parameter dispute_start_date. + #If present, it formats the date accordingly. Otherwise, it defaults to a start date set 180 days in the past." + start_time: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" $parameters: path: "v1/customer/disputes" field_path: items -#Stream search Invoices + #Stream Search Invoices # Currently it does not support incremental sync as metadata does not contain last_update_date # TODO: Review if this is only a sandbox problem search_invoices_stream: @@ -314,6 +278,62 @@ definitions: field_path: items path: "v2/invoicing/search-invoices" + #Stream List Payments + #Currently uses V1 which is about to be derecated + #But there is no endpoint in v2 for listing payments + list_payments_stream: + type: DeclarativeStream + primary_key: id + name: "list_payments" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.next_id}}" + stop_condition: "{{ response.next_id == ''}}" + page_size: 20 + page_token_option: + type: RequestOption + field_name: start_id + inject_into: request_parameter + page_size_option: + type: RequestOption + field_name: count + inject_into: request_parameter + requester: + $ref: "#/definitions/requester" + request_parameters: + start_time: "{{ stream_interval.start_time.strftime('%Y-%m-%dT%H:%M:%SZ') }}" + end_time: "{{ stream_interval.end_time.strftime('%Y-%m-%dT%H:%M:%SZ') }}" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: update_time + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + #type: MinMaxDatetime + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: start_time + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: end_time + inject_into: request_parameter + step: "P1D" + cursor_granularity: PT1S + $parameters: + path: "v1/payments/payment" + field_path: payments streams: - "#/definitions/transactions_stream" @@ -322,6 +342,7 @@ streams: - "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" - "#/definitions/search_invoices_stream" + - "#/definitions/list_payments_stream" spec: type: Spec @@ -365,6 +386,19 @@ spec: description: "Determines whether to use the sandbox or production environment." type: "boolean" default: false + dispute_start_date: + title: Dispute Start Date Range + description: >- + Start Date parameter for the list dispute endpoint in ISO + format. This Start Date must be in range within 180 days before + present time, and requires ONLY 3 miliseconds(mandatory). + If you don't use this option, it defaults to a start date set 180 days in the past. + type: string + examples: ["2021-06-11T23:59:59.000Z"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ + format: "date-time" + order: 2 refresh_token: type: "string" title: "Refresh token" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json new file mode 100644 index 000000000000..bbfed47c59b5 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json @@ -0,0 +1,201 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "intent": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "cart": { "type": ["null", "string"] }, + "payer": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "payment_method": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, + "payer_info": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "email": { "type": ["null", "string"] }, + "first_name": { "type": ["null", "string"] }, + "last_name": { "type": ["null", "string"] }, + "payer_id": { "type": ["null", "string"] }, + "shipping_address": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "recipient_name": { "type": ["null", "string"] }, + "line1": { "type": ["null", "string"] }, + "city": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + }, + "phone": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + } + } + }, + "transactions": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "reference_id": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } + } + } + } + }, + "payee": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "merchant_id": { "type": ["null", "string"] }, + "email": { "type": ["null", "string"] } + } + }, + "description": { "type": ["null", "string"] }, + "item_list": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "items": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "price": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "tax": { "type": ["null", "string"] }, + "quantity": { "type": ["null", "integer"] }, + "image_url": { "type": ["null", "string"] } + } + } + }, + "shipping_address": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "recipient_name": { "type": ["null", "string"] }, + "line1": { "type": ["null", "string"] }, + "city": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + } + } + }, + "related_resources": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "sale": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } + } + } + } + }, + "payment_mode": { "type": ["null", "string"] }, + "protection_eligibility": { "type": ["null", "string"] }, + "protection_eligibility_type": { "type": ["null", "string"] }, + "transaction_fee": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "value": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] } + } + }, + "purchase_unit_reference_id": { "type": ["null", "string"] }, + "parent_payment": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } + } + } + } + } + } + } + } + } + } + } + }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } + } + } + } + } +} + \ No newline at end of file From b2a87c715d281c487b675ea63ed12ed847bc8d01 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Tue, 6 Feb 2024 22:23:08 -0600 Subject: [PATCH 07/36] Add tests. Organize and clean some code. Commented out show_product_details stream due performance concerns. --- .../source-paypal-transaction/CHANGELOG.md | 9 + .../acceptance-test-config.yml | 94 +++++++--- .../bin/disputes_generator.py | 89 ++++++++++ .../bin/payments_generator.py | 7 +- .../bin/paypal_transaction_generator.py | 58 ++++-- .../integration_tests/configured_catalog.json | 9 +- .../configured_catalog_list_disputes.json | 2 +- ...nfigured_catalog_show_product_details.json | 7 +- .../integration_tests/expected_records.jsonl | 1 - .../expected_records_sandbox.jsonl | 5 - .../full_refresh_catalog.json | 47 +++++ .../incremental_catalog.json | 47 +++++ .../invalid_config_oauth.json | 11 -- .../{ => sample_files}/abnormal_state.json | 22 +++ .../sample_files/expected_records.jsonl | 16 ++ .../expected_records_sandbox.jsonl | 85 +++++++++ .../{ => sample_files}/invalid_config.json | 0 .../{ => sample_files}/sample_config.json | 0 .../{ => sample_files}/sample_state.json | 0 .../{ => sample_files}/state.json | 0 .../source-paypal-transaction/setup.py | 4 +- .../source_paypal_transaction/components.py | 11 +- .../source_paypal_transaction/manifest.yaml | 165 ++++++++---------- .../schemas/list_disputes.json | 10 +- .../schemas/search_invoices.json | 114 +++++++----- .../source_paypal_transaction/source.py | 1 + .../source_paypal_transaction/spec.yaml | 65 +++++++ .../unit_tests/auth_components_test.py | 83 +++++++++ .../unit_tests/conftest.py | 46 ++++- 29 files changed, 793 insertions(+), 215 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/abnormal_state.json (50%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/invalid_config.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/sample_config.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/sample_state.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/state.json (100%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md index d84557504900..e421738b76c5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md @@ -2,3 +2,12 @@ ## 0.1.0 Source implementation with support of Transactions and Balances streams + +## 1.0.0 +Mark Client ID and Client Secret as required files + +## 2.1.0 +Migration to Low code + +## 2.3.1 +Adding New Streams - Payments, Disputes, Invoices, Product Catalog \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index c4ebc718cf3b..185a17f571af 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -1,69 +1,107 @@ # See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) # for more information about how to configure these tests +# Make sure the paths you have in each path matches with your data. connector_image: airbyte/source-paypal-transaction:dev test_strictness_level: high acceptance_tests: spec: tests: + #Test with Prod credentials (Make sure you purt the right ones) - spec_path: "source_paypal_transaction/spec.yaml" - config_path: secrets/config_oauth.json + config_path: secrets/config.json + backward_compatibility_tests_config: + disable_for_version: "0.1.13" + #Test With Sandbox Credentials + - spec_path: "source_paypal_transaction/spec.yaml" + config_path: secrets/config_sandbox.json backward_compatibility_tests_config: disable_for_version: "0.1.13" connection: tests: - - config_path: secrets/config_oauth.json + #Test With Prod Credentials + - config_path: secrets/config.json status: succeed - - config_path: secrets/config_oauth_sandbox.json - status: succeed - - config_path: integration_tests/invalid_config.json - status: failed - - config_path: integration_tests/invalid_config_oauth.json + #Test with Invalid Credentials + - config_path: integration_tests/sample_files/invalid_config.json status: failed + #Test with Sandbox Credentials + - config_path: secrets/config_sandbox.json + status: succeed discovery: tests: - - config_path: secrets/config_oauth.json + - config_path: secrets/config.json + backward_compatibility_tests_config: + disable_for_version: "2.0.0" # Change in cursor field for transactions stream + - config_path: secrets/config_sandbox.json backward_compatibility_tests_config: disable_for_version: "2.0.0" # Change in cursor field for transactions stream basic_read: tests: - - config_path: secrets/config_oauth.json - ignored_fields: - balances: - - name: last_refresh_time - bypass_reason: "field changes during every read" + #Test Prod Environment - Uncomment and change according to your prod setup + #Change the expected records, remember to align them with the timeframe you have selected + #Do not select streams that take more than 5 mins to load data as that can lead to timeouts + # - config_path: secrets/config.json + # empty_streams: + # - name: show_product_details + # bypass_reason: "Products may not exist" + # - name: list_products + # bypass_reason: "Product List may be too big causing timeout errors" + # - name: search_invoices + # bypass_reason: "Order makes the diff fail." + # ignored_fields: + # balances: + # - name: last_refresh_time + # bypass_reason: "field changes during every read" + # list_products: + # - name: description + # bypass_reason: "Sometimes it is not contained in the response" + # timeout_seconds: 3200 + # expect_records: + # path: "integration_tests/sample_files/expected_records.jsonl" + # extra_fields: yes + # exact_order: yes + # extra_records: no + # fail_on_extra_columns: False + ################## + ## Test Sandbox ## + - config_path: secrets/config_sandbox.json empty_streams: - - name: transactions - bypass_reason: "can not populate" - timeout_seconds: 1200 - expect_records: - path: "integration_tests/expected_records.jsonl" - extra_fields: no - exact_order: no - extra_records: yes - - config_path: secrets/config_oauth_sandbox.json + - name: show_product_details + bypass_reason: "Products may not exist" + - name: list_disputes + bypass_reason: "There may not be Disputes in the Sandbox" + - name: search_invoices + bypass_reason: "Retrieval Order makes the diff fail." ignored_fields: balances: - name: last_refresh_time bypass_reason: "field changes during every read" + list_products: + - name: description + bypass_reason: "Sometimes it is not contained in the response" timeout_seconds: 1200 expect_records: - path: "integration_tests/expected_records_sandbox.jsonl" + path: "integration_tests/sample_files/expected_records_sandbox.jsonl" extra_fields: no exact_order: no extra_records: yes fail_on_extra_columns: false incremental: tests: - - config_path: secrets/config_oauth.json - configured_catalog_path: integration_tests/configured_catalog.json + - config_path: secrets/config.json + configured_catalog_path: integration_tests/incremental_catalog.json future_state: - future_state_path: integration_tests/abnormal_state.json + future_state_path: integration_tests/sample_files/abnormal_state.json skip_comprehensive_incremental_tests: true full_refresh: tests: - - config_path: secrets/config_oauth.json + - config_path: secrets/config.json + configured_catalog_path: integration_tests/full_refresh_catalog.json ignored_fields: balances: - name: last_refresh_time bypass_reason: "field changes during every read" - configured_catalog_path: integration_tests/configured_catalog.json + list_products: + - name: description + bypass_reason: "Sometimes it is not contained in the response" + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py new file mode 100644 index 000000000000..f35460347d2f --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py @@ -0,0 +1,89 @@ +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# To create a new payment: python script_name.py create +#To update an existing dispute: +# python disputes_generator.py update DISPUTE_ID ''[{"op": "replace", "path": "/reason", "value": "The new reason"}]' +#To update a dispute status +#python update_dispute.py require-evidence DISPUTE_ID SELLER_EVIDENCE + +import requests +import json +import sys +import base64 +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def update_dispute(token, dispute_id, updates): + """Update a PayPal dispute.""" + url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + response = requests.patch(url, headers=headers, json=updates) + print("RESPONSE: ", response.text) + return response.json() + +def require_evidence(token, dispute_id, action): + """Require evidence for a PayPal dispute.""" + url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}/require-evidence" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + payload = { + "action": action + } + response = requests.post(url, headers=headers, json=payload) + print("RESPONSE: ", response.text) + return response.json() + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def main(): + + operation = sys.argv[1] + + CREDS = read_json("../secrets/config.json") + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + token = get_paypal_token(client_id, secret_id) + + + if operation == 'update': + dispute_id = sys.argv[2] + updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument + update_response = update_dispute(token, dispute_id, updates) + print("Update Response:", update_response) + + elif sys.argv[1] == 'require-evidence': + dispute_id = sys.argv[2] + action = sys.argv[3] # Either 'BUYER_EVIDENCE' or 'SELLER_EVIDENCE' + evidence_response = require_evidence(token, dispute_id, action) + print("Evidence Requirement Response:", evidence_response) + else: + print("Invalid command. Use 'create', 'update', or 'require-evidence'.") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py index ec540f075089..9a7df324ccb5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -65,13 +65,12 @@ def create_payment(token, security_context): "payment_method": "paypal" }, "redirect_urls": { - "return_url": "http://example.com/return", - "cancel_url": "http://example.com/cancel" + "return_url": "https://example.com/return", + "cancel_url": "https://example.com/cancel" } } - print("AQUIIIII") + response = requests.post(url, headers=headers, json=payload) - print("PASOOOOOOOO") return response.json() def update_payment(token, payment_id, updates): diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index 4d4fcfc554a1..463f327e3da1 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -7,6 +7,17 @@ # 1. sudo apt-get install chromium-chromedriver # 2. pip install selenium # 3. ../secrets/config.json with buyers email/password and account client_id/secret +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true, +# "buyer_username": "", #This could be also your test Sandbox email generated by the system +# "buyer_password": "", #This could be also your test Sandbox pawd generated by the system +# "payer_id": "" # This is the Account ID, yours or your Sandbox generated user + +# } # HOW TO USE: # python paypal_transaction_generator.py - will generate 3 transactions by default @@ -142,15 +153,16 @@ def make_payment(): # APPROVE PAYMENT def login(): - driver = webdriver.Chrome("/usr/bin/chromedriver") + #driver = webdriver.Chrome("/usr/bin/chromedriver") + driver = webdriver.Chrome() # SIGN_IN driver.get("https://www.sandbox.paypal.com/ua/signin") - driver.find_element_by_id("email").send_keys(CREDS["buyer_username"]) - driver.find_element_by_id("btnNext").click() + driver.find_element(By.ID, "email").send_keys(CREDS["buyer_username"]) + driver.find_element(By.ID, "btnNext").click() sleep(2) - driver.find_element_by_id("password").send_keys(CREDS["buyer_password"]) - driver.find_element_by_id("btnLogin").click() + driver.find_element(By.ID, "password").send_keys(CREDS["buyer_password"]) + driver.find_element(By.ID, "btnLogin").click() return driver @@ -160,13 +172,21 @@ def approve_payment(driver, url): sleep(3) if not cookies_accepted: - cookies = driver.find_element_by_id("acceptAllButton") - if cookies: - cookies.click() + try: + cookies_button = WebDriverWait(driver, 10).until( + EC.element_to_be_clickable((By.ID, "acceptAllButton")) + ) + cookies_button.click() + cookies_accepted = True + except Exception as e: + print("Could not find the accept all cookies button, exception:", e) + # cookies = driver.find_element(By.ID, "acceptAllButton") + # if cookies: + # cookies.click() + + # cookies_accepted = True - cookies_accepted = True driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") - element = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ID, "payment-submit-btn"))) sleep(1) element.click() @@ -178,12 +198,20 @@ def approve_payment(driver, url): wait.until(EC.title_is("Example Domain")) print(f"Payment approved: {driver.current_url}") - def execute_payment(url): - response = requests.request(method="POST", url=url, data='{"payer_id": "ZE5533HZPGMC6"}', headers=headers) - response_json = response.json() - print(f'Payment executed: {url} with STATE: {response_json["state"]}') - + try: + # Attempt to make the POST request + response = requests.post(url, data=json.dumps({"payer_id": CREDS.get("payer_id")}), headers=headers) + response_json = response.json() + # Check if the request was successful + if response.status_code == 200: + print(f"Your payment has been successfully executed to {url} with STATE: {response_json['state']}") + else: + # If the response code is not 200, print the error message + print(f"Your payment execution was not successful. You got {response.status_code} with message {response.json().get('message', 'No message available')}.") + except requests.exceptions.RequestException as e: + # If an error occurs during the request, print the error + print(f"An error occurred: {e}") TOTAL_TRANSACTIONS = int(sys.argv[1]) if len(sys.argv) > 1 else 3 diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index f12617d2c1e4..0c7e6869f3a9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -35,11 +35,10 @@ "stream": { "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", + "sync_mode": "full_refresh", "destination_sync_mode": "append" }, { @@ -47,7 +46,7 @@ "name": "list_disputes", "json_schema": {}, "source_defined_cursor": true, - "default_cursor_field": ["update_time"], + "default_cursor_field": ["update_time_cut"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json index 5e67c67494c9..b00142c4c708 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json @@ -5,7 +5,7 @@ "name": "list_disputes", "json_schema": {}, "source_defined_cursor": true, - "default_cursor_field": ["update_time"], + "default_cursor_field": ["update_time_cut"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json index 70244ebf32d3..556bfd63366a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json @@ -4,11 +4,10 @@ "stream": { "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", + "sync_mode": "full_refresh", "destination_sync_mode": "append" } ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl deleted file mode 100644 index 86cbdca7392b..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl +++ /dev/null @@ -1 +0,0 @@ -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "0.00"}, "available_balance": {"currency_code": "USD", "value": "0.00"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "QJQSC8WXYCA2L", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T13:29:59Z"}, "emitted_at": 1695051482452} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl deleted file mode 100644 index 53317576465a..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl +++ /dev/null @@ -1,5 +0,0 @@ -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1694795587519} -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1694795587522} -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1694795587524} -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} -{"stream": "products", "data": {"id": "1647236710", "name": "Blue M","description": "Blue M", "create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json new file mode 100644 index 000000000000..b50a9c88795a --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json @@ -0,0 +1,47 @@ +{ + "streams": [ + { + "stream": { + "name": "transactions", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["transaction_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time_cut"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json new file mode 100644 index 000000000000..4d75f9e3b060 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json @@ -0,0 +1,47 @@ +{ + "streams": [ + { + "stream": { + "name": "transactions", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["transaction_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "balances", + "json_schema": {}, + "default_cursor_field": ["as_of_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time_cut"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json deleted file mode 100644 index 771ae5dbac0a..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "credentials": { - "auth_type": "oauth2.0", - "client_id": "AWA__", - "client_secret": "ENC__", - "refresh_token": "__" - }, - "start_date": "2021-07-03T00:00:00+00:00", - "end_date": "2021-07-04T23:59:59+00:00", - "is_sandbox": false -} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json similarity index 50% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json index dc44c707ad24..2465b3a531dc 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json @@ -20,5 +20,27 @@ "name": "transactions" } } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "update_time": "2033-06-09T00:00:00Z" + }, + "stream_descriptor": { + "name": "list_payments" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "updated_time_cut": "2033-06-09T00:00:00.000Z" + }, + "stream_descriptor": { + "name": "list_disputes" + } + } } ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl new file mode 100644 index 000000000000..dfc00c24767c --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl @@ -0,0 +1,16 @@ +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "69B759611M2733128","transaction_event_code": "T1503","transaction_initiation_date": "2024-02-01T00:01:23+0000","transaction_updated_date": "2024-02-01T00:01:23+0000","transaction_amount": {"currency_code": "USD","value": "-60.75"},"transaction_status": "S","ending_balance": {"currency_code": "USD","value": "309800.06"},"available_balance": {"currency_code": "USD","value": "309800.06"},"protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695051482452} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "1N809273356042704","transaction_event_code": "T0001","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "-10.00"},"fee_amount": {"currency_code": "USD","value": "-0.25"},"transaction_status": "P","transaction_subject": "You have a payout!","transaction_note": "Thanks for your patronage!","ending_balance": {"currency_code": "USD","value": "309789.81"},"available_balance": {"currency_code": "USD","value": "309789.81"},"custom_field": "201403140001","protection_eligibility": "02"},"payer_info": {"email_address": "Alexa.Dietrich@gmail.com","address_status": "N","payer_name": {}},"shipping_info": {"name": "John, Merchant"},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695052482453} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "70B03706PU258313Y","paypal_reference_id": "1N809273356042704","paypal_reference_id_type": "TXN","transaction_event_code": "T1105","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "10.25"},"transaction_status": "S","transaction_subject": "You have a payout!","transaction_note": "Thanks for your patronage!","ending_balance": {"currency_code": "USD","value": "309800.06"},"available_balance": {"currency_code": "USD","value": "309800.06"},"protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695053482454} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "60D327402F0012324","transaction_event_code": "T0001","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "-20.00"},"fee_amount": {"currency_code": "USD","value": "-0.25"},"transaction_status": "P","transaction_subject": "You have a payout!","transaction_note": "Thanks for your support!","ending_balance": {"currency_code": "USD","value": "309779.81"},"available_balance": {"currency_code": "USD","value": "309779.81"},"custom_field": "201403140002","protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {"name": "John, Merchant"},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695054482455} +{"stream": "balances", "data": {"balances":[{"currency":"CHF","total_balance":{"currency_code":"CHF","value":"1001.19"},"available_balance":{"currency_code":"CHF","value":"1001.19"},"withheld_balance":{"currency_code":"CHF","value":"0.00"}},{"currency":"HKD","total_balance":{"currency_code":"HKD","value":"10833.47"},"available_balance":{"currency_code":"HKD","value":"10833.47"},"withheld_balance":{"currency_code":"HKD","value":"0.00"}},{"currency":"TWD","total_balance":{"currency_code":"TWD","value":"6289.00"},"available_balance":{"currency_code":"TWD","value":"6289.00"},"withheld_balance":{"currency_code":"TWD","value":"0.00"}},{"currency":"MXN","total_balance":{"currency_code":"MXN","value":"3827706.05"},"available_balance":{"currency_code":"MXN","value":"3827706.05"},"withheld_balance":{"currency_code":"MXN","value":"0.00"}},{"currency":"EUR","total_balance":{"currency_code":"EUR","value":"418736.68"},"available_balance":{"currency_code":"EUR","value":"418736.68"},"withheld_balance":{"currency_code":"EUR","value":"0.00"}},{"currency":"USD","primary":true,"total_balance":{"currency_code":"USD","value":"309860.81"},"available_balance":{"currency_code":"USD","value":"309860.81"},"withheld_balance":{"currency_code":"USD","value":"0.00"}},{"currency":"CAD","total_balance":{"currency_code":"CAD","value":"1158.92"},"available_balance":{"currency_code":"CAD","value":"1158.92"},"withheld_balance":{"currency_code":"CAD","value":"0.00"}},{"currency":"NOK","total_balance":{"currency_code":"NOK","value":"0.85"},"available_balance":{"currency_code":"NOK","value":"0.85"},"withheld_balance":{"currency_code":"NOK","value":"0.00"}},{"currency":"THB","total_balance":{"currency_code":"THB","value":"96658.02"},"available_balance":{"currency_code":"THB","value":"96658.02"},"withheld_balance":{"currency_code":"THB","value":"0.00"}},{"currency":"AUD","total_balance":{"currency_code":"AUD","value":"2405.19"},"available_balance":{"currency_code":"AUD","value":"2405.19"},"withheld_balance":{"currency_code":"AUD","value":"0.00"}},{"currency":"ILS","total_balance":{"currency_code":"ILS","value":"0.00"},"available_balance":{"currency_code":"ILS","value":"0.00"},"withheld_balance":{"currency_code":"ILS","value":"0.00"}},{"currency":"SGD","total_balance":{"currency_code":"SGD","value":"5841.51"},"available_balance":{"currency_code":"SGD","value":"5841.51"},"withheld_balance":{"currency_code":"SGD","value":"0.00"}},{"currency":"JPY","total_balance":{"currency_code":"JPY","value":"45608"},"available_balance":{"currency_code":"JPY","value":"45608"},"withheld_balance":{"currency_code":"JPY","value":"0"}},{"currency":"PLN","total_balance":{"currency_code":"PLN","value":"621.42"},"available_balance":{"currency_code":"PLN","value":"621.42"},"withheld_balance":{"currency_code":"PLN","value":"0.00"}},{"currency":"GBP","total_balance":{"currency_code":"GBP","value":"671250.65"},"available_balance":{"currency_code":"GBP","value":"671250.65"},"withheld_balance":{"currency_code":"GBP","value":"0.00"}},{"currency":"HUF","total_balance":{"currency_code":"HUF","value":"0.00"},"available_balance":{"currency_code":"HUF","value":"0.00"},"withheld_balance":{"currency_code":"HUF","value":"0.00"}},{"currency":"SEK","total_balance":{"currency_code":"SEK","value":"90.92"},"available_balance":{"currency_code":"SEK","value":"90.92"},"withheld_balance":{"currency_code":"SEK","value":"0.00"}},{"currency":"NZD","total_balance":{"currency_code":"NZD","value":"813.27"},"available_balance":{"currency_code":"NZD","value":"813.27"},"withheld_balance":{"currency_code":"NZD","value":"0.00"}},{"currency":"PHP","total_balance":{"currency_code":"PHP","value":"291489.92"},"available_balance":{"currency_code":"PHP","value":"291489.92"},"withheld_balance":{"currency_code":"PHP","value":"0.00"}},{"currency":"BRL","total_balance":{"currency_code":"BRL","value":"0.00"},"available_balance":{"currency_code":"BRL","value":"0.00"},"withheld_balance":{"currency_code":"BRL","value":"0.00"}},{"currency":"RUB","total_balance":{"currency_code":"RUB","value":"274.53"},"available_balance":{"currency_code":"RUB","value":"274.53"},"withheld_balance":{"currency_code":"RUB","value":"0.00"}}],"account_id":"C7CYMKZDG8D6E","as_of_time":"2024-02-01T00:00:00Z","last_refresh_time":"2024-02-05T17:59:59Z"}, "emitted_at": 1695051579296} +{"stream": "list_disputes", "data": {"dispute_id":"PP-R-PNP-10089600","create_time":"2024-01-26T15:31:02.000Z","update_time":"2024-02-04T12:06:03.000Z","disputed_transactions":[{"buyer_transaction_id":"5CW48839XK1160452","seller":{"merchant_id":"C7CYMKZDG8D6E"}}],"reason":"MERCHANDISE_OR_SERVICE_NOT_RECEIVED","status":"RESOLVED","dispute_state":"RESOLVED","dispute_amount":{"currency_code":"USD","value":"40.00"},"dispute_life_cycle_stage":"INQUIRY","dispute_channel":"INTERNAL","outcome":"LOST","links":[{"href":"https://api-m.sandbox.paypal.com/v1/customer/disputes/PP-R-PNP-10089600","rel":"self","method":"GET"}]}, "emitted_at": 1695051579296} +{"stream": "list_products", "data": {"id": "1647236710","name": "Blue M","description": "Blue M","create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} +{"stream": "list_products", "data": {"id": "1647236727","name": "Licenza Oro","create_time": "2022-03-14T05:45:23Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236727","rel": "self","method": "GET"}]}, "emitted_at": 1695051579396} +{"stream": "list_products", "data": {"id": "1647285840","name": "Licenza Premium","create_time": "2022-03-14T19:24:00Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647285840","rel": "self","method": "GET"}]}, "emitted_at": 1695051579496} +{"stream": "list_products", "data": {"id": "1647288288","name": "T-Shirt","description": "Blue M","create_time": "2022-03-14T20:04:47Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647288288","rel": "self","method": "GET"}]}, "emitted_at": 1695051579596} +{"stream": "search_invoices", "data": {"id":"INV2-BGPS-PKE7-6XSD-YWC7","status":"DRAFT","detail":{"currency_code":"USD","invoice_number":"1706813643331","invoice_date":"2023-12-14","viewed_by_recipient":false,"group_draft":false,"metadata":{"create_time":"2024-02-01T18:54:03Z"}},"primary_recipients":[{"billing_info":{"name":{"given_name":"Shehroz","surname":"Asmat","full_name":"Shehroz Asmat"},"email_address":"sasmat@trythunderbird.com"}}],"amount":{"currency_code":"USD","value":"50.00"},"due_amount":{"currency_code":"USD","value":"50.00"},"links":[{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7/send","rel":"send","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"replace","method":"PUT"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"delete","method":"DELETE"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7/payments","rel":"record-payment","method":"POST"}],"unilateral":false}, "emitted_at": 1695051679296} +{"stream": "search_invoices", "data": {"id":"INV2-6GP9-WLLD-6Q7K-ZYQ2","status":"DRAFT","detail":{"reference":"","currency_code":"USD","note":"","memo":"","invoice_number":"0042","invoice_date":"2022-02-04","payment_term":{"due_date":"2022-02-14"},"viewed_by_recipient":false,"group_draft":false,"metadata":{"create_time":"2024-02-01T11:01:58Z"}},"primary_recipients":[{"billing_info":{"name":{"given_name":"Stephanie","surname":"Meyers","full_name":"Stephanie Meyers"},"email_address":"sb-yww0b28455377@personal.example.com"},"shipping_info":{"name":{"given_name":"Stephanie","surname":"Meyers","full_name":"Stephanie Meyers"}}}],"amount":{"currency_code":"USD","value":"74.21"},"due_amount":{"currency_code":"USD","value":"74.21"},"links":[{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2/send","rel":"send","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"replace","method":"PUT"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"delete","method":"DELETE"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2/payments","rel":"record-payment","method":"POST"}],"unilateral":false}, "emitted_at": 1695051779296} +{"stream": "list_payments", "data": {"id":"PAYID-MW55RCA31D103955T218492B","intent":"sale","state":"approved","cart":"06J27273EH485262V","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"sb-vxpcr15413769@personal.example.com","first_name":"John","last_name":"Doe","payer_id":"TWL7BJVYNS7GU","shipping_address":{"recipient_name":"John Doe","line1":"1 Main St","city":"San Jose","state":"CA","postal_code":"95131","country_code":"US"},"phone":"4083068029","country_code":"US"}},"transactions":[{"reference_id":"1000000000047","amount":{"total":"343.80","currency":"USD","details":{"subtotal":"343.80","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E","email":"john_merchant@example.com"},"item_list":{"shipping_address":{"recipient_name":"John Doe","line1":"1 Main St","city":"San Jose","state":"CA","postal_code":"95131","country_code":"US"}},"related_resources":[{"sale":{"id":"7PE037460E080360M","state":"completed","amount":{"total":"343.80","currency":"USD","details":{"subtotal":"343.80","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","transaction_fee":{"value":"12.49","currency":"USD"},"purchase_unit_reference_id":"1000000000047","parent_payment":"PAYID-MW55RCA31D103955T218492B","create_time":"2024-02-01T17:44:40Z","update_time":"2024-02-01T17:44:40Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T17:44:40Z","update_time":"2024-02-01T17:44:40Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B","rel":"self","method":"GET"}]}, "emitted_at": 1695051779296} +{"stream": "list_payments", "data": {"id":"PAYID-MW53UPA6UB45753B0034831X","intent":"sale","state":"approved","cart":"9A220393SG7753433","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"sb-g43l4x28821325@personal.example.com","first_name":"John","last_name":"Doe","payer_id":"889X39VDHV8QY","shipping_address":{"recipient_name":"John Doe","line1":"Via Unit? d'Italia, 5783296","city":"Napoli","state":"Napoli","postal_code":"80127","country_code":"IT"},"phone":"9393358454","country_code":"IT"}},"transactions":[{"reference_id":"default","amount":{"total":"100.00","currency":"USD","details":{"subtotal":"100.00","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E","email":"john_merchant@example.com"},"description":"T-Shirt","item_list":{"items":[{"name":"T-Shirt","description":"Green XL","price":"100.00","currency":"USD","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"John Doe","line1":"Via Unit? d'Italia, 5783296","city":"Napoli","state":"Napoli","postal_code":"80127","country_code":"IT"}},"related_resources":[{"sale":{"id":"29N28023XB153584X","state":"completed","amount":{"total":"100.00","currency":"USD","details":{"subtotal":"100.00","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","transaction_fee":{"value":"5.48","currency":"USD"},"receivable_amount":{"value":"100.00","currency":"USD"},"exchange_rate":"1.098848913950027","purchase_unit_reference_id":"default","parent_payment":"PAYID-MW53UPA6UB45753B0034831X","create_time":"2024-02-01T15:35:25Z","update_time":"2024-02-01T15:35:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T15:35:24Z","update_time":"2024-02-01T15:35:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X","rel":"self","method":"GET"}]}, "emitted_at": 1695061579296} +{"stream": "list_payments", "data": {"id":"PAY-81S181868H8011217MW526OI","intent":"authorize","state":"approved","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"mihai.streza1@mi-pay.com","first_name":"Mihai","last_name":"Streza","payer_id":"QHD3E8SRDDSQL","shipping_address":{"recipient_name":"Mihai Streza"},"phone":"07534201211","country_code":"GB"}},"transactions":[{"amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E"},"description":"topup","invoice_number":"100000000188917","soft_descriptor":"PAYPAL *JOHNMERCHAN","item_list":{"items":[{"name":"topup","price":"20.00","currency":"EUR","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"Mihai Streza"}},"related_resources":[{"authorization":{"id":"05D21713M12255848","state":"captured","amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","billing_agreement_id":"B-2B029484VC167663Y","parent_payment":"PAY-81S181868H8011217MW526OI","valid_until":"2024-03-01T14:48:26Z","create_time":"2024-02-01T14:48:26Z","update_time":"2024-02-01T14:48:30Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/capture","rel":"capture","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/void","rel":"void","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/reauthorize","rel":"reauthorize","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"parent_payment","method":"GET"}]}},{"capture":{"id":"546282867R0022639","amount":{"total":"20.00","currency":"EUR"},"state":"completed","custom":"","transaction_fee":{"value":"1.39","currency":"EUR"},"parent_payment":"PAY-81S181868H8011217MW526OI","invoice_number":"100000000188917","create_time":"2024-02-01T14:48:30Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848","rel":"authorization","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T14:48:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"self","method":"GET"}]}, "emitted_at": 1695071579296} +{"stream": "list_payments", "data": {"id":"PAY-0L38757939422510JMW5ZJVA","intent":"authorize","state":"approved","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"mihai.streza1@mi-pay.com","first_name":"Mihai","last_name":"Streza","payer_id":"QHD3E8SRDDSQL","shipping_address":{"recipient_name":"Mihai Streza"},"phone":"07534201211","country_code":"GB"}},"transactions":[{"amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E"},"description":"topup","invoice_number":"100000000188897","soft_descriptor":"PAYPAL *JOHNMERCHAN","item_list":{"items":[{"name":"topup","price":"20.00","currency":"EUR","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"Mihai Streza"}},"related_resources":[{"authorization":{"id":"3S025738SW168153S","state":"captured","amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","billing_agreement_id":"B-42217126VD515152H","parent_payment":"PAY-0L38757939422510JMW5ZJVA","valid_until":"2024-03-01T12:55:48Z","create_time":"2024-02-01T12:55:48Z","update_time":"2024-02-01T12:55:51Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/capture","rel":"capture","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/void","rel":"void","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/reauthorize","rel":"reauthorize","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"parent_payment","method":"GET"}]}},{"capture":{"id":"26U95072LD470800B","amount":{"total":"20.00","currency":"EUR"},"state":"completed","custom":"","transaction_fee":{"value":"1.39","currency":"EUR"},"parent_payment":"PAY-0L38757939422510JMW5ZJVA","invoice_number":"100000000188897","create_time":"2024-02-01T12:55:51Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S","rel":"authorization","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T12:55:48Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"self","method":"GET"}]}, "emitted_at": 1695081579296} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl new file mode 100644 index 000000000000..74d573c4ee73 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl @@ -0,0 +1,85 @@ +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1707238889137} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1707238889139} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1707238889142} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "19C257131E850262B", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:02:46+0000", "transaction_updated_date": "2021-07-05T23:02:46+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "289.40"}, "available_balance": {"currency_code": "USD", "value": "289.40"}, "invoice_id": "23749371955", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "23749371955"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "23749371955"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:02:46Z", "transaction_id": "19C257131E850262B"}, "emitted_at": 1707238889144} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "6S892278N6406494Y", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:06:12+0000", "transaction_updated_date": "2021-07-05T23:06:12+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "318.34"}, "available_balance": {"currency_code": "USD", "value": "318.34"}, "invoice_id": "62173333941", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "62173333941"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "62173333941"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:06:12Z", "transaction_id": "6S892278N6406494Y"}, "emitted_at": 1707238889146} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0T320567TS5587836", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:09:04+0000", "transaction_updated_date": "2021-07-05T23:09:04+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "347.28"}, "available_balance": {"currency_code": "USD", "value": "347.28"}, "invoice_id": "56028534885", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "56028534885"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "56028534885"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:09:04Z", "transaction_id": "0T320567TS5587836"}, "emitted_at": 1707238889148} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3DF69605L9958744R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:12:40+0000", "transaction_updated_date": "2021-07-05T23:12:40+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "376.22"}, "available_balance": {"currency_code": "USD", "value": "376.22"}, "invoice_id": "31766547902", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "31766547902"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "31766547902"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:12:40Z", "transaction_id": "3DF69605L9958744R"}, "emitted_at": 1707238889150} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2F535603PS249601F", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:12:57+0000", "transaction_updated_date": "2021-07-05T23:12:57+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "405.16"}, "available_balance": {"currency_code": "USD", "value": "405.16"}, "invoice_id": "32577611997", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "32577611997"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "32577611997"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:12:57Z", "transaction_id": "2F535603PS249601F"}, "emitted_at": 1707238889153} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "243514451L952570P", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:02+0000", "transaction_updated_date": "2021-07-05T23:14:02+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "434.10"}, "available_balance": {"currency_code": "USD", "value": "434.10"}, "invoice_id": "23612058730", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "23612058730"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "23612058730"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:02Z", "transaction_id": "243514451L952570P"}, "emitted_at": 1707238889155} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "27881589Y9461861H", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:19+0000", "transaction_updated_date": "2021-07-05T23:14:19+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "463.04"}, "available_balance": {"currency_code": "USD", "value": "463.04"}, "invoice_id": "53296156982", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "53296156982"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "53296156982"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:19Z", "transaction_id": "27881589Y9461861H"}, "emitted_at": 1707238889157} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3MG39755337297727", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:36+0000", "transaction_updated_date": "2021-07-05T23:14:36+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "491.98"}, "available_balance": {"currency_code": "USD", "value": "491.98"}, "invoice_id": "53235397043", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "53235397043"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "53235397043"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:36Z", "transaction_id": "3MG39755337297727"}, "emitted_at": 1707238889159} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "32J59182JY5989507", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:52+0000", "transaction_updated_date": "2021-07-05T23:14:52+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "520.92"}, "available_balance": {"currency_code": "USD", "value": "520.92"}, "invoice_id": "18208641465", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "18208641465"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "18208641465"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:52Z", "transaction_id": "32J59182JY5989507"}, "emitted_at": 1707238889161} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "52795774C7828234R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:09+0000", "transaction_updated_date": "2021-07-05T23:15:09+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "549.86"}, "available_balance": {"currency_code": "USD", "value": "549.86"}, "invoice_id": "32274344746", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "32274344746"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "32274344746"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:09Z", "transaction_id": "52795774C7828234R"}, "emitted_at": 1707238889163} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "19B82038T92822940", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:26+0000", "transaction_updated_date": "2021-07-05T23:15:26+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "578.80"}, "available_balance": {"currency_code": "USD", "value": "578.80"}, "invoice_id": "36419288277", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "36419288277"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "36419288277"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:26Z", "transaction_id": "19B82038T92822940"}, "emitted_at": 1707238889166} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "61G749036D552760G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:42+0000", "transaction_updated_date": "2021-07-05T23:15:42+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "607.74"}, "available_balance": {"currency_code": "USD", "value": "607.74"}, "invoice_id": "88092228645", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "88092228645"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "88092228645"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:42Z", "transaction_id": "61G749036D552760G"}, "emitted_at": 1707238889168} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5EL311302L108363J", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:58+0000", "transaction_updated_date": "2021-07-05T23:15:58+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "636.68"}, "available_balance": {"currency_code": "USD", "value": "636.68"}, "invoice_id": "25494061224", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "25494061224"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "25494061224"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:58Z", "transaction_id": "5EL311302L108363J"}, "emitted_at": 1707238889170} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3VP82838NP358133N", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:16:15+0000", "transaction_updated_date": "2021-07-05T23:16:15+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "665.62"}, "available_balance": {"currency_code": "USD", "value": "665.62"}, "invoice_id": "82173600275", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "82173600275"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "82173600275"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:16:15Z", "transaction_id": "3VP82838NP358133N"}, "emitted_at": 1707238889172} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2N796839EY2539153", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:16:32+0000", "transaction_updated_date": "2021-07-05T23:16:32+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "694.56"}, "available_balance": {"currency_code": "USD", "value": "694.56"}, "invoice_id": "10442581967", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "10442581967"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "10442581967"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:16:32Z", "transaction_id": "2N796839EY2539153"}, "emitted_at": 1707238889174} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5WX252723D093564T", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:29+0000", "transaction_updated_date": "2021-07-05T23:23:29+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "723.50"}, "available_balance": {"currency_code": "USD", "value": "723.50"}, "invoice_id": "71987080514", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71987080514"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71987080514"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:29Z", "transaction_id": "5WX252723D093564T"}, "emitted_at": 1707238889176} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "4PW76195NN227720S", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:40+0000", "transaction_updated_date": "2021-07-05T23:23:40+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "752.44"}, "available_balance": {"currency_code": "USD", "value": "752.44"}, "invoice_id": "93025400757", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "93025400757"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "93025400757"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:40Z", "transaction_id": "4PW76195NN227720S"}, "emitted_at": 1707238889178} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0VE851712U5895412", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:51+0000", "transaction_updated_date": "2021-07-05T23:23:51+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "781.38"}, "available_balance": {"currency_code": "USD", "value": "781.38"}, "invoice_id": "46225965444", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "46225965444"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "46225965444"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:51Z", "transaction_id": "0VE851712U5895412"}, "emitted_at": 1707238889180} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "63U003588S1135607", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:26+0000", "transaction_updated_date": "2021-07-05T23:29:26+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "810.32"}, "available_balance": {"currency_code": "USD", "value": "810.32"}, "invoice_id": "34635559567", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "34635559567"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "34635559567"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:26Z", "transaction_id": "63U003588S1135607"}, "emitted_at": 1707238889182} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2AJ081444T051123A", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:37+0000", "transaction_updated_date": "2021-07-05T23:29:37+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "839.26"}, "available_balance": {"currency_code": "USD", "value": "839.26"}, "invoice_id": "92544485996", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "92544485996"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "92544485996"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:37Z", "transaction_id": "2AJ081444T051123A"}, "emitted_at": 1707238889184} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2KU13114TJ604181E", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:48+0000", "transaction_updated_date": "2021-07-05T23:29:48+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "868.20"}, "available_balance": {"currency_code": "USD", "value": "868.20"}, "invoice_id": "10184574713", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "10184574713"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "10184574713"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:48Z", "transaction_id": "2KU13114TJ604181E"}, "emitted_at": 1707238889186} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1ST090036H2235215", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:35+0000", "transaction_updated_date": "2021-07-05T23:31:35+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "897.14"}, "available_balance": {"currency_code": "USD", "value": "897.14"}, "invoice_id": "50350860865", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "50350860865"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "50350860865"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:35Z", "transaction_id": "1ST090036H2235215"}, "emitted_at": 1707238889188} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5BJ418934Y425901G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:46+0000", "transaction_updated_date": "2021-07-05T23:31:46+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "926.08"}, "available_balance": {"currency_code": "USD", "value": "926.08"}, "invoice_id": "12278283055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "12278283055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "12278283055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:46Z", "transaction_id": "5BJ418934Y425901G"}, "emitted_at": 1707238889190} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0SD21997LN026020M", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:56+0000", "transaction_updated_date": "2021-07-05T23:31:56+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "955.02"}, "available_balance": {"currency_code": "USD", "value": "955.02"}, "invoice_id": "52396214250", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "52396214250"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "52396214250"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:56Z", "transaction_id": "0SD21997LN026020M"}, "emitted_at": 1707238889192} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3BH630398E562901G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:42:41+0000", "transaction_updated_date": "2021-07-05T23:42:41+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "983.96"}, "available_balance": {"currency_code": "USD", "value": "983.96"}, "invoice_id": "18793521512", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "18793521512"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "18793521512"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:42:41Z", "transaction_id": "3BH630398E562901G"}, "emitted_at": 1707238889194} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "03D88325GF8461705", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:42:52+0000", "transaction_updated_date": "2021-07-05T23:42:52+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1012.90"}, "available_balance": {"currency_code": "USD", "value": "1012.90"}, "invoice_id": "71793513892", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71793513892"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71793513892"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:42:52Z", "transaction_id": "03D88325GF8461705"}, "emitted_at": 1707238889196} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "51852852PL0100404", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:43:03+0000", "transaction_updated_date": "2021-07-05T23:43:03+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1041.84"}, "available_balance": {"currency_code": "USD", "value": "1041.84"}, "invoice_id": "98653187889", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "98653187889"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "98653187889"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:43:03Z", "transaction_id": "51852852PL0100404"}, "emitted_at": 1707238889198} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "8MF4324694292993B", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:21+0000", "transaction_updated_date": "2021-07-05T23:44:21+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1070.78"}, "available_balance": {"currency_code": "USD", "value": "1070.78"}, "invoice_id": "12489150471", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "12489150471"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "12489150471"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:21Z", "transaction_id": "8MF4324694292993B"}, "emitted_at": 1707238889201} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "87S73342AS6001233", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:32+0000", "transaction_updated_date": "2021-07-05T23:44:32+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1099.72"}, "available_balance": {"currency_code": "USD", "value": "1099.72"}, "invoice_id": "99595079917", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "99595079917"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "99595079917"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:32Z", "transaction_id": "87S73342AS6001233"}, "emitted_at": 1707238889203} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "112146346A741221U", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:44+0000", "transaction_updated_date": "2021-07-05T23:44:44+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1128.66"}, "available_balance": {"currency_code": "USD", "value": "1128.66"}, "invoice_id": "93286331651", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "93286331651"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "93286331651"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:44Z", "transaction_id": "112146346A741221U"}, "emitted_at": 1707238889205} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0N2242037Y9449344", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:54+0000", "transaction_updated_date": "2021-07-05T23:44:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1157.60"}, "available_balance": {"currency_code": "USD", "value": "1157.60"}, "invoice_id": "71349988314", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71349988314"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71349988314"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:54Z", "transaction_id": "0N2242037Y9449344"}, "emitted_at": 1707238889207} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9NH78349H0388780F", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:05+0000", "transaction_updated_date": "2021-07-05T23:45:05+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1186.54"}, "available_balance": {"currency_code": "USD", "value": "1186.54"}, "invoice_id": "83951023481", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "83951023481"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "83951023481"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:05Z", "transaction_id": "9NH78349H0388780F"}, "emitted_at": 1707238889209} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "10S137566E4828249", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:16+0000", "transaction_updated_date": "2021-07-05T23:45:16+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1215.48"}, "available_balance": {"currency_code": "USD", "value": "1215.48"}, "invoice_id": "88168198250", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "88168198250"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "88168198250"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:16Z", "transaction_id": "10S137566E4828249"}, "emitted_at": 1707238889211} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "7N749695W59419057", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:27+0000", "transaction_updated_date": "2021-07-05T23:45:27+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1244.42"}, "available_balance": {"currency_code": "USD", "value": "1244.42"}, "invoice_id": "38296993497", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "38296993497"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "38296993497"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:27Z", "transaction_id": "7N749695W59419057"}, "emitted_at": 1707238889213} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "43X058357A257931N", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:39+0000", "transaction_updated_date": "2021-07-05T23:45:39+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1273.36"}, "available_balance": {"currency_code": "USD", "value": "1273.36"}, "invoice_id": "33391419042", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "33391419042"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "33391419042"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:39Z", "transaction_id": "43X058357A257931N"}, "emitted_at": 1707238889215} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5WL82051VY277550S", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:50+0000", "transaction_updated_date": "2021-07-05T23:45:50+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1302.30"}, "available_balance": {"currency_code": "USD", "value": "1302.30"}, "invoice_id": "69341308548", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "69341308548"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "69341308548"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:50Z", "transaction_id": "5WL82051VY277550S"}, "emitted_at": 1707238889217} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9CG36572NK0728016", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:46:01+0000", "transaction_updated_date": "2021-07-05T23:46:01+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1331.24"}, "available_balance": {"currency_code": "USD", "value": "1331.24"}, "invoice_id": "70491310163", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "70491310163"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "70491310163"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:46:01Z", "transaction_id": "9CG36572NK0728016"}, "emitted_at": 1707238889219} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9K759703FU663194K", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:46:43+0000", "transaction_updated_date": "2021-07-05T23:46:43+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1360.18"}, "available_balance": {"currency_code": "USD", "value": "1360.18"}, "invoice_id": "44794712899", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "44794712899"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "44794712899"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:46:43Z", "transaction_id": "9K759703FU663194K"}, "emitted_at": 1707238889222} +{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-01T00:00:00Z", "last_refresh_time": "2024-02-06T09:59:59Z"}, "emitted_at": 1707239624675} +{"stream": "list_products", "data": {"id": "bELKLtzpiO", "name": "Pines-T-Shirt-sSUVV", "description": "Anothe rUpdate. Let's see if something changes or not", "create_time": "2024-01-25T20:16:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/bELKLtzpiO", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715683} +{"stream": "list_products", "data": {"id": "oObfKeWCTO", "name": "Pines-T-Shirt-HZBfE", "description": "My Update. Does it changes it?", "create_time": "2024-01-26T20:07:11Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/oObfKeWCTO", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715685} +{"stream": "list_products", "data": {"id": "GXASPmLVeA", "name": "Pines-T-Shirt-vtpna", "description": "Cotton XL", "create_time": "2024-01-26T23:00:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/GXASPmLVeA", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715687} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTWI4W4210034A4751008", "intent": "sale", "state": "approved", "cart": "94M68693F5918712T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "44794712899", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9K759703FU663194K", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTWI4W4210034A4751008", "create_time": "2021-07-05T23:46:43Z", "update_time": "2021-07-05T23:46:43Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9K759703FU663194K", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9K759703FU663194K/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTWI4W4210034A4751008", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:46:33Z", "update_time": "2021-07-05T23:46:43Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTWI4W4210034A4751008", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814718} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTMA8WD99999KH443990H", "intent": "sale", "state": "approved", "cart": "8BD080945B510293Y", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "70491310163", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9CG36572NK0728016", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTMA8WD99999KH443990H", "create_time": "2021-07-05T23:46:01Z", "update_time": "2021-07-05T23:46:01Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9CG36572NK0728016", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9CG36572NK0728016/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTMA8WD99999KH443990H", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:52Z", "update_time": "2021-07-05T23:46:01Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTMA8WD99999KH443990H", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814721} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTJA3GY064023P159724A", "intent": "sale", "state": "approved", "cart": "4XU51704H63205015", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "69341308548", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5WL82051VY277550S", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTJA3GY064023P159724A", "create_time": "2021-07-05T23:45:50Z", "update_time": "2021-07-05T23:45:50Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WL82051VY277550S", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WL82051VY277550S/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTJA3GY064023P159724A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:40Z", "update_time": "2021-07-05T23:45:50Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTJA3GY064023P159724A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814724} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTGI9UK71240VU8020618", "intent": "sale", "state": "approved", "cart": "0RJ70999M3464401U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "33391419042", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "43X058357A257931N", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTGI9UK71240VU8020618", "create_time": "2021-07-05T23:45:39Z", "update_time": "2021-07-05T23:45:39Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/43X058357A257931N", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/43X058357A257931N/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTGI9UK71240VU8020618", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:29Z", "update_time": "2021-07-05T23:45:39Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTGI9UK71240VU8020618", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814727} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTDQ5FS07530F9282151W", "intent": "sale", "state": "approved", "cart": "4JA813678M224812W", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "38296993497", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "7N749695W59419057", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTDQ5FS07530F9282151W", "create_time": "2021-07-05T23:45:27Z", "update_time": "2021-07-05T23:45:27Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/7N749695W59419057", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/7N749695W59419057/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTDQ5FS07530F9282151W", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:18Z", "update_time": "2021-07-05T23:45:27Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTDQ5FS07530F9282151W", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814730} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTAY2N7514653J745150Y", "intent": "sale", "state": "approved", "cart": "4VA72722KX1105219", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "88168198250", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "10S137566E4828249", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTAY2N7514653J745150Y", "create_time": "2021-07-05T23:45:16Z", "update_time": "2021-07-05T23:45:16Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/10S137566E4828249", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/10S137566E4828249/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTAY2N7514653J745150Y", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:07Z", "update_time": "2021-07-05T23:45:16Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTAY2N7514653J745150Y", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814733} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZS6A3M9912977L184341S", "intent": "sale", "state": "approved", "cart": "4JY24848DR959552K", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "83951023481", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9NH78349H0388780F", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZS6A3M9912977L184341S", "create_time": "2021-07-05T23:45:05Z", "update_time": "2021-07-05T23:45:05Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9NH78349H0388780F", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9NH78349H0388780F/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS6A3M9912977L184341S", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:56Z", "update_time": "2021-07-05T23:45:05Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS6A3M9912977L184341S", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814735} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZS3I50756242KE8498014", "intent": "sale", "state": "approved", "cart": "3PS97109CA147652A", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71349988314", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0N2242037Y9449344", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZS3I50756242KE8498014", "create_time": "2021-07-05T23:44:54Z", "update_time": "2021-07-05T23:44:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0N2242037Y9449344", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0N2242037Y9449344/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS3I50756242KE8498014", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:45Z", "update_time": "2021-07-05T23:44:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS3I50756242KE8498014", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814738} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSYQ8A757181MC817782A", "intent": "sale", "state": "approved", "cart": "4KH490105A375162P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "93286331651", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "112146346A741221U", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSYQ8A757181MC817782A", "create_time": "2021-07-05T23:44:44Z", "update_time": "2021-07-05T23:44:44Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/112146346A741221U", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/112146346A741221U/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSYQ8A757181MC817782A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:34Z", "update_time": "2021-07-05T23:44:44Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSYQ8A757181MC817782A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814741} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSVY92X22655TL083163M", "intent": "sale", "state": "approved", "cart": "1K4366307V579334M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "99595079917", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "87S73342AS6001233", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSVY92X22655TL083163M", "create_time": "2021-07-05T23:44:32Z", "update_time": "2021-07-05T23:44:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/87S73342AS6001233", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/87S73342AS6001233/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSVY92X22655TL083163M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:23Z", "update_time": "2021-07-05T23:44:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSVY92X22655TL083163M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814743} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSSY3AX23091XE567400S", "intent": "sale", "state": "approved", "cart": "5FW555787Y189635P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "12489150471", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "8MF4324694292993B", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSSY3AX23091XE567400S", "create_time": "2021-07-05T23:44:21Z", "update_time": "2021-07-05T23:44:21Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/8MF4324694292993B", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/8MF4324694292993B/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSSY3AX23091XE567400S", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:11Z", "update_time": "2021-07-05T23:44:21Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSSY3AX23091XE567400S", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814746} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZR7Q47A34643F6939564E", "intent": "sale", "state": "approved", "cart": "3CY93437B5650311M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "98653187889", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "51852852PL0100404", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZR7Q47A34643F6939564E", "create_time": "2021-07-05T23:43:03Z", "update_time": "2021-07-05T23:43:03Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/51852852PL0100404", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/51852852PL0100404/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR7Q47A34643F6939564E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:54Z", "update_time": "2021-07-05T23:43:03Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR7Q47A34643F6939564E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814749} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZR4Y96946691TM615464M", "intent": "sale", "state": "approved", "cart": "0WG02233VF623084T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71793513892", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "03D88325GF8461705", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZR4Y96946691TM615464M", "create_time": "2021-07-05T23:42:52Z", "update_time": "2021-07-05T23:42:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/03D88325GF8461705", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/03D88325GF8461705/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR4Y96946691TM615464M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:43Z", "update_time": "2021-07-05T23:42:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR4Y96946691TM615464M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814751} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZRZY3BY320090L305572M", "intent": "sale", "state": "approved", "cart": "4RY36168C0517143X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "18793521512", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3BH630398E562901G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZRZY3BY320090L305572M", "create_time": "2021-07-05T23:42:41Z", "update_time": "2021-07-05T23:42:41Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3BH630398E562901G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3BH630398E562901G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZRZY3BY320090L305572M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:31Z", "update_time": "2021-07-05T23:42:41Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZRZY3BY320090L305572M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814754} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMYY6H275806JK843330N", "intent": "sale", "state": "approved", "cart": "9RC74442JD1611818", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "52396214250", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0SD21997LN026020M", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMYY6H275806JK843330N", "create_time": "2021-07-05T23:31:56Z", "update_time": "2021-07-05T23:31:56Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0SD21997LN026020M", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0SD21997LN026020M/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMYY6H275806JK843330N", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:47Z", "update_time": "2021-07-05T23:31:56Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMYY6H275806JK843330N", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814756} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMWA7HV06523LM984963Y", "intent": "sale", "state": "approved", "cart": "4HC02299JX0560832", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "12278283055", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5BJ418934Y425901G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMWA7HV06523LM984963Y", "create_time": "2021-07-05T23:31:46Z", "update_time": "2021-07-05T23:31:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5BJ418934Y425901G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5BJ418934Y425901G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMWA7HV06523LM984963Y", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:36Z", "update_time": "2021-07-05T23:31:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMWA7HV06523LM984963Y", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814758} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMTI4X39217868749053E", "intent": "sale", "state": "approved", "cart": "5N3647919D810380T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "50350860865", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "1ST090036H2235215", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMTI4X39217868749053E", "create_time": "2021-07-05T23:31:35Z", "update_time": "2021-07-05T23:31:35Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/1ST090036H2235215", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/1ST090036H2235215/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMTI4X39217868749053E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:25Z", "update_time": "2021-07-05T23:31:35Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMTI4X39217868749053E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814760} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLYY9RB64928LK030220F", "intent": "sale", "state": "approved", "cart": "31F66461BJ2308523", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "10184574713", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2KU13114TJ604181E", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLYY9RB64928LK030220F", "create_time": "2021-07-05T23:29:48Z", "update_time": "2021-07-05T23:29:48Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2KU13114TJ604181E", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2KU13114TJ604181E/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLYY9RB64928LK030220F", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:39Z", "update_time": "2021-07-05T23:29:48Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLYY9RB64928LK030220F", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814763} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLWA09E67167RS362822V", "intent": "sale", "state": "approved", "cart": "1B944298P8820581S", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "92544485996", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2AJ081444T051123A", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLWA09E67167RS362822V", "create_time": "2021-07-05T23:29:37Z", "update_time": "2021-07-05T23:29:37Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2AJ081444T051123A", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2AJ081444T051123A/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLWA09E67167RS362822V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:28Z", "update_time": "2021-07-05T23:29:37Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLWA09E67167RS362822V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814765} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLTA1857385502613571B", "intent": "sale", "state": "approved", "cart": "07W53209604004921", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "34635559567", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "63U003588S1135607", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLTA1857385502613571B", "create_time": "2021-07-05T23:29:26Z", "update_time": "2021-07-05T23:29:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/63U003588S1135607", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/63U003588S1135607/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLTA1857385502613571B", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:16Z", "update_time": "2021-07-05T23:29:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLTA1857385502613571B", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814767} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZI7Q61590832VE058581A", "intent": "sale", "state": "approved", "cart": "47F08854HR292433A", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "46225965444", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0VE851712U5895412", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZI7Q61590832VE058581A", "create_time": "2021-07-05T23:23:51Z", "update_time": "2021-07-05T23:23:51Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0VE851712U5895412", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0VE851712U5895412/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI7Q61590832VE058581A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:42Z", "update_time": "2021-07-05T23:23:51Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI7Q61590832VE058581A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816765} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZI4Y1FS16045MX748772D", "intent": "sale", "state": "approved", "cart": "6JA90337U5912522U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "93025400757", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "4PW76195NN227720S", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZI4Y1FS16045MX748772D", "create_time": "2021-07-05T23:23:40Z", "update_time": "2021-07-05T23:23:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/4PW76195NN227720S", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/4PW76195NN227720S/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI4Y1FS16045MX748772D", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:31Z", "update_time": "2021-07-05T23:23:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI4Y1FS16045MX748772D", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816770} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZIZY0YE90251N2470191A", "intent": "sale", "state": "approved", "cart": "79F61111E7201332F", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71987080514", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5WX252723D093564T", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZIZY0YE90251N2470191A", "create_time": "2021-07-05T23:23:29Z", "update_time": "2021-07-05T23:23:29Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WX252723D093564T", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WX252723D093564T/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZIZY0YE90251N2470191A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:19Z", "update_time": "2021-07-05T23:23:29Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZIZY0YE90251N2470191A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816774} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFQI6GD87350UE545773N", "intent": "sale", "state": "approved", "cart": "1FP43302U0478942X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "10442581967", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2N796839EY2539153", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFQI6GD87350UE545773N", "create_time": "2021-07-05T23:16:32Z", "update_time": "2021-07-05T23:16:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2N796839EY2539153", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2N796839EY2539153/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFQI6GD87350UE545773N", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:16:17Z", "update_time": "2021-07-05T23:16:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFQI6GD87350UE545773N", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816778} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFMA0B969784C6725002V", "intent": "sale", "state": "approved", "cart": "8L091901278803646", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "82173600275", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3VP82838NP358133N", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFMA0B969784C6725002V", "create_time": "2021-07-05T23:16:15Z", "update_time": "2021-07-05T23:16:15Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3VP82838NP358133N", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3VP82838NP358133N/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFMA0B969784C6725002V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:16:00Z", "update_time": "2021-07-05T23:16:15Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFMA0B969784C6725002V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816781} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFHY7SJ7565124295670P", "intent": "sale", "state": "approved", "cart": "2SM08874YP816313V", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "25494061224", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5EL311302L108363J", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFHY7SJ7565124295670P", "create_time": "2021-07-05T23:15:58Z", "update_time": "2021-07-05T23:15:58Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5EL311302L108363J", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5EL311302L108363J/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFHY7SJ7565124295670P", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:43Z", "update_time": "2021-07-05T23:15:58Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFHY7SJ7565124295670P", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816785} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFDY16477729A65752911", "intent": "sale", "state": "approved", "cart": "31E8174415946984X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "88092228645", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "61G749036D552760G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFDY16477729A65752911", "create_time": "2021-07-05T23:15:42Z", "update_time": "2021-07-05T23:15:42Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/61G749036D552760G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/61G749036D552760G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFDY16477729A65752911", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:27Z", "update_time": "2021-07-05T23:15:42Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFDY16477729A65752911", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816788} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZE7Y09K97910J19191835", "intent": "sale", "state": "approved", "cart": "52852967MK8398427", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "36419288277", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "19B82038T92822940", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZE7Y09K97910J19191835", "create_time": "2021-07-05T23:15:26Z", "update_time": "2021-07-05T23:15:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/19B82038T92822940", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/19B82038T92822940/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE7Y09K97910J19191835", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:11Z", "update_time": "2021-07-05T23:15:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE7Y09K97910J19191835", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816791} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZE3Q7MV3302078506752V", "intent": "sale", "state": "approved", "cart": "8DT33424FM6083023", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "32274344746", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "52795774C7828234R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZE3Q7MV3302078506752V", "create_time": "2021-07-05T23:15:09Z", "update_time": "2021-07-05T23:15:09Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/52795774C7828234R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/52795774C7828234R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE3Q7MV3302078506752V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:54Z", "update_time": "2021-07-05T23:15:09Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE3Q7MV3302078506752V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816794} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEXI6AC38094H2421312E", "intent": "sale", "state": "approved", "cart": "934109456G4946916", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "18208641465", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "32J59182JY5989507", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEXI6AC38094H2421312E", "create_time": "2021-07-05T23:14:52Z", "update_time": "2021-07-05T23:14:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/32J59182JY5989507", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/32J59182JY5989507/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEXI6AC38094H2421312E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:37Z", "update_time": "2021-07-05T23:14:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEXI6AC38094H2421312E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816797} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZETI37A91239LN8311810", "intent": "sale", "state": "approved", "cart": "83D98649PY104524E", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "53235397043", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3MG39755337297727", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZETI37A91239LN8311810", "create_time": "2021-07-05T23:14:36Z", "update_time": "2021-07-05T23:14:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3MG39755337297727", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3MG39755337297727/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZETI37A91239LN8311810", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:21Z", "update_time": "2021-07-05T23:14:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZETI37A91239LN8311810", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816799} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEPA540480516L1460710", "intent": "sale", "state": "approved", "cart": "7GV22540700208350", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "53296156982", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "27881589Y9461861H", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEPA540480516L1460710", "create_time": "2021-07-05T23:14:19Z", "update_time": "2021-07-05T23:14:19Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/27881589Y9461861H", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/27881589Y9461861H/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEPA540480516L1460710", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:04Z", "update_time": "2021-07-05T23:14:19Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEPA540480516L1460710", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816802} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEKQ6CT67951NS8257540", "intent": "sale", "state": "approved", "cart": "9GV5180502759472M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "23612058730", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "243514451L952570P", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEKQ6CT67951NS8257540", "create_time": "2021-07-05T23:14:02Z", "update_time": "2021-07-05T23:14:02Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/243514451L952570P", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/243514451L952570P/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEKQ6CT67951NS8257540", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:13:46Z", "update_time": "2021-07-05T23:14:02Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEKQ6CT67951NS8257540", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816805} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZD2Q3A0909139J3152203", "intent": "sale", "state": "approved", "cart": "6AJ421654S4873922", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "32577611997", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2F535603PS249601F", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZD2Q3A0909139J3152203", "create_time": "2021-07-05T23:12:57Z", "update_time": "2021-07-05T23:12:57Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2F535603PS249601F", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2F535603PS249601F/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZD2Q3A0909139J3152203", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:12:42Z", "update_time": "2021-07-05T23:12:57Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZD2Q3A0909139J3152203", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816807} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZDWI4V162188CW455701G", "intent": "sale", "state": "approved", "cart": "6D196635J17794229", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "31766547902", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3DF69605L9958744R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZDWI4V162188CW455701G", "create_time": "2021-07-05T23:12:40Z", "update_time": "2021-07-05T23:12:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3DF69605L9958744R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3DF69605L9958744R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZDWI4V162188CW455701G", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:12:25Z", "update_time": "2021-07-05T23:12:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZDWI4V162188CW455701G", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816810} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZB7Y8EC76174AW4613112", "intent": "sale", "state": "approved", "cart": "6FK6522150836620E", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "56028534885", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0T320567TS5587836", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZB7Y8EC76174AW4613112", "create_time": "2021-07-05T23:09:04Z", "update_time": "2021-07-05T23:09:04Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0T320567TS5587836", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0T320567TS5587836/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZB7Y8EC76174AW4613112", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:08:47Z", "update_time": "2021-07-05T23:09:04Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZB7Y8EC76174AW4613112", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816813} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZAUY1KV14872K8421472G", "intent": "sale", "state": "approved", "cart": "19W34946AD354311P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "62173333941", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "6S892278N6406494Y", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZAUY1KV14872K8421472G", "create_time": "2021-07-05T23:06:12Z", "update_time": "2021-07-05T23:06:12Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/6S892278N6406494Y", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/6S892278N6406494Y/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZAUY1KV14872K8421472G", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:05:55Z", "update_time": "2021-07-05T23:06:12Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZAUY1KV14872K8421472G", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816816} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY7BY3W991940VB486043B", "intent": "sale", "state": "approved", "cart": "1B350164A39756210", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "23749371955", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "19C257131E850262B", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY7BY3W991940VB486043B", "create_time": "2021-07-05T23:02:46Z", "update_time": "2021-07-05T23:02:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/19C257131E850262B", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/19C257131E850262B/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY7BY3W991940VB486043B", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:02:31Z", "update_time": "2021-07-05T23:02:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY7BY3W991940VB486043B", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816818} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY6KI3Y0452638X128114D", "intent": "sale", "state": "approved", "cart": "19Y331413K071511U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "41468340464", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0M443597T0019954R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY6KI3Y0452638X128114D", "create_time": "2021-07-05T23:01:13Z", "update_time": "2021-07-05T23:01:13Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0M443597T0019954R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0M443597T0019954R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY6KI3Y0452638X128114D", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:00:57Z", "update_time": "2021-07-05T23:01:13Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY6KI3Y0452638X128114D", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816820} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY4JY42461888J3529050W", "intent": "sale", "state": "approved", "cart": "3NN161683Y756203T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "65095789448", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "1FN09943JY662130R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY4JY42461888J3529050W", "create_time": "2021-07-05T22:56:54Z", "update_time": "2021-07-05T22:56:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/1FN09943JY662130R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/1FN09943JY662130R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY4JY42461888J3529050W", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T22:56:39Z", "update_time": "2021-07-05T22:56:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY4JY42461888J3529050W", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816823} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/invalid_config.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/invalid_config.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_config.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_state.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_state.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/state.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/state.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index 1fdb3b7826a2..d0d10b2f4d0b 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -10,8 +10,8 @@ ] TEST_REQUIREMENTS = [ - "pytest~=6.1", - "pytest-mock~=3.6", + "pytest~=8.0", + "pytest-mock~=3.12", "requests-mock", ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 53255384da1c..685367064932 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -5,6 +5,7 @@ import base64 import logging from dataclasses import dataclass +from datetime import datetime, timedelta import backoff import requests @@ -67,13 +68,21 @@ def _get_refresh_access_token_response(self): , data=request_body , headers=request_headers ) + self._log_response(response) response.raise_for_status() + + response_json = response.json() + + self.access_token = response_json.get('access_token') + return response.json() + except requests.exceptions.RequestException as e: - if e.response.status_code == 429 or e.response.status_code >= 500: + if e.response and (e.response.status_code == 429 or e.response.status_code >= 500): raise DefaultBackoffException(request=e.response.request, response=e.response) raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 218e983cd7ed..e09544303e22 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -1,11 +1,6 @@ version: 0.50.2 type: DeclarativeSource -check: - type: CheckStream - stream_names: - - balances - definitions: selector: type: RecordSelector @@ -110,13 +105,14 @@ definitions: type: RequestOption field_name: start_date inject_into: request_parameter + end_datetime: + type: MinMaxDatetime + datetime: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} end_time_option: type: RequestOption field_name: end_date inject_into: request_parameter - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S @@ -201,16 +197,43 @@ definitions: $parameters: path: "v1/catalogs/products" field_path: products + + # New Stream - Show Product Details + #Paypal API only has V1 for this stream + #This can't be incremental as there is no time filtering. If you need to have the updates, you need to Append in the full_sync + # This stream works, however has some challenges with performance. This will be commented out on the stream list while + # we resolve the performance challenges for Gold cert. + show_product_details_stream: + type: DeclarativeStream + primary_key: id + name: "show_product_details" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: "/v1/catalogs/products/{{ stream_slice.id }}" + record_selector: + $ref: "#/definitions/selector" + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: NoPagination + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + partition_field: "id" + stream: + $ref: "#/definitions/list_products_stream" #Stream List Disputes #Paypal API only has V1 for this stream - #There is no way to create disputes via API, thus no incremental sync will be added to this stream - #until we have a testing account that allows us to create disputes over transactions. list_disputes_stream: type: DeclarativeStream primary_key: dispute_id name: "list_disputes" - retriever: type: SimpleRetriever record_selector: @@ -222,9 +245,9 @@ definitions: inject_into: request_parameter field_name: next_page_token page_size_option: + type: RequestOption inject_into: request_parameter field_name: page_size - type: RequestOption pagination_strategy: type: PageIncrement start_from_page: 1 @@ -232,17 +255,43 @@ definitions: requester: $ref: "#/definitions/requester" http_method: GET - request_parameters: - #Searches for the optional parameter dispute_start_date. - #If present, it formats the date accordingly. Otherwise, it defaults to a start date set 180 days in the past." - start_time: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" + transformations: + - type: AddFields + fields: + - path: + - updated_time_cut + value: >- + {{ record['update_time'] }} + incremental_sync: + type: DatetimeBasedCursor + cursor_field: updated_time_cut + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + start_datetime: + type: MinMaxDatetime + datetime: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + end_datetime: + type: MinMaxDatetime + #Adding a time delta as the API has a problem with the slice being too close to the now_utc. Set to 30M + datetime: >- + {{ format_datetime(config['dispute_end_date'] if config['dispute_end_date'] else (now_utc() - duration('PT30M')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z'}} + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + start_time_option: + type: RequestOption + field_name: update_time_after + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: update_time_before + inject_into: request_parameter + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S $parameters: path: "v1/customer/disputes" field_path: items #Stream Search Invoices # Currently it does not support incremental sync as metadata does not contain last_update_date - # TODO: Review if this is only a sandbox problem search_invoices_stream: type: DeclarativeStream primary_key: id @@ -273,7 +322,9 @@ definitions: request_body_json: creation_date_range: start: "{{ config['start_date'] }}" - end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + end: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -319,7 +370,9 @@ definitions: datetime_format: "%Y-%m-%dT%H:%M:%SZ" end_datetime: type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption @@ -329,7 +382,7 @@ definitions: type: RequestOption field_name: end_time inject_into: request_parameter - step: "P1D" + step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S $parameters: path: "v1/payments/payment" @@ -339,75 +392,11 @@ streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/list_products_stream" - - "#/definitions/show_product_details_stream" + #- "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" - "#/definitions/search_invoices_stream" - "#/definitions/list_payments_stream" -spec: - type: Spec - documentation_url: https://docs.airbyte.com/integrations/sources/paypal-transactions - connection_specification: - $schema: http://json-schema.org/draft-07/schema# - type: object - additionalProperties: true - required: - - client_id - - client_secret - - start_date - - is_sandbox - properties: - client_id: - type: string - title: Client ID - description: "The Client ID of your Paypal developer application." - airbyte_secret: true - order: 0 - client_secret: - type: string - title: Client secret - description: "The Client Secret of your Paypal developer application." - airbyte_secret: true - order: 1 - start_date: - title: Start Date - description: >- - Start Date for data extraction in ISO - format. Date must be in range from 3 years till 12 hrs before - present time. - type: string - examples: ["2021-06-11T23:59:59", "2021-06-11T23:59:59+00:00"] - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ - format: "date-time" - order: 2 - is_sandbox: - title: "Sandbox" - description: "Determines whether to use the sandbox or production environment." - type: "boolean" - default: false - dispute_start_date: - title: Dispute Start Date Range - description: >- - Start Date parameter for the list dispute endpoint in ISO - format. This Start Date must be in range within 180 days before - present time, and requires ONLY 3 miliseconds(mandatory). - If you don't use this option, it defaults to a start date set 180 days in the past. - type: string - examples: ["2021-06-11T23:59:59.000Z"] - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ - format: "date-time" - order: 2 - refresh_token: - type: "string" - title: "Refresh token" - description: "The key to refresh the expired access token." - airbyte_secret: true - time_window: - type: "integer" - title: "Number of days per request" - description: "The number of days per request. Must be a number between 1 and 31." - default: 7 - minimum: 1 - maximum: 31 +check: + stream_names: + - "balances" \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json index febfb55f7b58..2b0711b67149 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json @@ -6,6 +6,7 @@ "dispute_id": { "type": ["null", "string"] }, "create_time": { "type": "string", "format": "date-time" }, "update_time": { "type": "string", "format": "date-time" }, + "updated_time_cut": { "type": "string", "format": "date-time" }, "status": { "type": ["null", "string"] }, "reason": { "type": ["null", "string"] }, "dispute_state": { "type": ["null", "string"] }, @@ -17,11 +18,14 @@ } }, "links": { - "type": ["null", "object"], - "properties": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { "href": {"type": ["null", "string"]}, "rel": {"type": ["null", "string"]}, - "methid": {"type": ["null", "string"]} + "method": {"type": ["null", "string"]} + } } } } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json index 7075eb5865c9..5505ce1f73db 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -6,53 +6,83 @@ "id": { "type": ["null", "string"] }, "status": { "type": ["null", "string"] }, "primary_recipients": { - "type": ["null", "object"], - "properties": { - "billing_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": {"type": ["null", "string"]}, - "address": {"type": ["null", "string"]}, - "phones": {"type": ["null", "array"]}, - "additiona_info": {"type": ["null", "string"]}, - "email_address": {"type": ["null", "string"]}, - "language": {"type": ["null", "string"]} + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "billing_info": { + "type": ["null", "object"], + "properties": { + "business_name": {"type": ["null", "string"]}, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "address_line_4": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]}, + "phones": {"type": ["null", "array"]}, + "additiona_info": {"type": ["null", "string"]}, + "email_address": {"type": ["null", "string"]}, + "language": {"type": ["null", "string"]} + } + } + } }, - "shipping_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} + "shipping_info": { + "type": ["null", "object"], + "properties": { + "business_name": {"type": ["null", "string"]}, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "address_line_4": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]} } } } + } } - } }, "additional_recipients": { "type": ["null", "array"]}, "detail": { @@ -77,12 +107,12 @@ }, "currency_code": { "type": ["null", "string"] }, "invoice_number": { "type": ["null", "string"] }, - "invoice_date": { "type": ["null", "string"], "format": "date-time" }, + "invoice_date": { "type": ["null", "string"], "format": "date" }, "payment_term": { "type": ["null", "object"], "properties": { "term_type": { "type": ["null", "string"]}, - "due_date": { "type": ["null", "string"], "format": "date-time" } + "due_date": { "type": ["null", "string"], "format": "date" } } }, "metadata": { diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index e86db7b35cc9..6ccfaa6f25d5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -4,6 +4,7 @@ from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource import logging +from airbyte_cdk import AirbyteLogger logger = logging.getLogger("airbyte") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml new file mode 100644 index 000000000000..0357797ee717 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -0,0 +1,65 @@ +documentationUrl: https://docs.airbyte.com/integrations/sources/paypal-transactions +connectionSpecification: + $schema: http://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + required: + - client_id + - client_secret + - start_date + - is_sandbox + properties: + client_id: + type: string + title: Client ID + description: "The Client ID of your Paypal developer application." + airbyte_secret: true + order: 0 + client_secret: + type: string + title: Client secret + description: "The Client Secret of your Paypal developer application." + airbyte_secret: true + order: 1 + start_date: + title: Start Date + description: >- + Start Date for data extraction in ISO + format. Date must be in range from 3 years till 12 hrs before + present time. + type: string + examples: ["2021-06-11T23:59:59", "2021-06-11T23:59:59+00:00"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ + format: "date-time" + order: 2 + is_sandbox: + title: "Sandbox" + description: "Determines whether to use the sandbox or production environment." + type: "boolean" + default: false + dispute_start_date: + title: Dispute Start Date Range + description: >- + Start Date parameter for the list dispute endpoint in ISO + format. This Start Date must be in range within 180 days before + present time, and requires ONLY 3 miliseconds(mandatory). + If you don't use this option, it defaults to a start date set 180 days in the past. + type: string + examples: ["2021-06-11T23:59:59.000Z"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ + format: "date-time" + order: 3 + refresh_token: + type: "string" + title: "Refresh token" + description: "The key to refresh the expired access token." + airbyte_secret: true + time_window: + type: "integer" + title: "Number of days per request" + description: "The number of days per request. Must be a number between 1 and 31." + default: 7 + minimum: 1 + maximum: 31 \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py new file mode 100644 index 000000000000..3902530ac51e --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py @@ -0,0 +1,83 @@ +import pytest +import requests_mock +import time +import logging +import requests +from unittest.mock import patch + +from source_paypal_transaction.components import PayPalOauth2Authenticator +from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException + +@pytest.fixture +def mock_authenticator(): + return PayPalOauth2Authenticator( + config={}, + parameters={}, + client_id='test_client_id', + client_secret='test_client_secret', + token_refresh_endpoint='https://test.token.endpoint', + grant_type='test_grant_type' + ) + +def test_get_refresh_access_token_response(mock_authenticator): + expected_response_json = {'access_token': 'test_access_token', 'expires_in': 3600} + with requests_mock.Mocker() as mock_request: + mock_request.post('https://test.token.endpoint', json=expected_response_json, status_code=200) + # Call _get_refresh method + mock_authenticator._get_refresh_access_token_response() + + assert mock_authenticator.access_token == expected_response_json['access_token'] + +def test_token_expiration(mock_authenticator): + # Mock response for initial token request + initial_response_json = {'access_token': 'initial_access_token', 'expires_in': 1} + # Mock response for token refresh request + refresh_response_json = {'access_token': 'refreshed_access_token', 'expires_in': 3600} + with requests_mock.Mocker() as mock_request: + + mock_request.post('https://test.token.endpoint', json=initial_response_json, status_code=200) + mock_authenticator._get_refresh_access_token_response() + + # Assert that the initial access token is set correctly + assert mock_authenticator.access_token == initial_response_json['access_token'] + time.sleep(2) + + mock_request.post('https://test.token.endpoint', json=refresh_response_json, status_code=200) + mock_authenticator._get_refresh_access_token_response() + + # Assert that the access token is refreshed + assert mock_authenticator.access_token == refresh_response_json['access_token'] + + +def test_backoff_retry(mock_authenticator, caplog): + + mock_response = {'access_token': 'test_access_token', 'expires_in': 3600} + mock_reason = "Too Many Requests" + + with requests_mock.Mocker() as mock_request: + mock_request.post('https://test.token.endpoint', json=mock_response, status_code=429, reason=mock_reason) + with caplog.at_level(logging.INFO): + try: + mock_authenticator._get_refresh_access_token_response() + except requests.exceptions.HTTPError: + pass # Ignore the HTTPError + else: + pytest.fail("Expected DefaultBackoffException to be raised") + +@pytest.fixture +def authenticator_parameters(): + return { + "client_id": "test_client_id", + "client_secret": "test_client_secret", + "config": {}, + "parameters": {}, + "token_refresh_endpoint": "https://test.token.endpoint", + "grant_type": "test_grant_type" + } + +def test_get_headers(authenticator_parameters): + expected_basic_auth = "Basic dGVzdF9jbGllbnRfaWQ6dGVzdF9jbGllbnRfc2VjcmV0" + authenticator = PayPalOauth2Authenticator(**authenticator_parameters) + headers = authenticator.get_headers() + assert headers == {"Authorization": expected_basic_auth} + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py index 9a3cce34d229..5b6328e2ceb8 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -1,15 +1,51 @@ +# conftest.py import pytest +import json +from datetime import datetime +from unittest.mock import patch + from source_paypal_transaction import SourcePaypalTransaction + @pytest.fixture(name="config") def config_fixture(): + #From File test + # with open('../secrets/config.json') as f: + # return json.load(f) + #Mock test return { - "client_id": "your_client_id", - "client_secret": "your_client_secret", - "start_date": "2022-01-01T00:00:00Z", - "is_sandbox": True + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "start_date": "2024-01-30T00:00:00Z", + "end_date": "2024-02-01T00:00:00Z", + "dispute_start_date": "2024-02-01T00:00:00.000Z", + "dispute_end_date": "2024-02-05T23:59:00.000Z", + "buyer_username": "Your Buyer email", + "buyer_password": "Your Buyer Password", + "payer_id": "ypur ACCOUNT ID", + "is_sandbox": True } + @pytest.fixture(name="source") def source_fixture(): - return SourcePaypalTransaction() \ No newline at end of file + return SourcePaypalTransaction() + +def validate_date_format(date_str, format): + try: + datetime.strptime(date_str, format) + return True + except ValueError: + return False + +def test_date_formats_in_config(config): + start_date_format = "%Y-%m-%dT%H:%M:%SZ" + dispute_date_format = "%Y-%m-%dT%H:%M:%S.%fZ" + assert validate_date_format(config['start_date'], start_date_format), "Start date format is incorrect" + assert validate_date_format(config['end_date'], start_date_format), "End date format is incorrect" + assert validate_date_format(config['dispute_start_date'], dispute_date_format), "Dispute start date format is incorrect" + assert validate_date_format(config['dispute_end_date'], dispute_date_format), "Dispute end date format is incorrect" + +#@pytest.fixture(name="logger_mock") +def logger_mock_fixture(): + return patch("source_paypal_transactions.source.AirbyteLogger") \ No newline at end of file From 70e30bcf9b238ede6c539725ce534f83e1458bdb Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 7 Feb 2024 21:00:12 -0600 Subject: [PATCH 08/36] Add coveragerc. Documentation md file. Change version and ql level --- .../source-paypal-transaction/.coveragerc | 3 + .../source-paypal-transaction/metadata.yaml | 7 +- .../source_paypal_transaction/manifest.yaml | 6 +- .../unit_tests/conftest.py | 2 +- .../unit_tests/test_source.py | 4 + .../sources/paypal-transaction.md | 277 +++++++++++++++--- 6 files changed, 247 insertions(+), 52 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/.coveragerc create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc b/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc new file mode 100644 index 000000000000..4e4eba3bda57 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc @@ -0,0 +1,3 @@ +[run] +omit = + source_paypal_transaction/run.py \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index ad1a7d8d4454..af34edd024a9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -1,6 +1,6 @@ data: ab_internal: - ql: 300 + ql: 400 sl: 200 allowedHosts: hosts: @@ -34,6 +34,11 @@ data: 2.1.0: message: 'Version 2.1.0 changes the format of the state. The format of the cursor changed from "2021-06-18T16:24:13+03:00" to "2021-06-18T16:24:13Z". The state key for the transactions stream changed to "transaction_updated_date" and the key for the balances stream change to "as_of_time". The upgrade is safe, but rolling back is not.' upgradeDeadline: "2023-09-18" + suggestedStreams: + streams: + - transactions + - balances + - list_payments supportLevel: certified tags: - language:low-code diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index e09544303e22..0e2e1a348a1a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -201,8 +201,7 @@ definitions: # New Stream - Show Product Details #Paypal API only has V1 for this stream #This can't be incremental as there is no time filtering. If you need to have the updates, you need to Append in the full_sync - # This stream works, however has some challenges with performance. This will be commented out on the stream list while - # we resolve the performance challenges for Gold cert. + # This stream works, however has some challenges with performance. Whith a big catalog it can take up to 3 hrs. show_product_details_stream: type: DeclarativeStream primary_key: id @@ -313,7 +312,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 20 + page_size: 100 requester: $ref: "#/definitions/requester" http_method: POST @@ -372,7 +371,6 @@ definitions: type: MinMaxDatetime datetime: >- {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} - #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py index 5b6328e2ceb8..658d5e29af7a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -46,6 +46,6 @@ def test_date_formats_in_config(config): assert validate_date_format(config['dispute_start_date'], dispute_date_format), "Dispute start date format is incorrect" assert validate_date_format(config['dispute_end_date'], dispute_date_format), "Dispute end date format is incorrect" -#@pytest.fixture(name="logger_mock") +@pytest.fixture(name="logger_mock") def logger_mock_fixture(): return patch("source_paypal_transactions.source.AirbyteLogger") \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py new file mode 100644 index 000000000000..ccfeb33e4afd --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py @@ -0,0 +1,4 @@ +from source_paypal_transaction import SourcePaypalTransaction + +def test_source(): + assert SourcePaypalTransaction() \ No newline at end of file diff --git a/docs/integrations/sources/paypal-transaction.md b/docs/integrations/sources/paypal-transaction.md index 9390c59dac6f..2401b24322ad 100644 --- a/docs/integrations/sources/paypal-transaction.md +++ b/docs/integrations/sources/paypal-transaction.md @@ -1,58 +1,63 @@ -# Paypal Transaction +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -This page contains the setup guide and reference information for the Paypal Transaction source connector. +# Paypal + +This page contains the setup guide and reference information for the Paypal source connector. + +This connector uses [PayPal APIs](https://developer.paypal.com/api/rest/authentication/) OAuth 2.0 access token to authenticate requests. ## Prerequisites -The [Paypal Transaction API](https://developer.paypal.com/docs/api/transaction-search/v1/) is used to get the history of transactions for a PayPal account. +You will need a Paypal account, which you can get following [these steps](https://developer.paypal.com/docs/platforms/get-started/) + +In the same page, you will also find how to setup a Sandbox so you can test the connector before using it in production. ## Setup guide -### Step 1: Set up Paypal Transaction +### Step 1: Get your Paypal secrets -In order to get an `Client ID` and `Secret` please go to [this](https://developer.paypal.com/docs/platforms/get-started/) page and follow the instructions. After registration you may find your `Client ID` and `Secret` [here](https://developer.paypal.com/developer/accounts/). +After creating your account you will be able to get your `Client ID` and `Secret`. You can find them in your [Apps & Credentials page](https://developer.paypal.com/dashboard/applications/live). -:::note -Our Paypal Transactions Source Connector does not support OAuth at this time due to limitations outside of our control. If OAuth for Paypal Transactions is critical to your business, [please reach out to us](mailto:product@airbyte.io) to discuss how we may be able to partner on this effort. +### Step 2: Set up the Paypal Transaction connector in Airbyte -::: -## Step 2: Set up the Paypal Transaction connector in Airbyte +1. Log into your Airbyte account + - For Cloud [Log in here](https://cloud.airbyte.com/workspaces). - -**For Airbyte Cloud:** +2. In the left navigation bar, click **Sources**. + + a. If this is your first time creating a source, use the search bar and enter **Paypal Transaction** and select it. -1. [Log into your Airbyte Cloud](https://cloud.airbyte.com/workspaces) account. -2. In the left navigation bar, click **Sources**. In the top-right corner, click **+new source**. -3. On the Set up the source page, enter the name for the Paypal Transaction connector and select **Paypal Transaction** from the Source type dropdown. -4. Enter your client id -5. Enter your secret -6. Choose if your account is sandbox -7. Enter the date you want your sync to start from -8. Click **Set up source**. - + b. If you already have sources configured, go to the top-right corner and click **+new source**. Then enter **Paypal Transaction** in the searech bar and select the connector. + +3. Set the name for your source +4. Enter your `Client ID` +5. Enter your `Client secret` +6. `Start Date`: Use the provided datepicker or enter manually a UTC date and time in the format `YYYY-MM-DDTHH:MM:SSZ`. +7. Switch ON/Off the Sandbox toggle. By defaukt the toggle is OFF, meaning it work only in a produciton environment. +8. _(Optional) `Dispute Start Date Range`: Use the provided datepicker or enter manually a UTC date and time in the format `YYYY-MM-DDTHH:MM:SS.sssZ`. + - If you don't add a date and you sync the `lists_disputes stream`, it will use the default value of 180 days in the past to retrieve data + - It is mandatory to add the milliseconds is you enter a datetime. + - This option only works for `lists_disputes stream` - -**For Airbyte Open Source:** +9. _(Optional)`Refresh Token`:_ You can enter manually a refresh token. Right now the stream does this automatically. +10. _(Optional)`Number of days per request`:_ You can specify the days used by the connector when requesting data from the Paypal API. This helps in cases when you have a rate limit and you want to lower the window of retrieving data. + - Paypal has a 10K record limit per request. This option is useful if your sync is every week and you have more than 10K per week + - The default value is 7 + - This Max value you can enter is 31 days + +11. Click **Set up source** -1. Navigate to the Airbyte Open Source dashboard -2. Set the name for your source -3. Enter your client id -4. Enter your secret -5. Choose if your account is sandbox -6. Enter the date you want your sync to start from -7. Click **Set up source** - +:::info -## Supported sync modes +By default, syncs are run with a slice period of 7 days. If you see errors with the message `Result set size is greater than the maximum limit` or an error code like `RESULTSET_TOO_LARGE`: -The PayPal Transaction source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes): +- Try lower the the size of the slice period in your optional parameters in your connection configuration. +- You can try to lower the scheduling sync window in case a day slice period is not enough. Lowering the sync period it may help avoid reaching the 10K limit. + +::: -| Feature | Supported? | -| :------------------------ | :--------- | -| Full Refresh Sync | Yes | -| Incremental - Append Sync | Yes | -| Namespaces | No | ## Supported Streams @@ -60,19 +65,197 @@ This Source is capable of syncing the following core Streams: * [Transactions](https://developer.paypal.com/docs/api/transaction-search/v1/#transactions) * [Balances](https://developer.paypal.com/docs/api/transaction-search/v1/#balances) +* [List Products](https://developer.paypal.com/docs/api/catalog-products/v1/#products_list) +* [Show Product Details](https://developer.paypal.com/docs/api/catalog-products/v1/#products_get) +* [List Disputes](https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_list) +* [Search Invoices](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_search-invoices) +* [List Payments](https://developer.paypal.com/docs/api/payments/v1/#payment_list) + + +### Transactions Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** | `Transactions` | +| :-------------------------- | :------------------------ | +| `Start Date` | Timestamp with TZ (no ms) | +| `Dispute Start Date Range` | NA | +| `Refresh token` | Auto | +| `Number of days per request`| Max 31 , 7(D) | +| `Pagination Strategy` | Page Increment | +| `Page size ` | Max 500 (F) | +| `Full Refresh` | :white_check_mark: | +| `Incremental` | :white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +### Balances Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Balances` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |NA | +| `Page size ` |NA | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + + +### List Products Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + + +| **Param/Feature** |`List Products` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |Page Increment | +| `Page size ` |Max 20 (F) | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +:::caution + +When configuring your stream take in consideration that the way the API works limits the speed on retreiving data. In some cases a +30K catalog retrieval could take between 10-15 minutes. + +::: + +___ + +### Show Products Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Show Prod. Details` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |NA | +| `Page size ` |NA | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value -## Performance considerations +**F:** Fixed Value. This means it is not configurable. -Paypal transaction API has some [limits](https://developer.paypal.com/docs/integration/direct/transaction-search/) -* `start_date_min` = 3 years, API call lists transaction for the previous three years. -* `start_date_max` = 1.5 days, it takes a maximum of three hours for executed transactions to appear in the list transactions call. It is set to 1.5 days by default based on experience, otherwise API throw an error. -* `stream_slice_period` = 7 day, the maximum supported date range is 31 days. -* `records_per_request` = 10000, the maximum number of records in a single request. -* `page_size` = 500, the maximum page size is 500. -* `requests_per_minute` = 30, maximum limit is 50 requests per minute from IP address to all endpoint +:::caution + +When configuring this stream consider that the parent stream paginates with 20 number of items (Max alowed page size). The Paypal API calls are not concurrent, so the time it takes depends entirely on the server side. +This stream could take a considerable time syncing, so you should consider running the sync of this and the parent stream (`list_products`) at the end of the day. +Depending on the size of the catalog it could take several hours to sync. + +::: + +___ + +### List Disputes Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`List Disputes` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |Timestamp with TZ (w/ms) | +| `Refresh token` |Auto | +| `Number of days per request`|Max 180 , 7(D) | +| `Pagination Strategy` |Page Token | +| `Page size ` |Max 50 (F) | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +### Search Invoices Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Search Invoices` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|ND | +| `Pagination Strategy` |Page Number | +| `Page size ` |Max 100 (F) | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +**ND:** Not Defined in the source. + + +:::info + +The `start_end` from the configuration, is passed to the body of the request and uses the `creation_date_range.start` and `creation_date_range.end`. More information in the [Paypal Developer API documentation](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_search-invoices). + +::: + + +___ + +### List Payments Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features. + +| **Param/Feature** |`List Payments` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA , 7(D) | +| `Pagination Strategy` |Page Cursor | +| `Page size ` |Max 20 (F) | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +## Performance Considerations + +* **Data Availability:** It takes a maximum of 3 hours for executed transactions to appear in the list transactions call. +* **Number of days per request:** The maximum supported date range is 31 days. +* **Historical Data:** You can't retrieve more than 3yrs of data for the `transactions` stream. For `dispute_start_date` you can only retrieve 180 days of data (see specifications per stream) +* `records_per_request`: The maximum number of records in a single request are 10K (API Server restriction) +* `page_size`: The maximum page size is 500. This has been configured by default. +* `requests_per_minute` = The maximum limit is 50 requests per minute from IP address to all endpoint (API Server restriction). + -By default, syncs are performed with a slice period of 7 days. If you see errors with the message `Result set size is greater than the maximum limit. Change the filter criteria and try again.`, lower the size of the slice period in your connection configuration. ## Data type map @@ -83,10 +266,12 @@ By default, syncs are performed with a slice period of 7 days. If you see errors | `array` | `array` | | `object` | `object` | + ## Changelog | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------| +| 2.3.1 | 2024-02-07 | [34510](https://github.com/airbytehq/airbyte/pull/34510) | Silver certified. New Streams Added | | 2.2.1 | 2024-01-11 | [34155](https://github.com/airbytehq/airbyte/pull/34155) | prepare for airbyte-lib | | 2.2.0 | 2023-10-25 | [31852](https://github.com/airbytehq/airbyte/pull/31852) | The size of the time_window can be configured | | 2.1.2 | 2023-10-23 | [31759](https://github.com/airbytehq/airbyte/pull/31759) | Keep transaction_id as a string and fetch data in 7-day batches From 6d2a730445089961b2b0e845b1eaaf90911ee9ce Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 7 Feb 2024 22:16:39 -0600 Subject: [PATCH 09/36] Update CDK version --- .../connectors/source-paypal-transaction/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index d0d10b2f4d0b..91b585c38f5a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -6,7 +6,7 @@ from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ - "airbyte-cdk>=0.51.44", + "airbyte-cdk>=0.61.2", ] TEST_REQUIREMENTS = [ From 9fb24669755160987318d2bacd2dd35c12be6972 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Mon, 22 Jan 2024 21:21:50 -0600 Subject: [PATCH 10/36] Start Silver certification. Add new streams --- .../source_paypal_transaction/manifest.yaml | 99 ++++++++++++++++++- .../unit_tests/conftest.py | 15 +++ 2 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 58f6d026171a..95eb696c5c2e 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -16,7 +16,7 @@ definitions: requester: type: HttpRequester - url_base: 'https://api-m.{{ "sandbox." if config["is_sandbox"] }}paypal.com/v1/reporting/' + url_base: 'https://api-m.{{ "sandbox." if config["is_sandbox"] }}paypal.com/' path: "{{ parameters.path }}" http_method: GET request_headers: @@ -106,7 +106,7 @@ definitions: step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S $parameters: - path: "transactions" + path: "v1/reporting/transactions" field_path: transaction_details balances_stream: @@ -150,7 +150,100 @@ definitions: field_name: as_of_time inject_into: request_parameter $parameters: - path: "balances" + path: "v1/reporting/balances" + + search_invoices_stream: + type: DeclarativeStream + primary_key: id + name: "search_invoices" + #json_schema: "./schemas/search_invoices.json" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 100 + requester: + $ref: "#/definitions/requester" + http_method: POST + #path: "search-invoices" + request_parameters: + fields: all + request_body_json: + # payment_date_range: + # start: "{{ config['payment_start_date'] }}" + # end: "{{ config['payment_end_date'] }}" + # invoice_date_range: + # start: "{{ config['invoice_start_date'] }}" + # end: "{{ config['invoice_end_date'] }}" + # due_date_range: + # start: "{{ config['due_start_date'] }}" + # end: "{{ config['due_end_date'] }}" + creation_date_range: + start: "{{ config['creation_start_date'] }}" + end: "{{ config['creation_end_date'] }}" + transformations: + # - type: AddFields + # fields: + # - path: + # - invoice_created_by + # value: >- + # {{ format_datetime(record['detail']['metadata']['created_by'], '%Y-%m-%dT%H:%M:%SZ') }} + # - type: AddFields + # fields: + # - path: + # - invoice_updated_by + # value: >- + # {{ format_datetime(record['detail']['metadata']['last_updated_by'], '%Y-%m-%dT%H:%M:%SZ') }} + - type: AddFields + fields: + - path: + - invoice_updated_date + value: >- + {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + $parameters: + path: "v2/invoicing/search-invoices" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: invoice_updated_date + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: start + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: end + inject_into: request_parameter + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S + #incremental_sync: null + $parameters: + field_path: items + path: "v2/invoicing/invoices" streams: - "#/definitions/transactions_stream" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py new file mode 100644 index 000000000000..9a3cce34d229 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -0,0 +1,15 @@ +import pytest +from source_paypal_transaction import SourcePaypalTransaction + +@pytest.fixture(name="config") +def config_fixture(): + return { + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "start_date": "2022-01-01T00:00:00Z", + "is_sandbox": True + } + +@pytest.fixture(name="source") +def source_fixture(): + return SourcePaypalTransaction() \ No newline at end of file From d66a2b92cf6a41108eef5bebf027bbfb803196c4 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 24 Jan 2024 13:57:57 -0600 Subject: [PATCH 11/36] Add Search invoices stream. Parametrize some variables. --- .../integration_tests/configured_catalog.json | 10 + .../configured_catalog_search_invoices.json | 14 + .../source-paypal-transaction/metadata.yaml | 2 +- .../source_paypal_transaction/components.py | 14 +- .../source_paypal_transaction/manifest.yaml | 89 ++--- .../schemas/search_invoices.json | 306 ++++++++++++++++++ .../source_paypal_transaction/source.py | 4 +- 7 files changed, 377 insertions(+), 62 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index e0992dea17b0..c7f9340e8f79 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -20,6 +20,16 @@ }, "sync_mode": "incremental", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "default_cursor_field": ["invoice_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json new file mode 100644 index 000000000000..2d054072e24e --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json @@ -0,0 +1,14 @@ +{ + "streams": [ + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "default_cursor_field": ["invoice_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 69b2bdd25bc6..24705a6a5436 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -1,6 +1,6 @@ data: ab_internal: - ql: 200 + ql: 300 sl: 200 allowedHosts: hosts: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 332549f3b617..6db50df60ccd 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -42,6 +42,7 @@ def get_headers(self): @backoff.on_exception( backoff.expo, DefaultBackoffException, + max_tries=2, on_backoff=lambda details: logger.info( f"Caught retryable error after {details['tries']} tries. Waiting {details['wait']} seconds then retrying..." ), @@ -49,8 +50,17 @@ def get_headers(self): ) def _get_refresh_access_token_response(self): try: + request_url = self.get_token_refresh_endpoint() + request_headers = self.get_headers() + request_body = self.build_refresh_request_body() + + logger.info(f"Sending request to URL: {request_url}") + response = requests.request( - method="POST", url=self.get_token_refresh_endpoint(), data=self.build_refresh_request_body(), headers=self.get_headers() + method="POST" + , url=request_url + , data=request_body + , headers=request_headers ) self._log_response(response) response.raise_for_status() @@ -61,3 +71,5 @@ def _get_refresh_access_token_response(self): raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e + + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 95eb696c5c2e..142f1584dcd2 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -38,7 +38,7 @@ definitions: - type: DefaultErrorHandler backoff_strategies: - type: ConstantBackoffStrategy - backoff_time_in_seconds: 300 + backoff_time_in_seconds: 100 request_body_json: {} transactions_stream: @@ -156,7 +156,6 @@ definitions: type: DeclarativeStream primary_key: id name: "search_invoices" - #json_schema: "./schemas/search_invoices.json" retriever: type: SimpleRetriever record_selector: @@ -178,76 +177,48 @@ definitions: requester: $ref: "#/definitions/requester" http_method: POST - #path: "search-invoices" - request_parameters: - fields: all - request_body_json: - # payment_date_range: - # start: "{{ config['payment_start_date'] }}" - # end: "{{ config['payment_end_date'] }}" - # invoice_date_range: - # start: "{{ config['invoice_start_date'] }}" - # end: "{{ config['invoice_end_date'] }}" - # due_date_range: - # start: "{{ config['due_start_date'] }}" - # end: "{{ config['due_end_date'] }}" - creation_date_range: - start: "{{ config['creation_start_date'] }}" - end: "{{ config['creation_end_date'] }}" + request_headers: + Content-Type: application/json transformations: - # - type: AddFields - # fields: - # - path: - # - invoice_created_by - # value: >- - # {{ format_datetime(record['detail']['metadata']['created_by'], '%Y-%m-%dT%H:%M:%SZ') }} - # - type: AddFields - # fields: - # - path: - # - invoice_updated_by - # value: >- - # {{ format_datetime(record['detail']['metadata']['last_updated_by'], '%Y-%m-%dT%H:%M:%SZ') }} - type: AddFields fields: - path: - invoice_updated_date value: >- {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + incremental_sync: + type: DatetimeBasedCursor + cursor_field: invoice_updated_date + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: creation_date_range.start + inject_into: body_json + end_time_option: + type: RequestOption + field_name: creation_date_range.end + inject_into: body_json + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S $parameters: + field_path: items path: "v2/invoicing/search-invoices" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: invoice_updated_date - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_time_option: - type: RequestOption - field_name: start - inject_into: request_parameter - end_time_option: - type: RequestOption - field_name: end - inject_into: request_parameter - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S - #incremental_sync: null - $parameters: - field_path: items - path: "v2/invoicing/invoices" streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" + - "#/definitions/search_invoices_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json new file mode 100644 index 000000000000..288be6f5abab --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -0,0 +1,306 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "properties": { + "id": { "type": "string" }, + "status": { "type": "string" }, + "primary_recipients": { + "type": "object", + "properties": { + "billing_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": {"type": "string"}, + "address": {"type": "string"}, + "phones": {"type": "array"}, + "additiona_info": {"type": "string"}, + "email_address": {"type": "string"}, + "language": {"type": "string"} + }, + "shipping_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + } + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + } + } + } + } + } + } + }, + "additional_recipients": { "type": "array"}, + "detail": { + "type": "object", + "properties": { + "reference": { "type": "string" }, + "note": { "type": "string" }, + "terms_and_conditions": { "type": "string" }, + "memo": { "type": "string" }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "reference_url": { "type": "string" }, + "content_type": { "type": "string" }, + "size": { "type": "string" }, + "create_time": { "type": "string" } + } + } + }, + "currency_code": { "type": "string" }, + "invoice_number": { "type": "string" }, + "invoice_date": { "type": "string", "format": "date-time" }, + "payment_term": { + "type": "object", + "properties": { + "term_type": { "type": "string"}, + "due_date": { "type": "string", "format": "date-time" } + } + }, + "metadata": { + "type": "object", + "properties": { + "created_by": { "type": "string"}, + "last_updated_by": { "type": "string"}, + "create_time": { "type": "string", "format": "date-time" }, + "last_update_time": { "type": "string", "format": "date-time" }, + "cancelled_by": { "type": "string"}, + "last_seen_by": { "type": "string"}, + "recipient_view_url": { "type": "string"}, + "invoicer_view_url": { "type": "string"}, + "cancel_time": { "type": "string", "format": "date-time" }, + "first_sent_time": { "type": "string", "format": "date-time" }, + "last_sent_time": { "type": "string", "format": "date-time" }, + "created_by_flow": { "type": "string"} + } + } + } + }, + "invoicer": { + "type": "object", + "properties": { + "business_name": { "type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + }, + "phones": { + "type": "array", + "items": { + "type": "object", + "properties": { + "country_code": {"type": "string"}, + "national_number": {"type": "string"}, + "extension_number": {"type": "string"}, + "phone_type": {"type": "string"} + } + } + }, + "website": {"type": "string"}, + "tax_id": {"type": "string"}, + "additional_notes": {"type": "string"}, + "email_address": { "type": "string"} + } + } + + + } + }, + "configuration": { + "type": "object", + "properties": { + "tax_calculated_after_discount": {"type": "string"}, + "tax_inclusive": {"type": "string"}, + "allow_tip": {"type": "string"}, + "partial_payment": { + "type": "object", + "properties": { + "allow_partial_payment": {"type": "string"}, + "minimum_amount_due": {"type": "object"} + } + }, + "template_id": {"type": "string"} + } + }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"}, + "breakdown": { + "type": "object", + "properties": { + "item_total": {"type": "object"}, + "discount": {"type": "object"}, + "tax_total": {"type": "object"}, + "shipping": {"type": "object"}, + "custom": {"type": "object"} + } + } + } + }, + "due_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "gratuity": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "payments": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "payment_id": { "type": "string" }, + "note": { "type": "string" }, + "type": { "type": "string" }, + "payment_date":{ "type": "string", "format": "date-time" }, + "method": { "type": "string" }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + }, + "shipping_info": { + "type": "object", + "properties": { + "business_name": {"type": "string"}, + "name": { + "type": "object", + "properties": { + "prefix": {"type": "string"}, + "given_name": {"type": "string"}, + "surname": {"type": "string"}, + "middle_name": {"type": "string"}, + "suffix": {"type": "string"}, + "alternate_full_name": {"type": "string"}, + "full_name": {"type": "string"} + } + }, + "address": { + "type": "object", + "properties": { + "address_line_1": {"type": "string"}, + "address_line_2": {"type": "string"}, + "address_line_3": {"type": "string"}, + "admin_area_1": {"type": "string"}, + "admin_area_2": {"type": "string"}, + "admin_area_3": {"type": "string"}, + "postal_code": {"type": "string"}, + "country_code": {"type": "string"}, + "address_details": {"type": "object"} + + } + } + } + } + } + } + }, + "paid_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + }, + "refunds": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "refund_id": { "type": "string" }, + "type": { "type": "string" }, + "refund_date":{ "type": "string", "format": "date-time" }, + "method": { "type": "string" }, + "amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + } + } + }, + "refund_amount": { + "type": "object", + "properties": { + "currency_code": {"type": "string"}, + "value": {"type": "string"} + } + } + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": "string", "format": "uri" }, + "rel": { "type": "string" }, + "method": { "type": "string" } + } + } + } + } + } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index afd56a9278a1..e86db7b35cc9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -3,6 +3,9 @@ # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource +import logging +logger = logging.getLogger("airbyte") + """ This file provides the necessary constructs to interpret a provided declarative YAML configuration file into @@ -11,7 +14,6 @@ WARNING: Do not modify this file. """ - # Declarative Source class SourcePaypalTransaction(YamlDeclarativeSource): def __init__(self): From 9c430da0e323454a889aba6ab90dff949b41722b Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 24 Jan 2024 22:57:47 -0600 Subject: [PATCH 12/36] Add new stream - Product catalog -. Add error handling for transactions incremental sync. Other Minor adjustments --- .../integration_tests/configured_catalog.json | 13 +- .../configured_catalog_products.json | 14 + .../expected_records_sandbox.jsonl | 3 +- .../source_paypal_transaction/components.py | 4 + .../source_paypal_transaction/manifest.yaml | 56 ++- .../schemas/products.json | 26 ++ .../schemas/search_invoices.json | 338 +++++++++--------- 7 files changed, 279 insertions(+), 175 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index c7f9340e8f79..0f97791daf76 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -25,11 +25,22 @@ "stream": { "name": "search_invoices", "json_schema": {}, - "default_cursor_field": ["invoice_updated_date"], + "source_defined_cursor": true, + "default_cursor_field": ["last_update_time"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "products", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json new file mode 100644 index 000000000000..39c22c39aaa1 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json @@ -0,0 +1,14 @@ +{ + "streams": [ + { + "stream": { + "name": "products", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl index da4775fecc29..53317576465a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl @@ -1,4 +1,5 @@ {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1694795587519} {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1694795587522} {"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1694795587524} -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} \ No newline at end of file +{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} +{"stream": "products", "data": {"id": "1647236710", "name": "Blue M","description": "Blue M", "create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 6db50df60ccd..3d811723f3e4 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -10,6 +10,10 @@ import requests from airbyte_cdk.sources.declarative.auth import DeclarativeOauth2Authenticator from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException +from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester +from airbyte_cdk.sources.declarative.types import StreamState, StreamSlice +from typing import Any, MutableMapping, Optional, Mapping + logger = logging.getLogger("airbyte") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 142f1584dcd2..8f93f445d19b 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -41,6 +41,7 @@ definitions: backoff_time_in_seconds: 100 request_body_json: {} + #Stream Transactions transactions_stream: type: DeclarativeStream primary_key: transaction_id @@ -67,6 +68,15 @@ definitions: $ref: "#/definitions/requester" request_parameters: fields: all + error_handler: + type: CompositeErrorHandler + error_handlers: + - type: DefaultErrorHandler + description: "Handle HTTP 400 with error message: Data for the given start date is not available. " + response_filters: + - http_codes: [400] + action: IGNORE + predicate: "{{ 'Data for the given start date is not available' in response['message']}}" transformations: - type: AddFields fields: @@ -108,7 +118,8 @@ definitions: $parameters: path: "v1/reporting/transactions" field_path: transaction_details - + + #Stream balances balances_stream: type: DeclarativeStream primary_key: as_of_time @@ -152,6 +163,7 @@ definitions: $parameters: path: "v1/reporting/balances" + #Stream search Invoices search_invoices_stream: type: DeclarativeStream primary_key: id @@ -173,7 +185,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 100 + page_size: 20 requester: $ref: "#/definitions/requester" http_method: POST @@ -183,12 +195,11 @@ definitions: - type: AddFields fields: - path: - - invoice_updated_date - value: >- - {{ format_datetime(record['detail']['metadata']['last_updated_time'], '%Y-%m-%dT%H:%M:%SZ') }} + - last_update_time + value: "{{ format_datetime(record['detail']['metadata']['last_update_time'], '%Y-%m-%dT%H:%M:%SZ') }}" incremental_sync: type: DatetimeBasedCursor - cursor_field: invoice_updated_date + cursor_field: last_update_time cursor_datetime_formats: - "%Y-%m-%dT%H:%M:%SZ" datetime_format: "%Y-%m-%dT%H:%M:%SZ" @@ -214,11 +225,44 @@ definitions: $parameters: field_path: items path: "v2/invoicing/search-invoices" + + #New Stream + products_stream: + type: DeclarativeStream + primary_key: id + name: "products" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 10 + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + requester: + $ref: "#/definitions/requester" + http_method: GET + request_headers: + Content-Type: application/json + $parameters: + path: "v1/catalogs/products" + field_path: products streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/search_invoices_stream" + - "#/definitions/products_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json new file mode 100644 index 000000000000..d587291c7550 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "method": {"type": ["null", "string"]} + } + } + } + } +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json index 288be6f5abab..7075eb5865c9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -1,52 +1,52 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", + "type": ["null", "object"], "additionalProperties": true, "properties": { - "id": { "type": "string" }, - "status": { "type": "string" }, + "id": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, "primary_recipients": { - "type": "object", + "type": ["null", "object"], "properties": { "billing_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, - "name": {"type": "string"}, - "address": {"type": "string"}, - "phones": {"type": "array"}, - "additiona_info": {"type": "string"}, - "email_address": {"type": "string"}, - "language": {"type": "string"} + "business_name": {"type": ["null", "string"]}, + "name": {"type": ["null", "string"]}, + "address": {"type": ["null", "string"]}, + "phones": {"type": ["null", "array"]}, + "additiona_info": {"type": ["null", "string"]}, + "email_address": {"type": ["null", "string"]}, + "language": {"type": ["null", "string"]} }, "shipping_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, + "business_name": {"type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} } }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } } } @@ -54,100 +54,104 @@ } } }, - "additional_recipients": { "type": "array"}, + "additional_recipients": { "type": ["null", "array"]}, "detail": { - "type": "object", + "type": ["null", "object"], "properties": { - "reference": { "type": "string" }, - "note": { "type": "string" }, - "terms_and_conditions": { "type": "string" }, - "memo": { "type": "string" }, + "reference": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "terms_and_conditions": { "type": ["null", "string"] }, + "memo": { "type": ["null", "string"] }, "attachments": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "id": { "type": "string" }, - "reference_url": { "type": "string" }, - "content_type": { "type": "string" }, - "size": { "type": "string" }, - "create_time": { "type": "string" } + "id": { "type": ["null", "string"] }, + "reference_url": { "type": ["null", "string"] }, + "content_type": { "type": ["null", "string"] }, + "size": { "type": ["null", "string"] }, + "create_time": { "type": ["null", "string"] } } } }, - "currency_code": { "type": "string" }, - "invoice_number": { "type": "string" }, - "invoice_date": { "type": "string", "format": "date-time" }, + "currency_code": { "type": ["null", "string"] }, + "invoice_number": { "type": ["null", "string"] }, + "invoice_date": { "type": ["null", "string"], "format": "date-time" }, "payment_term": { - "type": "object", + "type": ["null", "object"], "properties": { - "term_type": { "type": "string"}, - "due_date": { "type": "string", "format": "date-time" } + "term_type": { "type": ["null", "string"]}, + "due_date": { "type": ["null", "string"], "format": "date-time" } } }, "metadata": { - "type": "object", + "type": ["null", "object"], "properties": { - "created_by": { "type": "string"}, - "last_updated_by": { "type": "string"}, - "create_time": { "type": "string", "format": "date-time" }, - "last_update_time": { "type": "string", "format": "date-time" }, - "cancelled_by": { "type": "string"}, - "last_seen_by": { "type": "string"}, - "recipient_view_url": { "type": "string"}, - "invoicer_view_url": { "type": "string"}, - "cancel_time": { "type": "string", "format": "date-time" }, - "first_sent_time": { "type": "string", "format": "date-time" }, - "last_sent_time": { "type": "string", "format": "date-time" }, - "created_by_flow": { "type": "string"} + "created_by": { "type": ["null", "string"]}, + "last_updated_by": { "type": ["null", "string"]}, + "create_time": { "type": ["null", "string"], "format": "date-time" }, + "last_update_time": { "type": ["null", "string"], "format": "date-time" }, + "cancelled_by": { "type": ["null", "string"]}, + "last_seen_by": { "type": ["null", "string"]}, + "recipient_view_url": { "type": ["null", "string"]}, + "invoicer_view_url": { "type": ["null", "string"]}, + "cancel_time": { "type": ["null", "string"], "format": "date-time" }, + "first_sent_time": { "type": ["null", "string"], "format": "date-time" }, + "last_sent_time": { "type": ["null", "string"], "format": "date-time" }, + "created_by_flow": { "type": ["null", "string"]} } } } }, + "last_update_time": { + "type": ["null", "string"], + "format": "date-time" + }, "invoicer": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": { "type": "string"}, + "business_name": { "type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} }, "phones": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "country_code": {"type": "string"}, - "national_number": {"type": "string"}, - "extension_number": {"type": "string"}, - "phone_type": {"type": "string"} + "country_code": {"type": ["null", "string"]}, + "national_number": {"type": ["null", "string"]}, + "extension_number": {"type": ["null", "string"]}, + "phone_type": {"type": ["null", "string"]} } } }, - "website": {"type": "string"}, - "tax_id": {"type": "string"}, - "additional_notes": {"type": "string"}, - "email_address": { "type": "string"} + "website": {"type": ["null", "string"]}, + "tax_id": {"type": ["null", "string"]}, + "additional_notes": {"type": ["null", "string"]}, + "email_address": { "type": ["null", "string"]} } } @@ -155,98 +159,98 @@ } }, "configuration": { - "type": "object", + "type": ["null", "object"], "properties": { - "tax_calculated_after_discount": {"type": "string"}, - "tax_inclusive": {"type": "string"}, - "allow_tip": {"type": "string"}, + "tax_calculated_after_discount": {"type": ["null", "string"]}, + "tax_inclusive": {"type": ["null", "string"]}, + "allow_tip": {"type": ["null", "string"]}, "partial_payment": { - "type": "object", + "type": ["null", "object"], "properties": { - "allow_partial_payment": {"type": "string"}, - "minimum_amount_due": {"type": "object"} + "allow_partial_payment": {"type": ["null", "string"]}, + "minimum_amount_due": {"type": ["null", "object"]} } }, - "template_id": {"type": "string"} + "template_id": {"type": ["null", "string"]} } }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"}, + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]}, "breakdown": { - "type": "object", + "type": ["null", "object"], "properties": { - "item_total": {"type": "object"}, - "discount": {"type": "object"}, - "tax_total": {"type": "object"}, - "shipping": {"type": "object"}, - "custom": {"type": "object"} + "item_total": {"type": ["null", "object"]}, + "discount": {"type": ["null", "object"]}, + "tax_total": {"type": ["null", "object"]}, + "shipping": {"type": ["null", "object"]}, + "custom": {"type": ["null", "object"]} } } } }, "due_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "gratuity": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "payments": { "transactions": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "payment_id": { "type": "string" }, - "note": { "type": "string" }, - "type": { "type": "string" }, - "payment_date":{ "type": "string", "format": "date-time" }, - "method": { "type": "string" }, + "payment_id": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "payment_date":{ "type": ["null", "string"], "format": "date-time" }, + "method": { "type": ["null", "string"] }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } }, "shipping_info": { - "type": "object", + "type": ["null", "object"], "properties": { - "business_name": {"type": "string"}, + "business_name": {"type": ["null", "string"]}, "name": { - "type": "object", + "type": ["null", "object"], "properties": { - "prefix": {"type": "string"}, - "given_name": {"type": "string"}, - "surname": {"type": "string"}, - "middle_name": {"type": "string"}, - "suffix": {"type": "string"}, - "alternate_full_name": {"type": "string"}, - "full_name": {"type": "string"} + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} } }, "address": { - "type": "object", + "type": ["null", "object"], "properties": { - "address_line_1": {"type": "string"}, - "address_line_2": {"type": "string"}, - "address_line_3": {"type": "string"}, - "admin_area_1": {"type": "string"}, - "admin_area_2": {"type": "string"}, - "admin_area_3": {"type": "string"}, - "postal_code": {"type": "string"}, - "country_code": {"type": "string"}, - "address_details": {"type": "object"} + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } } @@ -256,49 +260,49 @@ } }, "paid_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } }, "refunds": { "transactions": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "refund_id": { "type": "string" }, - "type": { "type": "string" }, - "refund_date":{ "type": "string", "format": "date-time" }, - "method": { "type": "string" }, + "refund_id": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "refund_date":{ "type": ["null", "string"], "format": "date-time" }, + "method": { "type": ["null", "string"] }, "amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } } } }, "refund_amount": { - "type": "object", + "type": ["null", "object"], "properties": { - "currency_code": {"type": "string"}, - "value": {"type": "string"} + "currency_code": {"type": ["null", "string"]}, + "value": {"type": ["null", "string"]} } } }, "links": { - "type": "array", + "type": ["null", "array"], "items": { - "type": "object", + "type": ["null", "object"], "properties": { - "href": { "type": "string", "format": "uri" }, - "rel": { "type": "string" }, - "method": { "type": "string" } + "href": { "type": ["null", "string"], "format": "uri" }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } From 22c4980be1d3383aa3765b94788cad183ac704c6 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 25 Jan 2024 19:42:39 -0600 Subject: [PATCH 13/36] New Stream - list disputes. Add data generator to test data. --- .../source-paypal-transaction/bin/invoices.py | 240 ++++++++++++++++++ .../bin/paypal_transaction_generator.py | 8 +- .../bin/product_catalog.py | 77 ++++++ .../integration_tests/configured_catalog.json | 11 + .../configured_catalog_list_disputes.json | 16 ++ .../source_paypal_transaction/manifest.yaml | 93 ++++--- .../schemas/list_disputes.json | 28 ++ 7 files changed, 437 insertions(+), 36 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py create mode 100755 airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py new file mode 100644 index 000000000000..4a096a0cdf94 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py @@ -0,0 +1,240 @@ +import requests +import random +import string +import base64 +import json +import argparse +from datetime import datetime, timedelta + +# Function to generate a random alphanumeric string +def generate_random_string(length=10): + return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + + +# Function to create a draft invoice +def create_draft_invoice(access_token, invoice_date, term_type, due_date): + url = "https://api-m.sandbox.paypal.com/v2/invoicing/invoices" + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} + data = { + # "detail": { + # "invoice_number": generate_random_string(8), + # "invoice_date": invoice_date, + # "payment_term": {"term_type": term_type, "due_date": due_date}, + # } + "detail": { + "invoice_number": generate_random_string(8), + "invoice_date": invoice_date, + "payment_term": {"term_type": term_type, "due_date": due_date}, + "currency_code": "USD", + "reference": "", + "note": "", + "terms_and_conditions": "", + "memo": "" + }, + "invoicer": { + "name": { + "given_name": "David", + "surname": "Larusso" + }, + "address": { + "address_line_1": "123 Townsend St", + "address_line_2": "Floor 6", + "admin_area_2": "San Francisco", + "admin_area_1": "CA", + "postal_code": "94107", + "country_code": "US" + }, + "phones": [ + { + "country_code": "001", + "national_number": "4085551234", + "phone_type": "MOBILE" + } + ], + "website": "www.example.com", + "tax_id": "XX-XXXXXXX", + "logo_url": "https://example.com/logo.png", + "additional_notes": "" + }, + "primary_recipients": [ + { + "billing_info": { + "name": { + "given_name": "Stephanie", + "surname": "Meyers" + }, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US" + }, + "email_address": "foobuyer@example.com", + "phones": [ + { + "country_code": "001", + "national_number": "4884551234", + "phone_type": "HOME" + } + ], + "additional_info_value": "add-info" + }, + "shipping_info": { + "name": { + "given_name": "Stephanie", + "surname": "Meyers" + }, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US" + } + } + } + ], + "items": [ + { + "name": "Yoga Mat", + "description": "Elastic mat to practice yoga.", + "quantity": "1", + "unit_amount": { + "currency_code": "USD", + "value": "50.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + }, + "discount": { + "percent": "5" + }, + "unit_of_measure": "QUANTITY" + }, + { + "name": "Yoga t-shirt", + "quantity": "1", + "unit_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + }, + "discount": { + "amount": { + "currency_code": "USD", + "value": "5.00" + } + }, + "unit_of_measure": "QUANTITY" + } + ], + "configuration": { + "partial_payment": { + "allow_partial_payment": True, + "minimum_amount_due": { + "currency_code": "USD", + "value": "20.00" + } + }, + "allow_tip": True, + "tax_calculated_after_discount": True, + "tax_inclusive": False + }, + "amount": { + "breakdown": { + "custom": { + "label": "Packing Charges", + "amount": { + "currency_code": "USD", + "value": "10.00" + } + }, + "shipping": { + "amount": { + "currency_code": "USD", + "value": "10.00" + }, + "tax": { + "name": "Sales Tax", + "percent": "7.25" + } + }, + "discount": { + "invoice_discount": { + "percent": "5" + } + } + } + } + + } + response = requests.post(url, headers=headers, json=data) + return response.json() + +# Function to send an existing draft invoice +def send_draft_invoice(access_token, invoice_id, subject, note, additional_recipients): + url = f"https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/send" + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} + data = { + "subject": subject, + "note": note, + "send_to_recipient": True, + "additional_recipients": additional_recipients, + "send_to_invoicer": False + } + response = requests.post(url, headers=headers, json=data) + return response.json() + +# Main function +def main(): + parser = argparse.ArgumentParser(description="PayPal Invoice Actions") + parser.add_argument("action", help="Action to perform: create_draft or send_draft") + parser.add_argument("--invoice_id", help="Invoice ID (required for send_draft)") + parser.add_argument("--subject", help="Subject for the invoice email") + parser.add_argument("--note", help="Note for the invoice email") + parser.add_argument("--additional_recipients", nargs='*', help="Additional recipients for the invoice email") + args = parser.parse_args() + + CREDS = read_json("../secrets/config.json") + + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + access_token = get_paypal_token(client_id, secret_id) + + if args.action == 'create_draft': + invoice_date = datetime.now().strftime('%Y-%m-%d') + term_type = "NET_30" + due_date = (datetime.now() + timedelta(days=30)).strftime('%Y-%m-%d') + result = create_draft_invoice(access_token, invoice_date, term_type, due_date) + print("Draft Invoice Created:", result) + elif args.action == 'send_draft': + if not args.invoice_id: + print("Invoice ID is required for sending a draft invoice.") + return + result = send_draft_invoice(access_token, args.invoice_id, args.subject, args.note, args.additional_recipients) + print("Draft Invoice Sent:", result) + else: + print("Invalid action specified") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index 8fa96fae513f..4d4fcfc554a1 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -6,7 +6,7 @@ # REQUIREMENTS: # 1. sudo apt-get install chromium-chromedriver # 2. pip install selenium -# 3. ../secrets/creds.json with buyers email/password and account client_id/secret +# 3. ../secrets/config.json with buyers email/password and account client_id/secret # HOW TO USE: # python paypal_transaction_generator.py - will generate 3 transactions by default @@ -95,7 +95,7 @@ def read_json(filepath): def get_api_token(): client_id = CREDS.get("client_id") - secret = CREDS.get("secret") + secret = CREDS.get("client_secret") token_refresh_endpoint = "https://api-m.sandbox.paypal.com/v1/oauth2/token" data = "grant_type=client_credentials" @@ -103,7 +103,7 @@ def get_api_token(): auth = (client_id, secret) response = requests.request(method="POST", url=token_refresh_endpoint, data=data, headers=headers, auth=auth) response_json = response.json() - # print(response_json) + print("RESPONSE -->",response_json) API_TOKEN = response_json["access_token"] return API_TOKEN @@ -187,7 +187,7 @@ def execute_payment(url): TOTAL_TRANSACTIONS = int(sys.argv[1]) if len(sys.argv) > 1 else 3 -CREDS = read_json("../secrets/creds.json") +CREDS = read_json("../secrets/config.json") headers = {"Authorization": f"Bearer {get_api_token()}", "Content-Type": "application/json"} driver = login() cookies_accepted = False diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py new file mode 100755 index 000000000000..547c8e497772 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -0,0 +1,77 @@ +# +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# python product_catalog.py +# NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized +# TODO: Generate N products in one run. + +import requests +import random +import string +import base64 +import json + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def generate_random_string(length=10): + """Generate a random string of fixed length.""" + letters = string.ascii_letters + return ''.join(random.choice(letters) for i in range(length)) + +def get_paypal_token(client_id, secret_id): + """Get a bearer token from PayPal.""" + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = { + "grant_type": "client_credentials" + } + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def create_paypal_product(access_token): + """Create a product in PayPal.""" + url = "https://api-m.sandbox.paypal.com/v1/catalogs/products" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {access_token}" + } + payload = { + "name": "Pines-T-Shirt-" + generate_random_string(5), + "type": "PHYSICAL", + "id": generate_random_string(10), + "description": "Cotton XL", + "category": "CLOTHING", + "image_url": "https://example.com/gallary/images/" + generate_random_string(10) + ".jpg", + "home_url": "https://example.com/catalog/" + generate_random_string(10) + ".jpg" + } + response = requests.post(url=url, json=payload, headers=headers) + return response.json() +# Replace with your actual client_id and secret_id from PayPal + +CREDS = read_json("../secrets/config.json") + +client_id = CREDS.get("client_id") +secret_id = CREDS.get("client_secret") + +# Get the access token +access_token = get_paypal_token(client_id, secret_id) +# Create a product using the access token + +product = create_paypal_product(access_token) +print(product) + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index 0f97791daf76..2ba8b065fb8c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -41,6 +41,17 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json new file mode 100644 index 000000000000..5e67c67494c9 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json @@ -0,0 +1,16 @@ +{ + "streams": [ + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 8f93f445d19b..0e0b562e6c13 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -163,7 +163,9 @@ definitions: $parameters: path: "v1/reporting/balances" - #Stream search Invoices + #Stream search Invoices + # Currently it does not support incremental sync as metadata does not contain last_update_date + # TODO: Review if this is only a sandbox problem search_invoices_stream: type: DeclarativeStream primary_key: id @@ -191,37 +193,10 @@ definitions: http_method: POST request_headers: Content-Type: application/json - transformations: - - type: AddFields - fields: - - path: - - last_update_time - value: "{{ format_datetime(record['detail']['metadata']['last_update_time'], '%Y-%m-%dT%H:%M:%SZ') }}" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: last_update_time - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_time_option: - type: RequestOption - field_name: creation_date_range.start - inject_into: body_json - end_time_option: - type: RequestOption - field_name: creation_date_range.end - inject_into: body_json - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S + request_body_json: + creation_date_range: + start: "{{ config['start_date'] }}" + end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -258,11 +233,65 @@ definitions: path: "v1/catalogs/products" field_path: products + #Stream List Disputes + list_disputes_stream: + type: DeclarativeStream + primary_key: dispute_id + name: "list_disputes" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: next_page_token + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 50 + requester: + $ref: "#/definitions/requester" + http_method: GET + request_parameters: + start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" + # incremental_sync: + # type: DatetimeBasedCursor + # cursor_field: update_time + # cursor_datetime_formats: + # - "%Y-%m-%dT%H:%M:%SZ" + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # start_datetime: + # type: MinMaxDatetime + # datetime: >- + # {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # start_time_option: + # type: RequestOption + # field_name: start_time + # inject_into: request_parameter + # end_datetime: + # type: MinMaxDatetime + # datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + # datetime_format: "%Y-%m-%dT%H:%M:%SZ" + # step: "P{{ config.get('time_window', 7) }}D" + # cursor_granularity: PT1S + $parameters: + path: "v1/customer/disputes" + field_path: items + streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/search_invoices_stream" - "#/definitions/products_stream" + - "#/definitions/list_disputes_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json new file mode 100644 index 000000000000..febfb55f7b58 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "dispute_id": { "type": ["null", "string"] }, + "create_time": { "type": "string", "format": "date-time" }, + "update_time": { "type": "string", "format": "date-time" }, + "status": { "type": ["null", "string"] }, + "reason": { "type": ["null", "string"] }, + "dispute_state": { "type": ["null", "string"] }, + "dispute_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "links": { + "type": ["null", "object"], + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "methid": {"type": ["null", "string"]} + } + } + } + } \ No newline at end of file From 85913ec5b2369fcef0058c0a7cac4a4d9c98468e Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 26 Jan 2024 19:14:16 -0600 Subject: [PATCH 14/36] Add new stream and substream - show product details. --- .../bin/product_catalog.py | 51 +++++- .../integration_tests/configured_catalog.json | 32 ++-- ... => configured_catalog_list_products.json} | 2 +- ...nfigured_catalog_show_product_details.json | 15 ++ .../source_paypal_transaction/manifest.yaml | 158 +++++++++++------- .../{products.json => list_products.json} | 0 .../schemas/show_product_details.json | 29 ++++ 7 files changed, 202 insertions(+), 85 deletions(-) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{configured_catalog_products.json => configured_catalog_list_products.json} (88%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json rename airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/{products.json => list_products.json} (100%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index 547c8e497772..66ac7df719e3 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -11,7 +11,8 @@ # } # HOW TO USE: -# python product_catalog.py +# To create a new product: python script_name.py --action create +#To update an existing product: python script_name.py --action update --product_id # NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized # TODO: Generate N products in one run. @@ -20,6 +21,7 @@ import string import base64 import json +import argparse def read_json(filepath): with open(filepath, "r") as f: @@ -61,17 +63,48 @@ def create_paypal_product(access_token): } response = requests.post(url=url, json=payload, headers=headers) return response.json() -# Replace with your actual client_id and secret_id from PayPal -CREDS = read_json("../secrets/config.json") +def update_paypal_product(access_token, product_id, updates): + """Update a product in PayPal.""" + url = f"https://api-m.sandbox.paypal.com/v1/catalogs/products/{product_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {access_token}" + } + response = requests.patch(url=url, json=updates, headers=headers) + if response.status_code == 204: + print(f"Update Successful. Response {response.status_code}. This succesful repsonse has no response body") + return None + else: + print(f"Error: {response.status_code}, {response.text}") + return None + +# Parse command line arguments +parser = argparse.ArgumentParser(description='Create or Update a PayPal Product.') +parser.add_argument('--action', choices=['create', 'update'], required=True, help='Action to perform: create or update') +parser.add_argument('--product_id', help='Product ID for update action') +args = parser.parse_args() + +# Common setup +CREDS = read_json("../secrets/config.json") client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") - -# Get the access token access_token = get_paypal_token(client_id, secret_id) -# Create a product using the access token - -product = create_paypal_product(access_token) -print(product) +# Perform action based on arguments +if args.action == 'create': + product = create_paypal_product(access_token) + print("Created product:", product) +elif args.action == 'update' and args.product_id: + updates = [ + { + "op": "replace", + "path": "/description", + "value": "Anothe rUpdate. Let's see if something changes or not" + } + ] + product = update_paypal_product(access_token, args.product_id, updates) + print("Updated product:", product) +else: + print("Invalid arguments") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index 2ba8b065fb8c..e041d4a5db1a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -23,24 +23,24 @@ }, { "stream": { - "name": "search_invoices", + "name": "list_products", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["last_update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", - "destination_sync_mode": "append" + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" }, { "stream": { - "name": "products", + "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": false, - "supported_sync_modes": ["full_refresh"] + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] }, - "sync_mode": "full_refresh", - "destination_sync_mode": "overwrite" + "sync_mode": "incremental", + "destination_sync_mode": "append" }, { "stream": { @@ -52,6 +52,16 @@ }, "sync_mode": "incremental", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json similarity index 88% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json index 39c22c39aaa1..2fc44b85cdb7 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_products.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_products.json @@ -2,7 +2,7 @@ "streams": [ { "stream": { - "name": "products", + "name": "list_products", "json_schema": {}, "source_defined_cursor": false, "supported_sync_modes": ["full_refresh"] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json new file mode 100644 index 000000000000..70244ebf32d3 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json @@ -0,0 +1,15 @@ +{ + "streams": [ + { + "stream": { + "name": "show_product_details", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 0e0b562e6c13..1b56cbc42782 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -162,50 +162,12 @@ definitions: inject_into: request_parameter $parameters: path: "v1/reporting/balances" - - #Stream search Invoices - # Currently it does not support incremental sync as metadata does not contain last_update_date - # TODO: Review if this is only a sandbox problem - search_invoices_stream: - type: DeclarativeStream - primary_key: id - name: "search_invoices" - retriever: - type: SimpleRetriever - record_selector: - $ref: "#/definitions/selector" - paginator: - type: DefaultPaginator - page_token_option: - type: RequestOption - inject_into: request_parameter - field_name: page - page_size_option: - inject_into: request_parameter - field_name: page_size - type: RequestOption - pagination_strategy: - type: PageIncrement - start_from_page: 1 - page_size: 20 - requester: - $ref: "#/definitions/requester" - http_method: POST - request_headers: - Content-Type: application/json - request_body_json: - creation_date_range: - start: "{{ config['start_date'] }}" - end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - $parameters: - field_path: items - path: "v2/invoicing/search-invoices" - #New Stream - products_stream: + #New Stream - List Product + list_products_stream: type: DeclarativeStream primary_key: id - name: "products" + name: "list_products" retriever: type: SimpleRetriever record_selector: @@ -233,6 +195,55 @@ definitions: path: "v1/catalogs/products" field_path: products + # New Stream - Show Product Details + show_product_details_stream: + type: DeclarativeStream + primary_key: id + name: "show_product_details" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: "/v1/catalogs/products/{{ stream_slice.product_id }}" + record_selector: + $ref: "#/definitions/selector" + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: NoPagination + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + partition_field: "product_id" + stream: + $ref: "#/definitions/list_products_stream" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: update_time + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + type: MinMaxDatetime + datetime: >- + {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S + transformations: + - type: AddFields + fields: + - path: + - product_id + value: "{{ stream_slice.product_id }}" + #Stream List Disputes list_disputes_stream: type: DeclarativeStream @@ -261,37 +272,56 @@ definitions: http_method: GET request_parameters: start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" - # incremental_sync: - # type: DatetimeBasedCursor - # cursor_field: update_time - # cursor_datetime_formats: - # - "%Y-%m-%dT%H:%M:%SZ" - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # start_datetime: - # type: MinMaxDatetime - # datetime: >- - # {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # start_time_option: - # type: RequestOption - # field_name: start_time - # inject_into: request_parameter - # end_datetime: - # type: MinMaxDatetime - # datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - # datetime_format: "%Y-%m-%dT%H:%M:%SZ" - # step: "P{{ config.get('time_window', 7) }}D" - # cursor_granularity: PT1S $parameters: path: "v1/customer/disputes" field_path: items +#Stream search Invoices + # Currently it does not support incremental sync as metadata does not contain last_update_date + # TODO: Review if this is only a sandbox problem + search_invoices_stream: + type: DeclarativeStream + primary_key: id + name: "search_invoices" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: page_size + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 20 + requester: + $ref: "#/definitions/requester" + http_method: POST + request_headers: + Content-Type: application/json + request_body_json: + creation_date_range: + start: "{{ config['start_date'] }}" + end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + $parameters: + field_path: items + path: "v2/invoicing/search-invoices" + + streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - - "#/definitions/search_invoices_stream" - - "#/definitions/products_stream" + - "#/definitions/list_products_stream" + - "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" + - "#/definitions/search_invoices_stream" spec: type: Spec diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/products.json rename to airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json new file mode 100644 index 000000000000..0316579b9b2d --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": {"type": ["null", "string"]}, + "name": {"type": ["null", "string"]}, + "description": {"type": ["null", "string"]}, + "type": {"type": ["null", "string"]}, + "category": {"type": ["null", "string"]}, + "image_url": {"type": ["null", "string"]}, + "home_url": {"type": ["null", "string"]}, + "create_time": {"type": ["null", "string"], "format": "date-time"}, + "update_time": {"type": ["null", "string"], "format": "date-time"}, + "links": { + "type": "array", + "items": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "href": {"type": ["null", "string"]}, + "rel": {"type": ["null", "string"]}, + "method": {"type": ["null", "string"]} + } + } + } + } +} + \ No newline at end of file From 42f713898de3b460d2a5dad4b43b5aecb6fc9671 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 31 Jan 2024 22:33:11 -0600 Subject: [PATCH 15/36] Add new streams. Add seeding to some tests. Change Metadata version. --- .../bin/payments_generator.py | 116 ++++++++++ .../bin/product_catalog.py | 2 +- .../integration_tests/configured_catalog.json | 11 + .../configured_catalog_list_payments.json | 15 ++ .../source-paypal-transaction/metadata.yaml | 2 +- .../source_paypal_transaction/components.py | 6 +- .../source_paypal_transaction/manifest.yaml | 142 ++++++++----- .../schemas/list_payments.json | 201 ++++++++++++++++++ 8 files changed, 436 insertions(+), 59 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py new file mode 100644 index 000000000000..ec540f075089 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -0,0 +1,116 @@ +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# To create a new payment: python script_name.py create +#To update an existing product: +# python script_name.py update PAYMENT_ID '[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "50.00", "currency": "USD"}}]' +# NOTE: This is version does not work for CREATE PAYMENT as the HEADER requires data I can't get + + +import requests +import json +import sys +import base64 + +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def create_payment(token, security_context): + """Create a PayPal payment.""" + url = "https://api-m.paypal.com/v1/payments/payment" + headers = { + "Content-Type": "application/json", + #"Authorization": f"Bearer {token}", + "X-PAYPAL-SECURITY-CONTEXT": security_context + } + payload = { + "intent": "sale", + "transactions": [{ + "amount": { + "total": "30.00", + "currency": "USD", + "details": { + "subtotal": "30.00" + } + }, + "description": "This is a test - Pines test.", + "item_list": { + "items": [{ + "name": "My item", + "sku": "123445667", + "price": "15.00", + "currency": "USD", + "quantity": 2 + }], + } + }], + "payer": { + "payment_method": "paypal" + }, + "redirect_urls": { + "return_url": "http://example.com/return", + "cancel_url": "http://example.com/cancel" + } + } + print("AQUIIIII") + response = requests.post(url, headers=headers, json=payload) + print("PASOOOOOOOO") + return response.json() + +def update_payment(token, payment_id, updates): + """Update a PayPal payment.""" + url = f"https://api-m.paypal.com/v1/payments/payment/{payment_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + response = requests.patch(url, headers=headers, json=updates) + return response.json() + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def main(): + + CREDS = read_json("../secrets/config.json") + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + token = get_paypal_token(client_id, secret_id) + #security_context = '{"actor":{"account_number":"MDXWPD67GEP5W","party_id":"1659371090107732880","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dmOUZMwuKocrqe72Zx9D-Lf4"},"auth_token":"A015QQVR4S3u79k.UvhQ-AP4EhQikqOogdx-wIbvcvZ7Qaw","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"2245934915437588879","party_id":"2245934915437588879","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' + + + if sys.argv[1] == 'create': + payment = create_payment(token, security_context) + print("Created Payment:", payment) + + elif sys.argv[1] == 'update': + payment_id = sys.argv[2] + updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument + update_response = update_payment(token, payment_id, updates) + print("Update Response:", update_response) + + else: + print("Invalid command. Use 'create' or 'update'.") + +if __name__ == "__main__": + main() + +#'[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "25000.00", "currency": "BTC"}}]' \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index 66ac7df719e3..811c85ef406e 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -100,7 +100,7 @@ def update_paypal_product(access_token, product_id, updates): { "op": "replace", "path": "/description", - "value": "Anothe rUpdate. Let's see if something changes or not" + "value": "My Update. Does it changes it?" } ] product = update_paypal_product(access_token, args.product_id, updates) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index e041d4a5db1a..f12617d2c1e4 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -62,6 +62,17 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" } ] } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json new file mode 100644 index 000000000000..5a688c56ed10 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json @@ -0,0 +1,15 @@ +{ + "streams": [ + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 24705a6a5436..ad1a7d8d4454 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -11,7 +11,7 @@ data: connectorSubtype: api connectorType: source definitionId: d913b0f2-cc51-4e55-a44c-8ba1697b9239 - dockerImageTag: 2.2.1 + dockerImageTag: 2.3.1 dockerRepository: airbyte/source-paypal-transaction documentationUrl: https://docs.airbyte.com/integrations/sources/paypal-transaction githubIssueLabel: source-paypal-transaction diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 3d811723f3e4..53255384da1c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -12,7 +12,8 @@ from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester from airbyte_cdk.sources.declarative.types import StreamState, StreamSlice -from typing import Any, MutableMapping, Optional, Mapping +from typing import Any, MutableMapping, Optional, Mapping, Iterable + logger = logging.getLogger("airbyte") @@ -75,5 +76,4 @@ def _get_refresh_access_token_response(self): raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e - - + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 1b56cbc42782..218e983cd7ed 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -41,7 +41,12 @@ definitions: backoff_time_in_seconds: 100 request_body_json: {} + #NOTE: The streams Payments, Orders and Subscriptions require a webhook so you can register + #the Ids of each event as these endpoints do not have a GET method to list the Ids and use it + #in other streams + #Stream Transactions + #Paypal API only has V1 for this stream transactions_stream: type: DeclarativeStream primary_key: transaction_id @@ -120,6 +125,7 @@ definitions: field_path: transaction_details #Stream balances + #Paypal API only has V1 for this stream balances_stream: type: DeclarativeStream primary_key: as_of_time @@ -164,6 +170,7 @@ definitions: path: "v1/reporting/balances" #New Stream - List Product + #Paypal API only has V1 for this stream list_products_stream: type: DeclarativeStream primary_key: id @@ -177,7 +184,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 10 + page_size: 20 page_token_option: type: RequestOption inject_into: request_parameter @@ -194,61 +201,16 @@ definitions: $parameters: path: "v1/catalogs/products" field_path: products - - # New Stream - Show Product Details - show_product_details_stream: - type: DeclarativeStream - primary_key: id - name: "show_product_details" - retriever: - type: SimpleRetriever - requester: - $ref: "#/definitions/requester" - path: "/v1/catalogs/products/{{ stream_slice.product_id }}" - record_selector: - $ref: "#/definitions/selector" - extractor: - type: DpathExtractor - field_path: [] - paginator: - type: NoPagination - partition_router: - type: SubstreamPartitionRouter - parent_stream_configs: - - type: ParentStreamConfig - parent_key: "id" - partition_field: "product_id" - stream: - $ref: "#/definitions/list_products_stream" - incremental_sync: - type: DatetimeBasedCursor - cursor_field: update_time - cursor_datetime_formats: - - "%Y-%m-%dT%H:%M:%SZ" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - start_datetime: - type: MinMaxDatetime - datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" - datetime_format: "%Y-%m-%dT%H:%M:%SZ" - step: "P{{ config.get('time_window', 7) }}D" - cursor_granularity: PT1S - transformations: - - type: AddFields - fields: - - path: - - product_id - value: "{{ stream_slice.product_id }}" - + #Stream List Disputes + #Paypal API only has V1 for this stream + #There is no way to create disputes via API, thus no incremental sync will be added to this stream + #until we have a testing account that allows us to create disputes over transactions. list_disputes_stream: type: DeclarativeStream primary_key: dispute_id name: "list_disputes" + retriever: type: SimpleRetriever record_selector: @@ -270,13 +232,15 @@ definitions: requester: $ref: "#/definitions/requester" http_method: GET - request_parameters: - start_time: "{{ stream_slice.get('update_time_after', config['start_date']) }}" + request_parameters: + #Searches for the optional parameter dispute_start_date. + #If present, it formats the date accordingly. Otherwise, it defaults to a start date set 180 days in the past." + start_time: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" $parameters: path: "v1/customer/disputes" field_path: items -#Stream search Invoices + #Stream Search Invoices # Currently it does not support incremental sync as metadata does not contain last_update_date # TODO: Review if this is only a sandbox problem search_invoices_stream: @@ -314,6 +278,62 @@ definitions: field_path: items path: "v2/invoicing/search-invoices" + #Stream List Payments + #Currently uses V1 which is about to be derecated + #But there is no endpoint in v2 for listing payments + list_payments_stream: + type: DeclarativeStream + primary_key: id + name: "list_payments" + retriever: + type: SimpleRetriever + record_selector: + $ref: "#/definitions/selector" + paginator: + type: DefaultPaginator + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.next_id}}" + stop_condition: "{{ response.next_id == ''}}" + page_size: 20 + page_token_option: + type: RequestOption + field_name: start_id + inject_into: request_parameter + page_size_option: + type: RequestOption + field_name: count + inject_into: request_parameter + requester: + $ref: "#/definitions/requester" + request_parameters: + start_time: "{{ stream_interval.start_time.strftime('%Y-%m-%dT%H:%M:%SZ') }}" + end_time: "{{ stream_interval.end_time.strftime('%Y-%m-%dT%H:%M:%SZ') }}" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: update_time + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_datetime: + #type: MinMaxDatetime + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: start_time + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: end_time + inject_into: request_parameter + step: "P1D" + cursor_granularity: PT1S + $parameters: + path: "v1/payments/payment" + field_path: payments streams: - "#/definitions/transactions_stream" @@ -322,6 +342,7 @@ streams: - "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" - "#/definitions/search_invoices_stream" + - "#/definitions/list_payments_stream" spec: type: Spec @@ -365,6 +386,19 @@ spec: description: "Determines whether to use the sandbox or production environment." type: "boolean" default: false + dispute_start_date: + title: Dispute Start Date Range + description: >- + Start Date parameter for the list dispute endpoint in ISO + format. This Start Date must be in range within 180 days before + present time, and requires ONLY 3 miliseconds(mandatory). + If you don't use this option, it defaults to a start date set 180 days in the past. + type: string + examples: ["2021-06-11T23:59:59.000Z"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ + format: "date-time" + order: 2 refresh_token: type: "string" title: "Refresh token" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json new file mode 100644 index 000000000000..bbfed47c59b5 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json @@ -0,0 +1,201 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "intent": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "cart": { "type": ["null", "string"] }, + "payer": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "payment_method": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, + "payer_info": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "email": { "type": ["null", "string"] }, + "first_name": { "type": ["null", "string"] }, + "last_name": { "type": ["null", "string"] }, + "payer_id": { "type": ["null", "string"] }, + "shipping_address": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "recipient_name": { "type": ["null", "string"] }, + "line1": { "type": ["null", "string"] }, + "city": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + }, + "phone": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + } + } + }, + "transactions": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "reference_id": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } + } + } + } + }, + "payee": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "merchant_id": { "type": ["null", "string"] }, + "email": { "type": ["null", "string"] } + } + }, + "description": { "type": ["null", "string"] }, + "item_list": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "items": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "price": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "tax": { "type": ["null", "string"] }, + "quantity": { "type": ["null", "integer"] }, + "image_url": { "type": ["null", "string"] } + } + } + }, + "shipping_address": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "recipient_name": { "type": ["null", "string"] }, + "line1": { "type": ["null", "string"] }, + "city": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + } + } + }, + "related_resources": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "sale": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } + } + } + } + }, + "payment_mode": { "type": ["null", "string"] }, + "protection_eligibility": { "type": ["null", "string"] }, + "protection_eligibility_type": { "type": ["null", "string"] }, + "transaction_fee": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "value": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] } + } + }, + "purchase_unit_reference_id": { "type": ["null", "string"] }, + "parent_payment": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } + } + } + } + } + } + } + } + } + } + } + }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } + } + } + } + } +} + \ No newline at end of file From 7c7ff7446b83bca2899e897fc0b6b95ede998e79 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Tue, 6 Feb 2024 22:23:08 -0600 Subject: [PATCH 16/36] Add tests. Organize and clean some code. Commented out show_product_details stream due performance concerns. --- .../source-paypal-transaction/CHANGELOG.md | 9 + .../acceptance-test-config.yml | 94 +++++++--- .../bin/disputes_generator.py | 89 ++++++++++ .../bin/payments_generator.py | 7 +- .../bin/paypal_transaction_generator.py | 58 ++++-- .../integration_tests/configured_catalog.json | 9 +- .../configured_catalog_list_disputes.json | 2 +- ...nfigured_catalog_show_product_details.json | 7 +- .../integration_tests/expected_records.jsonl | 1 - .../expected_records_sandbox.jsonl | 5 - .../full_refresh_catalog.json | 47 +++++ .../incremental_catalog.json | 47 +++++ .../invalid_config_oauth.json | 11 -- .../{ => sample_files}/abnormal_state.json | 22 +++ .../sample_files/expected_records.jsonl | 16 ++ .../expected_records_sandbox.jsonl | 85 +++++++++ .../{ => sample_files}/invalid_config.json | 0 .../{ => sample_files}/sample_config.json | 0 .../{ => sample_files}/sample_state.json | 0 .../{ => sample_files}/state.json | 0 .../source-paypal-transaction/setup.py | 4 +- .../source_paypal_transaction/components.py | 11 +- .../source_paypal_transaction/manifest.yaml | 165 ++++++++---------- .../schemas/list_disputes.json | 10 +- .../schemas/search_invoices.json | 114 +++++++----- .../source_paypal_transaction/source.py | 1 + .../source_paypal_transaction/spec.yaml | 65 +++++++ .../unit_tests/auth_components_test.py | 83 +++++++++ .../unit_tests/conftest.py | 46 ++++- 29 files changed, 793 insertions(+), 215 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/abnormal_state.json (50%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/invalid_config.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/sample_config.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/sample_state.json (100%) rename airbyte-integrations/connectors/source-paypal-transaction/integration_tests/{ => sample_files}/state.json (100%) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md index d84557504900..e421738b76c5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md @@ -2,3 +2,12 @@ ## 0.1.0 Source implementation with support of Transactions and Balances streams + +## 1.0.0 +Mark Client ID and Client Secret as required files + +## 2.1.0 +Migration to Low code + +## 2.3.1 +Adding New Streams - Payments, Disputes, Invoices, Product Catalog \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index c4ebc718cf3b..185a17f571af 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -1,69 +1,107 @@ # See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) # for more information about how to configure these tests +# Make sure the paths you have in each path matches with your data. connector_image: airbyte/source-paypal-transaction:dev test_strictness_level: high acceptance_tests: spec: tests: + #Test with Prod credentials (Make sure you purt the right ones) - spec_path: "source_paypal_transaction/spec.yaml" - config_path: secrets/config_oauth.json + config_path: secrets/config.json + backward_compatibility_tests_config: + disable_for_version: "0.1.13" + #Test With Sandbox Credentials + - spec_path: "source_paypal_transaction/spec.yaml" + config_path: secrets/config_sandbox.json backward_compatibility_tests_config: disable_for_version: "0.1.13" connection: tests: - - config_path: secrets/config_oauth.json + #Test With Prod Credentials + - config_path: secrets/config.json status: succeed - - config_path: secrets/config_oauth_sandbox.json - status: succeed - - config_path: integration_tests/invalid_config.json - status: failed - - config_path: integration_tests/invalid_config_oauth.json + #Test with Invalid Credentials + - config_path: integration_tests/sample_files/invalid_config.json status: failed + #Test with Sandbox Credentials + - config_path: secrets/config_sandbox.json + status: succeed discovery: tests: - - config_path: secrets/config_oauth.json + - config_path: secrets/config.json + backward_compatibility_tests_config: + disable_for_version: "2.0.0" # Change in cursor field for transactions stream + - config_path: secrets/config_sandbox.json backward_compatibility_tests_config: disable_for_version: "2.0.0" # Change in cursor field for transactions stream basic_read: tests: - - config_path: secrets/config_oauth.json - ignored_fields: - balances: - - name: last_refresh_time - bypass_reason: "field changes during every read" + #Test Prod Environment - Uncomment and change according to your prod setup + #Change the expected records, remember to align them with the timeframe you have selected + #Do not select streams that take more than 5 mins to load data as that can lead to timeouts + # - config_path: secrets/config.json + # empty_streams: + # - name: show_product_details + # bypass_reason: "Products may not exist" + # - name: list_products + # bypass_reason: "Product List may be too big causing timeout errors" + # - name: search_invoices + # bypass_reason: "Order makes the diff fail." + # ignored_fields: + # balances: + # - name: last_refresh_time + # bypass_reason: "field changes during every read" + # list_products: + # - name: description + # bypass_reason: "Sometimes it is not contained in the response" + # timeout_seconds: 3200 + # expect_records: + # path: "integration_tests/sample_files/expected_records.jsonl" + # extra_fields: yes + # exact_order: yes + # extra_records: no + # fail_on_extra_columns: False + ################## + ## Test Sandbox ## + - config_path: secrets/config_sandbox.json empty_streams: - - name: transactions - bypass_reason: "can not populate" - timeout_seconds: 1200 - expect_records: - path: "integration_tests/expected_records.jsonl" - extra_fields: no - exact_order: no - extra_records: yes - - config_path: secrets/config_oauth_sandbox.json + - name: show_product_details + bypass_reason: "Products may not exist" + - name: list_disputes + bypass_reason: "There may not be Disputes in the Sandbox" + - name: search_invoices + bypass_reason: "Retrieval Order makes the diff fail." ignored_fields: balances: - name: last_refresh_time bypass_reason: "field changes during every read" + list_products: + - name: description + bypass_reason: "Sometimes it is not contained in the response" timeout_seconds: 1200 expect_records: - path: "integration_tests/expected_records_sandbox.jsonl" + path: "integration_tests/sample_files/expected_records_sandbox.jsonl" extra_fields: no exact_order: no extra_records: yes fail_on_extra_columns: false incremental: tests: - - config_path: secrets/config_oauth.json - configured_catalog_path: integration_tests/configured_catalog.json + - config_path: secrets/config.json + configured_catalog_path: integration_tests/incremental_catalog.json future_state: - future_state_path: integration_tests/abnormal_state.json + future_state_path: integration_tests/sample_files/abnormal_state.json skip_comprehensive_incremental_tests: true full_refresh: tests: - - config_path: secrets/config_oauth.json + - config_path: secrets/config.json + configured_catalog_path: integration_tests/full_refresh_catalog.json ignored_fields: balances: - name: last_refresh_time bypass_reason: "field changes during every read" - configured_catalog_path: integration_tests/configured_catalog.json + list_products: + - name: description + bypass_reason: "Sometimes it is not contained in the response" + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py new file mode 100644 index 000000000000..f35460347d2f --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py @@ -0,0 +1,89 @@ +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } + +# HOW TO USE: +# To create a new payment: python script_name.py create +#To update an existing dispute: +# python disputes_generator.py update DISPUTE_ID ''[{"op": "replace", "path": "/reason", "value": "The new reason"}]' +#To update a dispute status +#python update_dispute.py require-evidence DISPUTE_ID SELLER_EVIDENCE + +import requests +import json +import sys +import base64 +# Function to get a PayPal OAuth token +def get_paypal_token(client_id, secret_id): + url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" + headers = { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + } + payload = {"grant_type": "client_credentials"} + response = requests.post(url=url, data=payload, headers=headers) + return response.json().get('access_token') + +def update_dispute(token, dispute_id, updates): + """Update a PayPal dispute.""" + url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + response = requests.patch(url, headers=headers, json=updates) + print("RESPONSE: ", response.text) + return response.json() + +def require_evidence(token, dispute_id, action): + """Require evidence for a PayPal dispute.""" + url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}/require-evidence" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + payload = { + "action": action + } + response = requests.post(url, headers=headers, json=payload) + print("RESPONSE: ", response.text) + return response.json() + +def read_json(filepath): + with open(filepath, "r") as f: + return json.loads(f.read()) + +def main(): + + operation = sys.argv[1] + + CREDS = read_json("../secrets/config.json") + client_id = CREDS.get("client_id") + secret_id = CREDS.get("client_secret") + token = get_paypal_token(client_id, secret_id) + + + if operation == 'update': + dispute_id = sys.argv[2] + updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument + update_response = update_dispute(token, dispute_id, updates) + print("Update Response:", update_response) + + elif sys.argv[1] == 'require-evidence': + dispute_id = sys.argv[2] + action = sys.argv[3] # Either 'BUYER_EVIDENCE' or 'SELLER_EVIDENCE' + evidence_response = require_evidence(token, dispute_id, action) + print("Evidence Requirement Response:", evidence_response) + else: + print("Invalid command. Use 'create', 'update', or 'require-evidence'.") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py index ec540f075089..9a7df324ccb5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -65,13 +65,12 @@ def create_payment(token, security_context): "payment_method": "paypal" }, "redirect_urls": { - "return_url": "http://example.com/return", - "cancel_url": "http://example.com/cancel" + "return_url": "https://example.com/return", + "cancel_url": "https://example.com/cancel" } } - print("AQUIIIII") + response = requests.post(url, headers=headers, json=payload) - print("PASOOOOOOOO") return response.json() def update_payment(token, payment_id, updates): diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index 4d4fcfc554a1..463f327e3da1 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -7,6 +7,17 @@ # 1. sudo apt-get install chromium-chromedriver # 2. pip install selenium # 3. ../secrets/config.json with buyers email/password and account client_id/secret +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true, +# "buyer_username": "", #This could be also your test Sandbox email generated by the system +# "buyer_password": "", #This could be also your test Sandbox pawd generated by the system +# "payer_id": "" # This is the Account ID, yours or your Sandbox generated user + +# } # HOW TO USE: # python paypal_transaction_generator.py - will generate 3 transactions by default @@ -142,15 +153,16 @@ def make_payment(): # APPROVE PAYMENT def login(): - driver = webdriver.Chrome("/usr/bin/chromedriver") + #driver = webdriver.Chrome("/usr/bin/chromedriver") + driver = webdriver.Chrome() # SIGN_IN driver.get("https://www.sandbox.paypal.com/ua/signin") - driver.find_element_by_id("email").send_keys(CREDS["buyer_username"]) - driver.find_element_by_id("btnNext").click() + driver.find_element(By.ID, "email").send_keys(CREDS["buyer_username"]) + driver.find_element(By.ID, "btnNext").click() sleep(2) - driver.find_element_by_id("password").send_keys(CREDS["buyer_password"]) - driver.find_element_by_id("btnLogin").click() + driver.find_element(By.ID, "password").send_keys(CREDS["buyer_password"]) + driver.find_element(By.ID, "btnLogin").click() return driver @@ -160,13 +172,21 @@ def approve_payment(driver, url): sleep(3) if not cookies_accepted: - cookies = driver.find_element_by_id("acceptAllButton") - if cookies: - cookies.click() + try: + cookies_button = WebDriverWait(driver, 10).until( + EC.element_to_be_clickable((By.ID, "acceptAllButton")) + ) + cookies_button.click() + cookies_accepted = True + except Exception as e: + print("Could not find the accept all cookies button, exception:", e) + # cookies = driver.find_element(By.ID, "acceptAllButton") + # if cookies: + # cookies.click() + + # cookies_accepted = True - cookies_accepted = True driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") - element = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ID, "payment-submit-btn"))) sleep(1) element.click() @@ -178,12 +198,20 @@ def approve_payment(driver, url): wait.until(EC.title_is("Example Domain")) print(f"Payment approved: {driver.current_url}") - def execute_payment(url): - response = requests.request(method="POST", url=url, data='{"payer_id": "ZE5533HZPGMC6"}', headers=headers) - response_json = response.json() - print(f'Payment executed: {url} with STATE: {response_json["state"]}') - + try: + # Attempt to make the POST request + response = requests.post(url, data=json.dumps({"payer_id": CREDS.get("payer_id")}), headers=headers) + response_json = response.json() + # Check if the request was successful + if response.status_code == 200: + print(f"Your payment has been successfully executed to {url} with STATE: {response_json['state']}") + else: + # If the response code is not 200, print the error message + print(f"Your payment execution was not successful. You got {response.status_code} with message {response.json().get('message', 'No message available')}.") + except requests.exceptions.RequestException as e: + # If an error occurs during the request, print the error + print(f"An error occurred: {e}") TOTAL_TRANSACTIONS = int(sys.argv[1]) if len(sys.argv) > 1 else 3 diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json index f12617d2c1e4..0c7e6869f3a9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog.json @@ -35,11 +35,10 @@ "stream": { "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", + "sync_mode": "full_refresh", "destination_sync_mode": "append" }, { @@ -47,7 +46,7 @@ "name": "list_disputes", "json_schema": {}, "source_defined_cursor": true, - "default_cursor_field": ["update_time"], + "default_cursor_field": ["update_time_cut"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json index 5e67c67494c9..b00142c4c708 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json @@ -5,7 +5,7 @@ "name": "list_disputes", "json_schema": {}, "source_defined_cursor": true, - "default_cursor_field": ["update_time"], + "default_cursor_field": ["update_time_cut"], "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json index 70244ebf32d3..556bfd63366a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_show_product_details.json @@ -4,11 +4,10 @@ "stream": { "name": "show_product_details", "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] }, - "sync_mode": "incremental", + "sync_mode": "full_refresh", "destination_sync_mode": "append" } ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl deleted file mode 100644 index 86cbdca7392b..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records.jsonl +++ /dev/null @@ -1 +0,0 @@ -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "0.00"}, "available_balance": {"currency_code": "USD", "value": "0.00"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "QJQSC8WXYCA2L", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T13:29:59Z"}, "emitted_at": 1695051482452} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl deleted file mode 100644 index 53317576465a..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/expected_records_sandbox.jsonl +++ /dev/null @@ -1,5 +0,0 @@ -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1694795587519} -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1694795587522} -{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1694795587524} -{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-03T00:00:00Z", "last_refresh_time": "2023-09-18T08:59:59Z"}, "emitted_at": 1695051579296} -{"stream": "products", "data": {"id": "1647236710", "name": "Blue M","description": "Blue M", "create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json new file mode 100644 index 000000000000..b50a9c88795a --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/full_refresh_catalog.json @@ -0,0 +1,47 @@ +{ + "streams": [ + { + "stream": { + "name": "transactions", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["transaction_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time_cut"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "search_invoices", + "json_schema": {}, + "source_defined_cursor": false, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json new file mode 100644 index 000000000000..4d75f9e3b060 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/incremental_catalog.json @@ -0,0 +1,47 @@ +{ + "streams": [ + { + "stream": { + "name": "transactions", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["transaction_updated_date"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "balances", + "json_schema": {}, + "default_cursor_field": ["as_of_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "list_disputes", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time_cut"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json deleted file mode 100644 index 771ae5dbac0a..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config_oauth.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "credentials": { - "auth_type": "oauth2.0", - "client_id": "AWA__", - "client_secret": "ENC__", - "refresh_token": "__" - }, - "start_date": "2021-07-03T00:00:00+00:00", - "end_date": "2021-07-04T23:59:59+00:00", - "is_sandbox": false -} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json similarity index 50% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json index dc44c707ad24..2465b3a531dc 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/abnormal_state.json @@ -20,5 +20,27 @@ "name": "transactions" } } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "update_time": "2033-06-09T00:00:00Z" + }, + "stream_descriptor": { + "name": "list_payments" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "updated_time_cut": "2033-06-09T00:00:00.000Z" + }, + "stream_descriptor": { + "name": "list_disputes" + } + } } ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl new file mode 100644 index 000000000000..dfc00c24767c --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records.jsonl @@ -0,0 +1,16 @@ +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "69B759611M2733128","transaction_event_code": "T1503","transaction_initiation_date": "2024-02-01T00:01:23+0000","transaction_updated_date": "2024-02-01T00:01:23+0000","transaction_amount": {"currency_code": "USD","value": "-60.75"},"transaction_status": "S","ending_balance": {"currency_code": "USD","value": "309800.06"},"available_balance": {"currency_code": "USD","value": "309800.06"},"protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695051482452} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "1N809273356042704","transaction_event_code": "T0001","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "-10.00"},"fee_amount": {"currency_code": "USD","value": "-0.25"},"transaction_status": "P","transaction_subject": "You have a payout!","transaction_note": "Thanks for your patronage!","ending_balance": {"currency_code": "USD","value": "309789.81"},"available_balance": {"currency_code": "USD","value": "309789.81"},"custom_field": "201403140001","protection_eligibility": "02"},"payer_info": {"email_address": "Alexa.Dietrich@gmail.com","address_status": "N","payer_name": {}},"shipping_info": {"name": "John, Merchant"},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695052482453} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "70B03706PU258313Y","paypal_reference_id": "1N809273356042704","paypal_reference_id_type": "TXN","transaction_event_code": "T1105","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "10.25"},"transaction_status": "S","transaction_subject": "You have a payout!","transaction_note": "Thanks for your patronage!","ending_balance": {"currency_code": "USD","value": "309800.06"},"available_balance": {"currency_code": "USD","value": "309800.06"},"protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695053482454} +{"stream": "transactions", "data": {"transaction_info": {"transaction_id": "60D327402F0012324","transaction_event_code": "T0001","transaction_initiation_date": "2024-02-01T00:01:24+0000","transaction_updated_date": "2024-02-01T00:01:24+0000","transaction_amount": {"currency_code": "USD","value": "-20.00"},"fee_amount": {"currency_code": "USD","value": "-0.25"},"transaction_status": "P","transaction_subject": "You have a payout!","transaction_note": "Thanks for your support!","ending_balance": {"currency_code": "USD","value": "309779.81"},"available_balance": {"currency_code": "USD","value": "309779.81"},"custom_field": "201403140002","protection_eligibility": "02"},"payer_info": {"address_status": "N","payer_name": {}},"shipping_info": {"name": "John, Merchant"},"cart_info": {},"store_info": {},"auction_info": {},"incentive_info": {}}, "emitted_at": 1695054482455} +{"stream": "balances", "data": {"balances":[{"currency":"CHF","total_balance":{"currency_code":"CHF","value":"1001.19"},"available_balance":{"currency_code":"CHF","value":"1001.19"},"withheld_balance":{"currency_code":"CHF","value":"0.00"}},{"currency":"HKD","total_balance":{"currency_code":"HKD","value":"10833.47"},"available_balance":{"currency_code":"HKD","value":"10833.47"},"withheld_balance":{"currency_code":"HKD","value":"0.00"}},{"currency":"TWD","total_balance":{"currency_code":"TWD","value":"6289.00"},"available_balance":{"currency_code":"TWD","value":"6289.00"},"withheld_balance":{"currency_code":"TWD","value":"0.00"}},{"currency":"MXN","total_balance":{"currency_code":"MXN","value":"3827706.05"},"available_balance":{"currency_code":"MXN","value":"3827706.05"},"withheld_balance":{"currency_code":"MXN","value":"0.00"}},{"currency":"EUR","total_balance":{"currency_code":"EUR","value":"418736.68"},"available_balance":{"currency_code":"EUR","value":"418736.68"},"withheld_balance":{"currency_code":"EUR","value":"0.00"}},{"currency":"USD","primary":true,"total_balance":{"currency_code":"USD","value":"309860.81"},"available_balance":{"currency_code":"USD","value":"309860.81"},"withheld_balance":{"currency_code":"USD","value":"0.00"}},{"currency":"CAD","total_balance":{"currency_code":"CAD","value":"1158.92"},"available_balance":{"currency_code":"CAD","value":"1158.92"},"withheld_balance":{"currency_code":"CAD","value":"0.00"}},{"currency":"NOK","total_balance":{"currency_code":"NOK","value":"0.85"},"available_balance":{"currency_code":"NOK","value":"0.85"},"withheld_balance":{"currency_code":"NOK","value":"0.00"}},{"currency":"THB","total_balance":{"currency_code":"THB","value":"96658.02"},"available_balance":{"currency_code":"THB","value":"96658.02"},"withheld_balance":{"currency_code":"THB","value":"0.00"}},{"currency":"AUD","total_balance":{"currency_code":"AUD","value":"2405.19"},"available_balance":{"currency_code":"AUD","value":"2405.19"},"withheld_balance":{"currency_code":"AUD","value":"0.00"}},{"currency":"ILS","total_balance":{"currency_code":"ILS","value":"0.00"},"available_balance":{"currency_code":"ILS","value":"0.00"},"withheld_balance":{"currency_code":"ILS","value":"0.00"}},{"currency":"SGD","total_balance":{"currency_code":"SGD","value":"5841.51"},"available_balance":{"currency_code":"SGD","value":"5841.51"},"withheld_balance":{"currency_code":"SGD","value":"0.00"}},{"currency":"JPY","total_balance":{"currency_code":"JPY","value":"45608"},"available_balance":{"currency_code":"JPY","value":"45608"},"withheld_balance":{"currency_code":"JPY","value":"0"}},{"currency":"PLN","total_balance":{"currency_code":"PLN","value":"621.42"},"available_balance":{"currency_code":"PLN","value":"621.42"},"withheld_balance":{"currency_code":"PLN","value":"0.00"}},{"currency":"GBP","total_balance":{"currency_code":"GBP","value":"671250.65"},"available_balance":{"currency_code":"GBP","value":"671250.65"},"withheld_balance":{"currency_code":"GBP","value":"0.00"}},{"currency":"HUF","total_balance":{"currency_code":"HUF","value":"0.00"},"available_balance":{"currency_code":"HUF","value":"0.00"},"withheld_balance":{"currency_code":"HUF","value":"0.00"}},{"currency":"SEK","total_balance":{"currency_code":"SEK","value":"90.92"},"available_balance":{"currency_code":"SEK","value":"90.92"},"withheld_balance":{"currency_code":"SEK","value":"0.00"}},{"currency":"NZD","total_balance":{"currency_code":"NZD","value":"813.27"},"available_balance":{"currency_code":"NZD","value":"813.27"},"withheld_balance":{"currency_code":"NZD","value":"0.00"}},{"currency":"PHP","total_balance":{"currency_code":"PHP","value":"291489.92"},"available_balance":{"currency_code":"PHP","value":"291489.92"},"withheld_balance":{"currency_code":"PHP","value":"0.00"}},{"currency":"BRL","total_balance":{"currency_code":"BRL","value":"0.00"},"available_balance":{"currency_code":"BRL","value":"0.00"},"withheld_balance":{"currency_code":"BRL","value":"0.00"}},{"currency":"RUB","total_balance":{"currency_code":"RUB","value":"274.53"},"available_balance":{"currency_code":"RUB","value":"274.53"},"withheld_balance":{"currency_code":"RUB","value":"0.00"}}],"account_id":"C7CYMKZDG8D6E","as_of_time":"2024-02-01T00:00:00Z","last_refresh_time":"2024-02-05T17:59:59Z"}, "emitted_at": 1695051579296} +{"stream": "list_disputes", "data": {"dispute_id":"PP-R-PNP-10089600","create_time":"2024-01-26T15:31:02.000Z","update_time":"2024-02-04T12:06:03.000Z","disputed_transactions":[{"buyer_transaction_id":"5CW48839XK1160452","seller":{"merchant_id":"C7CYMKZDG8D6E"}}],"reason":"MERCHANDISE_OR_SERVICE_NOT_RECEIVED","status":"RESOLVED","dispute_state":"RESOLVED","dispute_amount":{"currency_code":"USD","value":"40.00"},"dispute_life_cycle_stage":"INQUIRY","dispute_channel":"INTERNAL","outcome":"LOST","links":[{"href":"https://api-m.sandbox.paypal.com/v1/customer/disputes/PP-R-PNP-10089600","rel":"self","method":"GET"}]}, "emitted_at": 1695051579296} +{"stream": "list_products", "data": {"id": "1647236710","name": "Blue M","description": "Blue M","create_time": "2022-03-14T05:45:06Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236710","rel": "self","method": "GET"}]}, "emitted_at": 1695051579296} +{"stream": "list_products", "data": {"id": "1647236727","name": "Licenza Oro","create_time": "2022-03-14T05:45:23Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647236727","rel": "self","method": "GET"}]}, "emitted_at": 1695051579396} +{"stream": "list_products", "data": {"id": "1647285840","name": "Licenza Premium","create_time": "2022-03-14T19:24:00Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647285840","rel": "self","method": "GET"}]}, "emitted_at": 1695051579496} +{"stream": "list_products", "data": {"id": "1647288288","name": "T-Shirt","description": "Blue M","create_time": "2022-03-14T20:04:47Z","links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/1647288288","rel": "self","method": "GET"}]}, "emitted_at": 1695051579596} +{"stream": "search_invoices", "data": {"id":"INV2-BGPS-PKE7-6XSD-YWC7","status":"DRAFT","detail":{"currency_code":"USD","invoice_number":"1706813643331","invoice_date":"2023-12-14","viewed_by_recipient":false,"group_draft":false,"metadata":{"create_time":"2024-02-01T18:54:03Z"}},"primary_recipients":[{"billing_info":{"name":{"given_name":"Shehroz","surname":"Asmat","full_name":"Shehroz Asmat"},"email_address":"sasmat@trythunderbird.com"}}],"amount":{"currency_code":"USD","value":"50.00"},"due_amount":{"currency_code":"USD","value":"50.00"},"links":[{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7/send","rel":"send","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"replace","method":"PUT"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7","rel":"delete","method":"DELETE"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-BGPS-PKE7-6XSD-YWC7/payments","rel":"record-payment","method":"POST"}],"unilateral":false}, "emitted_at": 1695051679296} +{"stream": "search_invoices", "data": {"id":"INV2-6GP9-WLLD-6Q7K-ZYQ2","status":"DRAFT","detail":{"reference":"","currency_code":"USD","note":"","memo":"","invoice_number":"0042","invoice_date":"2022-02-04","payment_term":{"due_date":"2022-02-14"},"viewed_by_recipient":false,"group_draft":false,"metadata":{"create_time":"2024-02-01T11:01:58Z"}},"primary_recipients":[{"billing_info":{"name":{"given_name":"Stephanie","surname":"Meyers","full_name":"Stephanie Meyers"},"email_address":"sb-yww0b28455377@personal.example.com"},"shipping_info":{"name":{"given_name":"Stephanie","surname":"Meyers","full_name":"Stephanie Meyers"}}}],"amount":{"currency_code":"USD","value":"74.21"},"due_amount":{"currency_code":"USD","value":"74.21"},"links":[{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2/send","rel":"send","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"replace","method":"PUT"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2","rel":"delete","method":"DELETE"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-6GP9-WLLD-6Q7K-ZYQ2/payments","rel":"record-payment","method":"POST"}],"unilateral":false}, "emitted_at": 1695051779296} +{"stream": "list_payments", "data": {"id":"PAYID-MW55RCA31D103955T218492B","intent":"sale","state":"approved","cart":"06J27273EH485262V","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"sb-vxpcr15413769@personal.example.com","first_name":"John","last_name":"Doe","payer_id":"TWL7BJVYNS7GU","shipping_address":{"recipient_name":"John Doe","line1":"1 Main St","city":"San Jose","state":"CA","postal_code":"95131","country_code":"US"},"phone":"4083068029","country_code":"US"}},"transactions":[{"reference_id":"1000000000047","amount":{"total":"343.80","currency":"USD","details":{"subtotal":"343.80","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E","email":"john_merchant@example.com"},"item_list":{"shipping_address":{"recipient_name":"John Doe","line1":"1 Main St","city":"San Jose","state":"CA","postal_code":"95131","country_code":"US"}},"related_resources":[{"sale":{"id":"7PE037460E080360M","state":"completed","amount":{"total":"343.80","currency":"USD","details":{"subtotal":"343.80","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","transaction_fee":{"value":"12.49","currency":"USD"},"purchase_unit_reference_id":"1000000000047","parent_payment":"PAYID-MW55RCA31D103955T218492B","create_time":"2024-02-01T17:44:40Z","update_time":"2024-02-01T17:44:40Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T17:44:40Z","update_time":"2024-02-01T17:44:40Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B","rel":"self","method":"GET"}]}, "emitted_at": 1695051779296} +{"stream": "list_payments", "data": {"id":"PAYID-MW53UPA6UB45753B0034831X","intent":"sale","state":"approved","cart":"9A220393SG7753433","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"sb-g43l4x28821325@personal.example.com","first_name":"John","last_name":"Doe","payer_id":"889X39VDHV8QY","shipping_address":{"recipient_name":"John Doe","line1":"Via Unit? d'Italia, 5783296","city":"Napoli","state":"Napoli","postal_code":"80127","country_code":"IT"},"phone":"9393358454","country_code":"IT"}},"transactions":[{"reference_id":"default","amount":{"total":"100.00","currency":"USD","details":{"subtotal":"100.00","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E","email":"john_merchant@example.com"},"description":"T-Shirt","item_list":{"items":[{"name":"T-Shirt","description":"Green XL","price":"100.00","currency":"USD","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"John Doe","line1":"Via Unit? d'Italia, 5783296","city":"Napoli","state":"Napoli","postal_code":"80127","country_code":"IT"}},"related_resources":[{"sale":{"id":"29N28023XB153584X","state":"completed","amount":{"total":"100.00","currency":"USD","details":{"subtotal":"100.00","shipping":"0.00","insurance":"0.00","handling_fee":"0.00","shipping_discount":"0.00","discount":"0.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","transaction_fee":{"value":"5.48","currency":"USD"},"receivable_amount":{"value":"100.00","currency":"USD"},"exchange_rate":"1.098848913950027","purchase_unit_reference_id":"default","parent_payment":"PAYID-MW53UPA6UB45753B0034831X","create_time":"2024-02-01T15:35:25Z","update_time":"2024-02-01T15:35:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T15:35:24Z","update_time":"2024-02-01T15:35:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X","rel":"self","method":"GET"}]}, "emitted_at": 1695061579296} +{"stream": "list_payments", "data": {"id":"PAY-81S181868H8011217MW526OI","intent":"authorize","state":"approved","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"mihai.streza1@mi-pay.com","first_name":"Mihai","last_name":"Streza","payer_id":"QHD3E8SRDDSQL","shipping_address":{"recipient_name":"Mihai Streza"},"phone":"07534201211","country_code":"GB"}},"transactions":[{"amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E"},"description":"topup","invoice_number":"100000000188917","soft_descriptor":"PAYPAL *JOHNMERCHAN","item_list":{"items":[{"name":"topup","price":"20.00","currency":"EUR","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"Mihai Streza"}},"related_resources":[{"authorization":{"id":"05D21713M12255848","state":"captured","amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","billing_agreement_id":"B-2B029484VC167663Y","parent_payment":"PAY-81S181868H8011217MW526OI","valid_until":"2024-03-01T14:48:26Z","create_time":"2024-02-01T14:48:26Z","update_time":"2024-02-01T14:48:30Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/capture","rel":"capture","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/void","rel":"void","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/reauthorize","rel":"reauthorize","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"parent_payment","method":"GET"}]}},{"capture":{"id":"546282867R0022639","amount":{"total":"20.00","currency":"EUR"},"state":"completed","custom":"","transaction_fee":{"value":"1.39","currency":"EUR"},"parent_payment":"PAY-81S181868H8011217MW526OI","invoice_number":"100000000188917","create_time":"2024-02-01T14:48:30Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848","rel":"authorization","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T14:48:25Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI","rel":"self","method":"GET"}]}, "emitted_at": 1695071579296} +{"stream": "list_payments", "data": {"id":"PAY-0L38757939422510JMW5ZJVA","intent":"authorize","state":"approved","payer":{"payment_method":"paypal","status":"VERIFIED","payer_info":{"email":"mihai.streza1@mi-pay.com","first_name":"Mihai","last_name":"Streza","payer_id":"QHD3E8SRDDSQL","shipping_address":{"recipient_name":"Mihai Streza"},"phone":"07534201211","country_code":"GB"}},"transactions":[{"amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payee":{"merchant_id":"C7CYMKZDG8D6E"},"description":"topup","invoice_number":"100000000188897","soft_descriptor":"PAYPAL *JOHNMERCHAN","item_list":{"items":[{"name":"topup","price":"20.00","currency":"EUR","tax":"0.00","quantity":1}],"shipping_address":{"recipient_name":"Mihai Streza"}},"related_resources":[{"authorization":{"id":"3S025738SW168153S","state":"captured","amount":{"total":"20.00","currency":"EUR","details":{"subtotal":"20.00"}},"payment_mode":"INSTANT_TRANSFER","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","billing_agreement_id":"B-42217126VD515152H","parent_payment":"PAY-0L38757939422510JMW5ZJVA","valid_until":"2024-03-01T12:55:48Z","create_time":"2024-02-01T12:55:48Z","update_time":"2024-02-01T12:55:51Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/capture","rel":"capture","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/void","rel":"void","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/reauthorize","rel":"reauthorize","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"parent_payment","method":"GET"}]}},{"capture":{"id":"26U95072LD470800B","amount":{"total":"20.00","currency":"EUR"},"state":"completed","custom":"","transaction_fee":{"value":"1.39","currency":"EUR"},"parent_payment":"PAY-0L38757939422510JMW5ZJVA","invoice_number":"100000000188897","create_time":"2024-02-01T12:55:51Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S","rel":"authorization","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"parent_payment","method":"GET"}]}}]}],"create_time":"2024-02-01T12:55:48Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA","rel":"self","method":"GET"}]}, "emitted_at": 1695081579296} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl new file mode 100644 index 000000000000..74d573c4ee73 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/expected_records_sandbox.jsonl @@ -0,0 +1,85 @@ +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "23N61105X92314351", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-04T17:13:23+0000", "transaction_updated_date": "2021-07-04T17:13:23+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "202.58"}, "available_balance": {"currency_code": "USD", "value": "202.58"}, "invoice_id": "48787580055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "48787580055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "48787580055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-04T17:13:23Z", "transaction_id": "23N61105X92314351"}, "emitted_at": 1707238889137} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1FN09943JY662130R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T22:56:54+0000", "transaction_updated_date": "2021-07-05T22:56:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "231.52"}, "available_balance": {"currency_code": "USD", "value": "231.52"}, "invoice_id": "65095789448", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "65095789448"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "65095789448"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T22:56:54Z", "transaction_id": "1FN09943JY662130R"}, "emitted_at": 1707238889139} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0M443597T0019954R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:01:13+0000", "transaction_updated_date": "2021-07-05T23:01:13+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "260.46"}, "available_balance": {"currency_code": "USD", "value": "260.46"}, "invoice_id": "41468340464", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "41468340464"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "41468340464"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:01:13Z", "transaction_id": "0M443597T0019954R"}, "emitted_at": 1707238889142} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "19C257131E850262B", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:02:46+0000", "transaction_updated_date": "2021-07-05T23:02:46+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "289.40"}, "available_balance": {"currency_code": "USD", "value": "289.40"}, "invoice_id": "23749371955", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "23749371955"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "23749371955"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:02:46Z", "transaction_id": "19C257131E850262B"}, "emitted_at": 1707238889144} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "6S892278N6406494Y", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:06:12+0000", "transaction_updated_date": "2021-07-05T23:06:12+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "318.34"}, "available_balance": {"currency_code": "USD", "value": "318.34"}, "invoice_id": "62173333941", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "62173333941"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "62173333941"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:06:12Z", "transaction_id": "6S892278N6406494Y"}, "emitted_at": 1707238889146} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0T320567TS5587836", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:09:04+0000", "transaction_updated_date": "2021-07-05T23:09:04+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "347.28"}, "available_balance": {"currency_code": "USD", "value": "347.28"}, "invoice_id": "56028534885", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "56028534885"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "56028534885"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:09:04Z", "transaction_id": "0T320567TS5587836"}, "emitted_at": 1707238889148} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3DF69605L9958744R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:12:40+0000", "transaction_updated_date": "2021-07-05T23:12:40+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "376.22"}, "available_balance": {"currency_code": "USD", "value": "376.22"}, "invoice_id": "31766547902", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "31766547902"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "31766547902"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:12:40Z", "transaction_id": "3DF69605L9958744R"}, "emitted_at": 1707238889150} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2F535603PS249601F", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:12:57+0000", "transaction_updated_date": "2021-07-05T23:12:57+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "405.16"}, "available_balance": {"currency_code": "USD", "value": "405.16"}, "invoice_id": "32577611997", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "32577611997"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "32577611997"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:12:57Z", "transaction_id": "2F535603PS249601F"}, "emitted_at": 1707238889153} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "243514451L952570P", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:02+0000", "transaction_updated_date": "2021-07-05T23:14:02+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "434.10"}, "available_balance": {"currency_code": "USD", "value": "434.10"}, "invoice_id": "23612058730", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "23612058730"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "23612058730"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:02Z", "transaction_id": "243514451L952570P"}, "emitted_at": 1707238889155} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "27881589Y9461861H", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:19+0000", "transaction_updated_date": "2021-07-05T23:14:19+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "463.04"}, "available_balance": {"currency_code": "USD", "value": "463.04"}, "invoice_id": "53296156982", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "53296156982"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "53296156982"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:19Z", "transaction_id": "27881589Y9461861H"}, "emitted_at": 1707238889157} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3MG39755337297727", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:36+0000", "transaction_updated_date": "2021-07-05T23:14:36+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "491.98"}, "available_balance": {"currency_code": "USD", "value": "491.98"}, "invoice_id": "53235397043", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "53235397043"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "53235397043"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:36Z", "transaction_id": "3MG39755337297727"}, "emitted_at": 1707238889159} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "32J59182JY5989507", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:14:52+0000", "transaction_updated_date": "2021-07-05T23:14:52+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "520.92"}, "available_balance": {"currency_code": "USD", "value": "520.92"}, "invoice_id": "18208641465", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "18208641465"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "18208641465"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:14:52Z", "transaction_id": "32J59182JY5989507"}, "emitted_at": 1707238889161} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "52795774C7828234R", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:09+0000", "transaction_updated_date": "2021-07-05T23:15:09+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "549.86"}, "available_balance": {"currency_code": "USD", "value": "549.86"}, "invoice_id": "32274344746", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "32274344746"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "32274344746"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:09Z", "transaction_id": "52795774C7828234R"}, "emitted_at": 1707238889163} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "19B82038T92822940", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:26+0000", "transaction_updated_date": "2021-07-05T23:15:26+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "578.80"}, "available_balance": {"currency_code": "USD", "value": "578.80"}, "invoice_id": "36419288277", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "36419288277"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "36419288277"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:26Z", "transaction_id": "19B82038T92822940"}, "emitted_at": 1707238889166} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "61G749036D552760G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:42+0000", "transaction_updated_date": "2021-07-05T23:15:42+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "607.74"}, "available_balance": {"currency_code": "USD", "value": "607.74"}, "invoice_id": "88092228645", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "88092228645"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "88092228645"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:42Z", "transaction_id": "61G749036D552760G"}, "emitted_at": 1707238889168} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5EL311302L108363J", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:15:58+0000", "transaction_updated_date": "2021-07-05T23:15:58+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "636.68"}, "available_balance": {"currency_code": "USD", "value": "636.68"}, "invoice_id": "25494061224", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "25494061224"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "25494061224"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:15:58Z", "transaction_id": "5EL311302L108363J"}, "emitted_at": 1707238889170} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3VP82838NP358133N", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:16:15+0000", "transaction_updated_date": "2021-07-05T23:16:15+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "665.62"}, "available_balance": {"currency_code": "USD", "value": "665.62"}, "invoice_id": "82173600275", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "82173600275"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "82173600275"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:16:15Z", "transaction_id": "3VP82838NP358133N"}, "emitted_at": 1707238889172} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2N796839EY2539153", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:16:32+0000", "transaction_updated_date": "2021-07-05T23:16:32+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "694.56"}, "available_balance": {"currency_code": "USD", "value": "694.56"}, "invoice_id": "10442581967", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "10442581967"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "10442581967"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:16:32Z", "transaction_id": "2N796839EY2539153"}, "emitted_at": 1707238889174} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5WX252723D093564T", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:29+0000", "transaction_updated_date": "2021-07-05T23:23:29+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "723.50"}, "available_balance": {"currency_code": "USD", "value": "723.50"}, "invoice_id": "71987080514", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71987080514"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71987080514"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:29Z", "transaction_id": "5WX252723D093564T"}, "emitted_at": 1707238889176} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "4PW76195NN227720S", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:40+0000", "transaction_updated_date": "2021-07-05T23:23:40+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "752.44"}, "available_balance": {"currency_code": "USD", "value": "752.44"}, "invoice_id": "93025400757", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "93025400757"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "93025400757"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:40Z", "transaction_id": "4PW76195NN227720S"}, "emitted_at": 1707238889178} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0VE851712U5895412", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:23:51+0000", "transaction_updated_date": "2021-07-05T23:23:51+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "781.38"}, "available_balance": {"currency_code": "USD", "value": "781.38"}, "invoice_id": "46225965444", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "46225965444"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "46225965444"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:23:51Z", "transaction_id": "0VE851712U5895412"}, "emitted_at": 1707238889180} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "63U003588S1135607", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:26+0000", "transaction_updated_date": "2021-07-05T23:29:26+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "810.32"}, "available_balance": {"currency_code": "USD", "value": "810.32"}, "invoice_id": "34635559567", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "34635559567"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "34635559567"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:26Z", "transaction_id": "63U003588S1135607"}, "emitted_at": 1707238889182} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2AJ081444T051123A", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:37+0000", "transaction_updated_date": "2021-07-05T23:29:37+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "839.26"}, "available_balance": {"currency_code": "USD", "value": "839.26"}, "invoice_id": "92544485996", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "92544485996"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "92544485996"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:37Z", "transaction_id": "2AJ081444T051123A"}, "emitted_at": 1707238889184} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "2KU13114TJ604181E", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:29:48+0000", "transaction_updated_date": "2021-07-05T23:29:48+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "868.20"}, "available_balance": {"currency_code": "USD", "value": "868.20"}, "invoice_id": "10184574713", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "10184574713"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "10184574713"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:29:48Z", "transaction_id": "2KU13114TJ604181E"}, "emitted_at": 1707238889186} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "1ST090036H2235215", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:35+0000", "transaction_updated_date": "2021-07-05T23:31:35+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "897.14"}, "available_balance": {"currency_code": "USD", "value": "897.14"}, "invoice_id": "50350860865", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "50350860865"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "50350860865"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:35Z", "transaction_id": "1ST090036H2235215"}, "emitted_at": 1707238889188} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5BJ418934Y425901G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:46+0000", "transaction_updated_date": "2021-07-05T23:31:46+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "926.08"}, "available_balance": {"currency_code": "USD", "value": "926.08"}, "invoice_id": "12278283055", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "12278283055"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "12278283055"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:46Z", "transaction_id": "5BJ418934Y425901G"}, "emitted_at": 1707238889190} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0SD21997LN026020M", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:31:56+0000", "transaction_updated_date": "2021-07-05T23:31:56+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "955.02"}, "available_balance": {"currency_code": "USD", "value": "955.02"}, "invoice_id": "52396214250", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "52396214250"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "52396214250"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:31:56Z", "transaction_id": "0SD21997LN026020M"}, "emitted_at": 1707238889192} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "3BH630398E562901G", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:42:41+0000", "transaction_updated_date": "2021-07-05T23:42:41+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "983.96"}, "available_balance": {"currency_code": "USD", "value": "983.96"}, "invoice_id": "18793521512", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "18793521512"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "18793521512"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:42:41Z", "transaction_id": "3BH630398E562901G"}, "emitted_at": 1707238889194} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "03D88325GF8461705", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:42:52+0000", "transaction_updated_date": "2021-07-05T23:42:52+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1012.90"}, "available_balance": {"currency_code": "USD", "value": "1012.90"}, "invoice_id": "71793513892", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71793513892"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71793513892"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:42:52Z", "transaction_id": "03D88325GF8461705"}, "emitted_at": 1707238889196} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "51852852PL0100404", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:43:03+0000", "transaction_updated_date": "2021-07-05T23:43:03+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1041.84"}, "available_balance": {"currency_code": "USD", "value": "1041.84"}, "invoice_id": "98653187889", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "98653187889"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "98653187889"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:43:03Z", "transaction_id": "51852852PL0100404"}, "emitted_at": 1707238889198} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "8MF4324694292993B", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:21+0000", "transaction_updated_date": "2021-07-05T23:44:21+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1070.78"}, "available_balance": {"currency_code": "USD", "value": "1070.78"}, "invoice_id": "12489150471", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "12489150471"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "12489150471"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:21Z", "transaction_id": "8MF4324694292993B"}, "emitted_at": 1707238889201} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "87S73342AS6001233", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:32+0000", "transaction_updated_date": "2021-07-05T23:44:32+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1099.72"}, "available_balance": {"currency_code": "USD", "value": "1099.72"}, "invoice_id": "99595079917", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "99595079917"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "99595079917"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:32Z", "transaction_id": "87S73342AS6001233"}, "emitted_at": 1707238889203} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "112146346A741221U", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:44+0000", "transaction_updated_date": "2021-07-05T23:44:44+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1128.66"}, "available_balance": {"currency_code": "USD", "value": "1128.66"}, "invoice_id": "93286331651", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "93286331651"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "93286331651"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:44Z", "transaction_id": "112146346A741221U"}, "emitted_at": 1707238889205} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "0N2242037Y9449344", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:44:54+0000", "transaction_updated_date": "2021-07-05T23:44:54+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1157.60"}, "available_balance": {"currency_code": "USD", "value": "1157.60"}, "invoice_id": "71349988314", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "71349988314"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "71349988314"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:44:54Z", "transaction_id": "0N2242037Y9449344"}, "emitted_at": 1707238889207} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9NH78349H0388780F", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:05+0000", "transaction_updated_date": "2021-07-05T23:45:05+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1186.54"}, "available_balance": {"currency_code": "USD", "value": "1186.54"}, "invoice_id": "83951023481", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "83951023481"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "83951023481"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:05Z", "transaction_id": "9NH78349H0388780F"}, "emitted_at": 1707238889209} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "10S137566E4828249", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:16+0000", "transaction_updated_date": "2021-07-05T23:45:16+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1215.48"}, "available_balance": {"currency_code": "USD", "value": "1215.48"}, "invoice_id": "88168198250", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "88168198250"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "88168198250"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:16Z", "transaction_id": "10S137566E4828249"}, "emitted_at": 1707238889211} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "7N749695W59419057", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:27+0000", "transaction_updated_date": "2021-07-05T23:45:27+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1244.42"}, "available_balance": {"currency_code": "USD", "value": "1244.42"}, "invoice_id": "38296993497", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "38296993497"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "38296993497"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:27Z", "transaction_id": "7N749695W59419057"}, "emitted_at": 1707238889213} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "43X058357A257931N", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:39+0000", "transaction_updated_date": "2021-07-05T23:45:39+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1273.36"}, "available_balance": {"currency_code": "USD", "value": "1273.36"}, "invoice_id": "33391419042", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "33391419042"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "33391419042"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:39Z", "transaction_id": "43X058357A257931N"}, "emitted_at": 1707238889215} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "5WL82051VY277550S", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:45:50+0000", "transaction_updated_date": "2021-07-05T23:45:50+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1302.30"}, "available_balance": {"currency_code": "USD", "value": "1302.30"}, "invoice_id": "69341308548", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "69341308548"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "69341308548"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:45:50Z", "transaction_id": "5WL82051VY277550S"}, "emitted_at": 1707238889217} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9CG36572NK0728016", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:46:01+0000", "transaction_updated_date": "2021-07-05T23:46:01+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1331.24"}, "available_balance": {"currency_code": "USD", "value": "1331.24"}, "invoice_id": "70491310163", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "70491310163"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "70491310163"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:46:01Z", "transaction_id": "9CG36572NK0728016"}, "emitted_at": 1707238889219} +{"stream": "transactions", "data": {"transaction_info": {"paypal_account_id": "ZE5533HZPGMC6", "transaction_id": "9K759703FU663194K", "transaction_event_code": "T0006", "transaction_initiation_date": "2021-07-05T23:46:43+0000", "transaction_updated_date": "2021-07-05T23:46:43+0000", "transaction_amount": {"currency_code": "USD", "value": "30.11"}, "fee_amount": {"currency_code": "USD", "value": "-1.17"}, "insurance_amount": {"currency_code": "USD", "value": "0.01"}, "shipping_amount": {"currency_code": "USD", "value": "1.03"}, "shipping_discount_amount": {"currency_code": "USD", "value": "1.00"}, "transaction_status": "S", "transaction_subject": "This is the payment transaction description.", "ending_balance": {"currency_code": "USD", "value": "1360.18"}, "available_balance": {"currency_code": "USD", "value": "1360.18"}, "invoice_id": "44794712899", "custom_field": "EBAY_EMS_90048630020055", "protection_eligibility": "01"}, "payer_info": {"account_id": "ZE5533HZPGMC6", "email_address": "integration-test-buyer@airbyte.io", "address_status": "Y", "payer_status": "Y", "payer_name": {"given_name": "test", "surname": "buyer", "alternate_full_name": "test buyer"}, "country_code": "US"}, "shipping_info": {"name": "Hello World", "address": {"line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "country_code": "US", "postal_code": "95131"}}, "cart_info": {"item_details": [{"item_code": "1", "item_name": "hat", "item_description": "Brown color hat", "item_quantity": "5", "item_unit_price": {"currency_code": "USD", "value": "3.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.05"}}], "total_item_amount": {"currency_code": "USD", "value": "15.05"}, "invoice_number": "44794712899"}, {"item_code": "product34", "item_name": "handbag", "item_description": "Black color hand bag", "item_quantity": "1", "item_unit_price": {"currency_code": "USD", "value": "15.00"}, "item_amount": {"currency_code": "USD", "value": "15.00"}, "tax_amounts": [{"tax_amount": {"currency_code": "USD", "value": "0.02"}}], "total_item_amount": {"currency_code": "USD", "value": "15.02"}, "invoice_number": "44794712899"}]}, "store_info": {}, "auction_info": {}, "incentive_info": {}, "transaction_updated_date": "2021-07-05T23:46:43Z", "transaction_id": "9K759703FU663194K"}, "emitted_at": 1707238889222} +{"stream": "balances", "data": {"balances": [{"currency": "USD", "primary": true, "total_balance": {"currency_code": "USD", "value": "173.64"}, "available_balance": {"currency_code": "USD", "value": "173.64"}, "withheld_balance": {"currency_code": "USD", "value": "0.00"}}], "account_id": "MDXWPD67GEP5W", "as_of_time": "2021-07-01T00:00:00Z", "last_refresh_time": "2024-02-06T09:59:59Z"}, "emitted_at": 1707239624675} +{"stream": "list_products", "data": {"id": "bELKLtzpiO", "name": "Pines-T-Shirt-sSUVV", "description": "Anothe rUpdate. Let's see if something changes or not", "create_time": "2024-01-25T20:16:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/bELKLtzpiO", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715683} +{"stream": "list_products", "data": {"id": "oObfKeWCTO", "name": "Pines-T-Shirt-HZBfE", "description": "My Update. Does it changes it?", "create_time": "2024-01-26T20:07:11Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/oObfKeWCTO", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715685} +{"stream": "list_products", "data": {"id": "GXASPmLVeA", "name": "Pines-T-Shirt-vtpna", "description": "Cotton XL", "create_time": "2024-01-26T23:00:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/catalogs/products/GXASPmLVeA", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239715687} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTWI4W4210034A4751008", "intent": "sale", "state": "approved", "cart": "94M68693F5918712T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "44794712899", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9K759703FU663194K", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTWI4W4210034A4751008", "create_time": "2021-07-05T23:46:43Z", "update_time": "2021-07-05T23:46:43Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9K759703FU663194K", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9K759703FU663194K/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTWI4W4210034A4751008", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:46:33Z", "update_time": "2021-07-05T23:46:43Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTWI4W4210034A4751008", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814718} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTMA8WD99999KH443990H", "intent": "sale", "state": "approved", "cart": "8BD080945B510293Y", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "70491310163", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9CG36572NK0728016", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTMA8WD99999KH443990H", "create_time": "2021-07-05T23:46:01Z", "update_time": "2021-07-05T23:46:01Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9CG36572NK0728016", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9CG36572NK0728016/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTMA8WD99999KH443990H", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:52Z", "update_time": "2021-07-05T23:46:01Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTMA8WD99999KH443990H", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814721} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTJA3GY064023P159724A", "intent": "sale", "state": "approved", "cart": "4XU51704H63205015", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "69341308548", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5WL82051VY277550S", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTJA3GY064023P159724A", "create_time": "2021-07-05T23:45:50Z", "update_time": "2021-07-05T23:45:50Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WL82051VY277550S", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WL82051VY277550S/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTJA3GY064023P159724A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:40Z", "update_time": "2021-07-05T23:45:50Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTJA3GY064023P159724A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814724} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTGI9UK71240VU8020618", "intent": "sale", "state": "approved", "cart": "0RJ70999M3464401U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "33391419042", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "43X058357A257931N", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTGI9UK71240VU8020618", "create_time": "2021-07-05T23:45:39Z", "update_time": "2021-07-05T23:45:39Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/43X058357A257931N", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/43X058357A257931N/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTGI9UK71240VU8020618", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:29Z", "update_time": "2021-07-05T23:45:39Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTGI9UK71240VU8020618", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814727} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTDQ5FS07530F9282151W", "intent": "sale", "state": "approved", "cart": "4JA813678M224812W", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "38296993497", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "7N749695W59419057", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTDQ5FS07530F9282151W", "create_time": "2021-07-05T23:45:27Z", "update_time": "2021-07-05T23:45:27Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/7N749695W59419057", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/7N749695W59419057/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTDQ5FS07530F9282151W", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:18Z", "update_time": "2021-07-05T23:45:27Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTDQ5FS07530F9282151W", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814730} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZTAY2N7514653J745150Y", "intent": "sale", "state": "approved", "cart": "4VA72722KX1105219", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "88168198250", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "10S137566E4828249", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZTAY2N7514653J745150Y", "create_time": "2021-07-05T23:45:16Z", "update_time": "2021-07-05T23:45:16Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/10S137566E4828249", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/10S137566E4828249/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTAY2N7514653J745150Y", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:45:07Z", "update_time": "2021-07-05T23:45:16Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZTAY2N7514653J745150Y", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814733} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZS6A3M9912977L184341S", "intent": "sale", "state": "approved", "cart": "4JY24848DR959552K", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "83951023481", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "9NH78349H0388780F", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZS6A3M9912977L184341S", "create_time": "2021-07-05T23:45:05Z", "update_time": "2021-07-05T23:45:05Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/9NH78349H0388780F", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/9NH78349H0388780F/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS6A3M9912977L184341S", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:56Z", "update_time": "2021-07-05T23:45:05Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS6A3M9912977L184341S", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814735} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZS3I50756242KE8498014", "intent": "sale", "state": "approved", "cart": "3PS97109CA147652A", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71349988314", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0N2242037Y9449344", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZS3I50756242KE8498014", "create_time": "2021-07-05T23:44:54Z", "update_time": "2021-07-05T23:44:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0N2242037Y9449344", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0N2242037Y9449344/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS3I50756242KE8498014", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:45Z", "update_time": "2021-07-05T23:44:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZS3I50756242KE8498014", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814738} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSYQ8A757181MC817782A", "intent": "sale", "state": "approved", "cart": "4KH490105A375162P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "93286331651", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "112146346A741221U", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSYQ8A757181MC817782A", "create_time": "2021-07-05T23:44:44Z", "update_time": "2021-07-05T23:44:44Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/112146346A741221U", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/112146346A741221U/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSYQ8A757181MC817782A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:34Z", "update_time": "2021-07-05T23:44:44Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSYQ8A757181MC817782A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814741} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSVY92X22655TL083163M", "intent": "sale", "state": "approved", "cart": "1K4366307V579334M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "99595079917", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "87S73342AS6001233", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSVY92X22655TL083163M", "create_time": "2021-07-05T23:44:32Z", "update_time": "2021-07-05T23:44:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/87S73342AS6001233", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/87S73342AS6001233/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSVY92X22655TL083163M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:23Z", "update_time": "2021-07-05T23:44:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSVY92X22655TL083163M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814743} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZSSY3AX23091XE567400S", "intent": "sale", "state": "approved", "cart": "5FW555787Y189635P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "12489150471", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "8MF4324694292993B", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZSSY3AX23091XE567400S", "create_time": "2021-07-05T23:44:21Z", "update_time": "2021-07-05T23:44:21Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/8MF4324694292993B", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/8MF4324694292993B/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSSY3AX23091XE567400S", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:44:11Z", "update_time": "2021-07-05T23:44:21Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZSSY3AX23091XE567400S", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814746} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZR7Q47A34643F6939564E", "intent": "sale", "state": "approved", "cart": "3CY93437B5650311M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "98653187889", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "51852852PL0100404", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZR7Q47A34643F6939564E", "create_time": "2021-07-05T23:43:03Z", "update_time": "2021-07-05T23:43:03Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/51852852PL0100404", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/51852852PL0100404/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR7Q47A34643F6939564E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:54Z", "update_time": "2021-07-05T23:43:03Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR7Q47A34643F6939564E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814749} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZR4Y96946691TM615464M", "intent": "sale", "state": "approved", "cart": "0WG02233VF623084T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71793513892", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "03D88325GF8461705", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZR4Y96946691TM615464M", "create_time": "2021-07-05T23:42:52Z", "update_time": "2021-07-05T23:42:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/03D88325GF8461705", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/03D88325GF8461705/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR4Y96946691TM615464M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:43Z", "update_time": "2021-07-05T23:42:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZR4Y96946691TM615464M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814751} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZRZY3BY320090L305572M", "intent": "sale", "state": "approved", "cart": "4RY36168C0517143X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "18793521512", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3BH630398E562901G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZRZY3BY320090L305572M", "create_time": "2021-07-05T23:42:41Z", "update_time": "2021-07-05T23:42:41Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3BH630398E562901G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3BH630398E562901G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZRZY3BY320090L305572M", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:42:31Z", "update_time": "2021-07-05T23:42:41Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZRZY3BY320090L305572M", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814754} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMYY6H275806JK843330N", "intent": "sale", "state": "approved", "cart": "9RC74442JD1611818", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "52396214250", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0SD21997LN026020M", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMYY6H275806JK843330N", "create_time": "2021-07-05T23:31:56Z", "update_time": "2021-07-05T23:31:56Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0SD21997LN026020M", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0SD21997LN026020M/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMYY6H275806JK843330N", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:47Z", "update_time": "2021-07-05T23:31:56Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMYY6H275806JK843330N", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814756} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMWA7HV06523LM984963Y", "intent": "sale", "state": "approved", "cart": "4HC02299JX0560832", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "12278283055", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5BJ418934Y425901G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMWA7HV06523LM984963Y", "create_time": "2021-07-05T23:31:46Z", "update_time": "2021-07-05T23:31:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5BJ418934Y425901G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5BJ418934Y425901G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMWA7HV06523LM984963Y", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:36Z", "update_time": "2021-07-05T23:31:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMWA7HV06523LM984963Y", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814758} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZMTI4X39217868749053E", "intent": "sale", "state": "approved", "cart": "5N3647919D810380T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "50350860865", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "1ST090036H2235215", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZMTI4X39217868749053E", "create_time": "2021-07-05T23:31:35Z", "update_time": "2021-07-05T23:31:35Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/1ST090036H2235215", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/1ST090036H2235215/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMTI4X39217868749053E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:31:25Z", "update_time": "2021-07-05T23:31:35Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZMTI4X39217868749053E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814760} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLYY9RB64928LK030220F", "intent": "sale", "state": "approved", "cart": "31F66461BJ2308523", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "10184574713", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2KU13114TJ604181E", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLYY9RB64928LK030220F", "create_time": "2021-07-05T23:29:48Z", "update_time": "2021-07-05T23:29:48Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2KU13114TJ604181E", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2KU13114TJ604181E/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLYY9RB64928LK030220F", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:39Z", "update_time": "2021-07-05T23:29:48Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLYY9RB64928LK030220F", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814763} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLWA09E67167RS362822V", "intent": "sale", "state": "approved", "cart": "1B944298P8820581S", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "92544485996", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2AJ081444T051123A", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLWA09E67167RS362822V", "create_time": "2021-07-05T23:29:37Z", "update_time": "2021-07-05T23:29:37Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2AJ081444T051123A", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2AJ081444T051123A/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLWA09E67167RS362822V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:28Z", "update_time": "2021-07-05T23:29:37Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLWA09E67167RS362822V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814765} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZLTA1857385502613571B", "intent": "sale", "state": "approved", "cart": "07W53209604004921", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "34635559567", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "63U003588S1135607", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZLTA1857385502613571B", "create_time": "2021-07-05T23:29:26Z", "update_time": "2021-07-05T23:29:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/63U003588S1135607", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/63U003588S1135607/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLTA1857385502613571B", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:29:16Z", "update_time": "2021-07-05T23:29:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZLTA1857385502613571B", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239814767} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZI7Q61590832VE058581A", "intent": "sale", "state": "approved", "cart": "47F08854HR292433A", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "46225965444", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0VE851712U5895412", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZI7Q61590832VE058581A", "create_time": "2021-07-05T23:23:51Z", "update_time": "2021-07-05T23:23:51Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0VE851712U5895412", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0VE851712U5895412/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI7Q61590832VE058581A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:42Z", "update_time": "2021-07-05T23:23:51Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI7Q61590832VE058581A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816765} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZI4Y1FS16045MX748772D", "intent": "sale", "state": "approved", "cart": "6JA90337U5912522U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "93025400757", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "4PW76195NN227720S", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZI4Y1FS16045MX748772D", "create_time": "2021-07-05T23:23:40Z", "update_time": "2021-07-05T23:23:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/4PW76195NN227720S", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/4PW76195NN227720S/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI4Y1FS16045MX748772D", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:31Z", "update_time": "2021-07-05T23:23:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZI4Y1FS16045MX748772D", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816770} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZIZY0YE90251N2470191A", "intent": "sale", "state": "approved", "cart": "79F61111E7201332F", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "71987080514", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5WX252723D093564T", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZIZY0YE90251N2470191A", "create_time": "2021-07-05T23:23:29Z", "update_time": "2021-07-05T23:23:29Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WX252723D093564T", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5WX252723D093564T/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZIZY0YE90251N2470191A", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:23:19Z", "update_time": "2021-07-05T23:23:29Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZIZY0YE90251N2470191A", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816774} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFQI6GD87350UE545773N", "intent": "sale", "state": "approved", "cart": "1FP43302U0478942X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "10442581967", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2N796839EY2539153", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFQI6GD87350UE545773N", "create_time": "2021-07-05T23:16:32Z", "update_time": "2021-07-05T23:16:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2N796839EY2539153", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2N796839EY2539153/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFQI6GD87350UE545773N", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:16:17Z", "update_time": "2021-07-05T23:16:32Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFQI6GD87350UE545773N", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816778} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFMA0B969784C6725002V", "intent": "sale", "state": "approved", "cart": "8L091901278803646", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "82173600275", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3VP82838NP358133N", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFMA0B969784C6725002V", "create_time": "2021-07-05T23:16:15Z", "update_time": "2021-07-05T23:16:15Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3VP82838NP358133N", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3VP82838NP358133N/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFMA0B969784C6725002V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:16:00Z", "update_time": "2021-07-05T23:16:15Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFMA0B969784C6725002V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816781} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFHY7SJ7565124295670P", "intent": "sale", "state": "approved", "cart": "2SM08874YP816313V", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "25494061224", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "5EL311302L108363J", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFHY7SJ7565124295670P", "create_time": "2021-07-05T23:15:58Z", "update_time": "2021-07-05T23:15:58Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/5EL311302L108363J", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/5EL311302L108363J/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFHY7SJ7565124295670P", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:43Z", "update_time": "2021-07-05T23:15:58Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFHY7SJ7565124295670P", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816785} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZFDY16477729A65752911", "intent": "sale", "state": "approved", "cart": "31E8174415946984X", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "88092228645", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "61G749036D552760G", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZFDY16477729A65752911", "create_time": "2021-07-05T23:15:42Z", "update_time": "2021-07-05T23:15:42Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/61G749036D552760G", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/61G749036D552760G/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFDY16477729A65752911", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:27Z", "update_time": "2021-07-05T23:15:42Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZFDY16477729A65752911", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816788} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZE7Y09K97910J19191835", "intent": "sale", "state": "approved", "cart": "52852967MK8398427", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "36419288277", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "19B82038T92822940", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZE7Y09K97910J19191835", "create_time": "2021-07-05T23:15:26Z", "update_time": "2021-07-05T23:15:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/19B82038T92822940", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/19B82038T92822940/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE7Y09K97910J19191835", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:15:11Z", "update_time": "2021-07-05T23:15:26Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE7Y09K97910J19191835", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816791} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZE3Q7MV3302078506752V", "intent": "sale", "state": "approved", "cart": "8DT33424FM6083023", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "32274344746", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "52795774C7828234R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZE3Q7MV3302078506752V", "create_time": "2021-07-05T23:15:09Z", "update_time": "2021-07-05T23:15:09Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/52795774C7828234R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/52795774C7828234R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE3Q7MV3302078506752V", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:54Z", "update_time": "2021-07-05T23:15:09Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZE3Q7MV3302078506752V", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816794} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEXI6AC38094H2421312E", "intent": "sale", "state": "approved", "cart": "934109456G4946916", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "18208641465", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "32J59182JY5989507", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEXI6AC38094H2421312E", "create_time": "2021-07-05T23:14:52Z", "update_time": "2021-07-05T23:14:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/32J59182JY5989507", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/32J59182JY5989507/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEXI6AC38094H2421312E", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:37Z", "update_time": "2021-07-05T23:14:52Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEXI6AC38094H2421312E", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816797} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZETI37A91239LN8311810", "intent": "sale", "state": "approved", "cart": "83D98649PY104524E", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "53235397043", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3MG39755337297727", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZETI37A91239LN8311810", "create_time": "2021-07-05T23:14:36Z", "update_time": "2021-07-05T23:14:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3MG39755337297727", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3MG39755337297727/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZETI37A91239LN8311810", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:21Z", "update_time": "2021-07-05T23:14:36Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZETI37A91239LN8311810", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816799} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEPA540480516L1460710", "intent": "sale", "state": "approved", "cart": "7GV22540700208350", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "53296156982", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "27881589Y9461861H", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEPA540480516L1460710", "create_time": "2021-07-05T23:14:19Z", "update_time": "2021-07-05T23:14:19Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/27881589Y9461861H", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/27881589Y9461861H/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEPA540480516L1460710", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:14:04Z", "update_time": "2021-07-05T23:14:19Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEPA540480516L1460710", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816802} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZEKQ6CT67951NS8257540", "intent": "sale", "state": "approved", "cart": "9GV5180502759472M", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "23612058730", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "243514451L952570P", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZEKQ6CT67951NS8257540", "create_time": "2021-07-05T23:14:02Z", "update_time": "2021-07-05T23:14:02Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/243514451L952570P", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/243514451L952570P/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEKQ6CT67951NS8257540", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:13:46Z", "update_time": "2021-07-05T23:14:02Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZEKQ6CT67951NS8257540", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816805} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZD2Q3A0909139J3152203", "intent": "sale", "state": "approved", "cart": "6AJ421654S4873922", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "32577611997", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "2F535603PS249601F", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZD2Q3A0909139J3152203", "create_time": "2021-07-05T23:12:57Z", "update_time": "2021-07-05T23:12:57Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/2F535603PS249601F", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/2F535603PS249601F/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZD2Q3A0909139J3152203", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:12:42Z", "update_time": "2021-07-05T23:12:57Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZD2Q3A0909139J3152203", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816807} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZDWI4V162188CW455701G", "intent": "sale", "state": "approved", "cart": "6D196635J17794229", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "31766547902", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "3DF69605L9958744R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZDWI4V162188CW455701G", "create_time": "2021-07-05T23:12:40Z", "update_time": "2021-07-05T23:12:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/3DF69605L9958744R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/3DF69605L9958744R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZDWI4V162188CW455701G", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:12:25Z", "update_time": "2021-07-05T23:12:40Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZDWI4V162188CW455701G", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816810} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZB7Y8EC76174AW4613112", "intent": "sale", "state": "approved", "cart": "6FK6522150836620E", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "56028534885", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0T320567TS5587836", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZB7Y8EC76174AW4613112", "create_time": "2021-07-05T23:09:04Z", "update_time": "2021-07-05T23:09:04Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0T320567TS5587836", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0T320567TS5587836/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZB7Y8EC76174AW4613112", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:08:47Z", "update_time": "2021-07-05T23:09:04Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZB7Y8EC76174AW4613112", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816813} +{"stream": "list_payments", "data": {"id": "PAYID-MDRZAUY1KV14872K8421472G", "intent": "sale", "state": "approved", "cart": "19W34946AD354311P", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "62173333941", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "6S892278N6406494Y", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRZAUY1KV14872K8421472G", "create_time": "2021-07-05T23:06:12Z", "update_time": "2021-07-05T23:06:12Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/6S892278N6406494Y", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/6S892278N6406494Y/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZAUY1KV14872K8421472G", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:05:55Z", "update_time": "2021-07-05T23:06:12Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRZAUY1KV14872K8421472G", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816816} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY7BY3W991940VB486043B", "intent": "sale", "state": "approved", "cart": "1B350164A39756210", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "23749371955", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "19C257131E850262B", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY7BY3W991940VB486043B", "create_time": "2021-07-05T23:02:46Z", "update_time": "2021-07-05T23:02:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/19C257131E850262B", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/19C257131E850262B/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY7BY3W991940VB486043B", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:02:31Z", "update_time": "2021-07-05T23:02:46Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY7BY3W991940VB486043B", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816818} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY6KI3Y0452638X128114D", "intent": "sale", "state": "approved", "cart": "19Y331413K071511U", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "41468340464", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "0M443597T0019954R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY6KI3Y0452638X128114D", "create_time": "2021-07-05T23:01:13Z", "update_time": "2021-07-05T23:01:13Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/0M443597T0019954R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/0M443597T0019954R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY6KI3Y0452638X128114D", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T23:00:57Z", "update_time": "2021-07-05T23:01:13Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY6KI3Y0452638X128114D", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816820} +{"stream": "list_payments", "data": {"id": "PAYID-MDRY4JY42461888J3529050W", "intent": "sale", "state": "approved", "cart": "3NN161683Y756203T", "payer": {"payment_method": "paypal", "status": "VERIFIED", "payer_info": {"email": "integration-test-buyer@airbyte.io", "first_name": "test", "last_name": "buyer", "payer_id": "ZE5533HZPGMC6", "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}, "phone": "4086104434", "country_code": "US"}}, "transactions": [{"amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payee": {"merchant_id": "MDXWPD67GEP5W", "email": "integration-test-facilitator@airbyte.io"}, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630020055", "invoice_number": "65095789448", "item_list": {"items": [{"name": "hat", "sku": "1", "description": "Brown color hat", "price": "3.00", "currency": "USD", "tax": "0.01", "quantity": 5}, {"name": "handbag", "sku": "product34", "description": "Black color hand bag", "price": "15.00", "currency": "USD", "tax": "0.02", "quantity": 1}], "shipping_address": {"recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "state": "CA", "postal_code": "95131", "country_code": "US"}}, "related_resources": [{"sale": {"id": "1FN09943JY662130R", "state": "completed", "amount": {"total": "30.11", "currency": "USD", "details": {"subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "insurance": "0.01", "handling_fee": "1.00", "shipping_discount": "-1.00", "discount": "0.00"}}, "payment_mode": "INSTANT_TRANSFER", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", "transaction_fee": {"value": "1.17", "currency": "USD"}, "parent_payment": "PAYID-MDRY4JY42461888J3529050W", "create_time": "2021-07-05T22:56:54Z", "update_time": "2021-07-05T22:56:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/sale/1FN09943JY662130R", "rel": "self", "method": "GET"}, {"href": "https://api.sandbox.paypal.com/v1/payments/sale/1FN09943JY662130R/refund", "rel": "refund", "method": "POST"}, {"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY4JY42461888J3529050W", "rel": "parent_payment", "method": "GET"}]}}]}], "create_time": "2021-07-05T22:56:39Z", "update_time": "2021-07-05T22:56:54Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MDRY4JY42461888J3529050W", "rel": "self", "method": "GET"}]}, "emitted_at": 1707239816823} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/invalid_config.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/invalid_config.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/invalid_config.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_config.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_state.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_state.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/state.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/state.json similarity index 100% rename from airbyte-integrations/connectors/source-paypal-transaction/integration_tests/state.json rename to airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/state.json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index 1fdb3b7826a2..d0d10b2f4d0b 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -10,8 +10,8 @@ ] TEST_REQUIREMENTS = [ - "pytest~=6.1", - "pytest-mock~=3.6", + "pytest~=8.0", + "pytest-mock~=3.12", "requests-mock", ] diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 53255384da1c..685367064932 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -5,6 +5,7 @@ import base64 import logging from dataclasses import dataclass +from datetime import datetime, timedelta import backoff import requests @@ -67,13 +68,21 @@ def _get_refresh_access_token_response(self): , data=request_body , headers=request_headers ) + self._log_response(response) response.raise_for_status() + + response_json = response.json() + + self.access_token = response_json.get('access_token') + return response.json() + except requests.exceptions.RequestException as e: - if e.response.status_code == 429 or e.response.status_code >= 500: + if e.response and (e.response.status_code == 429 or e.response.status_code >= 500): raise DefaultBackoffException(request=e.response.request, response=e.response) raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 218e983cd7ed..e09544303e22 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -1,11 +1,6 @@ version: 0.50.2 type: DeclarativeSource -check: - type: CheckStream - stream_names: - - balances - definitions: selector: type: RecordSelector @@ -110,13 +105,14 @@ definitions: type: RequestOption field_name: start_date inject_into: request_parameter + end_datetime: + type: MinMaxDatetime + datetime: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} end_time_option: type: RequestOption field_name: end_date inject_into: request_parameter - end_datetime: - type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S @@ -201,16 +197,43 @@ definitions: $parameters: path: "v1/catalogs/products" field_path: products + + # New Stream - Show Product Details + #Paypal API only has V1 for this stream + #This can't be incremental as there is no time filtering. If you need to have the updates, you need to Append in the full_sync + # This stream works, however has some challenges with performance. This will be commented out on the stream list while + # we resolve the performance challenges for Gold cert. + show_product_details_stream: + type: DeclarativeStream + primary_key: id + name: "show_product_details" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: "/v1/catalogs/products/{{ stream_slice.id }}" + record_selector: + $ref: "#/definitions/selector" + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: NoPagination + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + partition_field: "id" + stream: + $ref: "#/definitions/list_products_stream" #Stream List Disputes #Paypal API only has V1 for this stream - #There is no way to create disputes via API, thus no incremental sync will be added to this stream - #until we have a testing account that allows us to create disputes over transactions. list_disputes_stream: type: DeclarativeStream primary_key: dispute_id name: "list_disputes" - retriever: type: SimpleRetriever record_selector: @@ -222,9 +245,9 @@ definitions: inject_into: request_parameter field_name: next_page_token page_size_option: + type: RequestOption inject_into: request_parameter field_name: page_size - type: RequestOption pagination_strategy: type: PageIncrement start_from_page: 1 @@ -232,17 +255,43 @@ definitions: requester: $ref: "#/definitions/requester" http_method: GET - request_parameters: - #Searches for the optional parameter dispute_start_date. - #If present, it formats the date accordingly. Otherwise, it defaults to a start date set 180 days in the past." - start_time: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" + transformations: + - type: AddFields + fields: + - path: + - updated_time_cut + value: >- + {{ record['update_time'] }} + incremental_sync: + type: DatetimeBasedCursor + cursor_field: updated_time_cut + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + start_datetime: + type: MinMaxDatetime + datetime: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + end_datetime: + type: MinMaxDatetime + #Adding a time delta as the API has a problem with the slice being too close to the now_utc. Set to 30M + datetime: >- + {{ format_datetime(config['dispute_end_date'] if config['dispute_end_date'] else (now_utc() - duration('PT30M')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z'}} + datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" + start_time_option: + type: RequestOption + field_name: update_time_after + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: update_time_before + inject_into: request_parameter + step: "P{{ config.get('time_window', 7) }}D" + cursor_granularity: PT1S $parameters: path: "v1/customer/disputes" field_path: items #Stream Search Invoices # Currently it does not support incremental sync as metadata does not contain last_update_date - # TODO: Review if this is only a sandbox problem search_invoices_stream: type: DeclarativeStream primary_key: id @@ -273,7 +322,9 @@ definitions: request_body_json: creation_date_range: start: "{{ config['start_date'] }}" - end: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + end: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -319,7 +370,9 @@ definitions: datetime_format: "%Y-%m-%dT%H:%M:%SZ" end_datetime: type: MinMaxDatetime - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime: >- + {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption @@ -329,7 +382,7 @@ definitions: type: RequestOption field_name: end_time inject_into: request_parameter - step: "P1D" + step: "P{{ config.get('time_window', 7) }}D" cursor_granularity: PT1S $parameters: path: "v1/payments/payment" @@ -339,75 +392,11 @@ streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/list_products_stream" - - "#/definitions/show_product_details_stream" + #- "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" - "#/definitions/search_invoices_stream" - "#/definitions/list_payments_stream" -spec: - type: Spec - documentation_url: https://docs.airbyte.com/integrations/sources/paypal-transactions - connection_specification: - $schema: http://json-schema.org/draft-07/schema# - type: object - additionalProperties: true - required: - - client_id - - client_secret - - start_date - - is_sandbox - properties: - client_id: - type: string - title: Client ID - description: "The Client ID of your Paypal developer application." - airbyte_secret: true - order: 0 - client_secret: - type: string - title: Client secret - description: "The Client Secret of your Paypal developer application." - airbyte_secret: true - order: 1 - start_date: - title: Start Date - description: >- - Start Date for data extraction in ISO - format. Date must be in range from 3 years till 12 hrs before - present time. - type: string - examples: ["2021-06-11T23:59:59", "2021-06-11T23:59:59+00:00"] - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ - format: "date-time" - order: 2 - is_sandbox: - title: "Sandbox" - description: "Determines whether to use the sandbox or production environment." - type: "boolean" - default: false - dispute_start_date: - title: Dispute Start Date Range - description: >- - Start Date parameter for the list dispute endpoint in ISO - format. This Start Date must be in range within 180 days before - present time, and requires ONLY 3 miliseconds(mandatory). - If you don't use this option, it defaults to a start date set 180 days in the past. - type: string - examples: ["2021-06-11T23:59:59.000Z"] - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ - format: "date-time" - order: 2 - refresh_token: - type: "string" - title: "Refresh token" - description: "The key to refresh the expired access token." - airbyte_secret: true - time_window: - type: "integer" - title: "Number of days per request" - description: "The number of days per request. Must be a number between 1 and 31." - default: 7 - minimum: 1 - maximum: 31 +check: + stream_names: + - "balances" \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json index febfb55f7b58..2b0711b67149 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json @@ -6,6 +6,7 @@ "dispute_id": { "type": ["null", "string"] }, "create_time": { "type": "string", "format": "date-time" }, "update_time": { "type": "string", "format": "date-time" }, + "updated_time_cut": { "type": "string", "format": "date-time" }, "status": { "type": ["null", "string"] }, "reason": { "type": ["null", "string"] }, "dispute_state": { "type": ["null", "string"] }, @@ -17,11 +18,14 @@ } }, "links": { - "type": ["null", "object"], - "properties": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { "href": {"type": ["null", "string"]}, "rel": {"type": ["null", "string"]}, - "methid": {"type": ["null", "string"]} + "method": {"type": ["null", "string"]} + } } } } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json index 7075eb5865c9..5505ce1f73db 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -6,53 +6,83 @@ "id": { "type": ["null", "string"] }, "status": { "type": ["null", "string"] }, "primary_recipients": { - "type": ["null", "object"], - "properties": { - "billing_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": {"type": ["null", "string"]}, - "address": {"type": ["null", "string"]}, - "phones": {"type": ["null", "array"]}, - "additiona_info": {"type": ["null", "string"]}, - "email_address": {"type": ["null", "string"]}, - "language": {"type": ["null", "string"]} + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "billing_info": { + "type": ["null", "object"], + "properties": { + "business_name": {"type": ["null", "string"]}, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "address_line_4": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]}, + "phones": {"type": ["null", "array"]}, + "additiona_info": {"type": ["null", "string"]}, + "email_address": {"type": ["null", "string"]}, + "language": {"type": ["null", "string"]} + } + } + } }, - "shipping_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} + "shipping_info": { + "type": ["null", "object"], + "properties": { + "business_name": {"type": ["null", "string"]}, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": {"type": ["null", "string"]}, + "given_name": {"type": ["null", "string"]}, + "surname": {"type": ["null", "string"]}, + "middle_name": {"type": ["null", "string"]}, + "suffix": {"type": ["null", "string"]}, + "alternate_full_name": {"type": ["null", "string"]}, + "full_name": {"type": ["null", "string"]} + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": {"type": ["null", "string"]}, + "address_line_2": {"type": ["null", "string"]}, + "address_line_3": {"type": ["null", "string"]}, + "address_line_4": {"type": ["null", "string"]}, + "admin_area_1": {"type": ["null", "string"]}, + "admin_area_2": {"type": ["null", "string"]}, + "admin_area_3": {"type": ["null", "string"]}, + "postal_code": {"type": ["null", "string"]}, + "country_code": {"type": ["null", "string"]}, + "address_details": {"type": ["null", "object"]} } - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]} } } } + } } - } }, "additional_recipients": { "type": ["null", "array"]}, "detail": { @@ -77,12 +107,12 @@ }, "currency_code": { "type": ["null", "string"] }, "invoice_number": { "type": ["null", "string"] }, - "invoice_date": { "type": ["null", "string"], "format": "date-time" }, + "invoice_date": { "type": ["null", "string"], "format": "date" }, "payment_term": { "type": ["null", "object"], "properties": { "term_type": { "type": ["null", "string"]}, - "due_date": { "type": ["null", "string"], "format": "date-time" } + "due_date": { "type": ["null", "string"], "format": "date" } } }, "metadata": { diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index e86db7b35cc9..6ccfaa6f25d5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -4,6 +4,7 @@ from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource import logging +from airbyte_cdk import AirbyteLogger logger = logging.getLogger("airbyte") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml new file mode 100644 index 000000000000..0357797ee717 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -0,0 +1,65 @@ +documentationUrl: https://docs.airbyte.com/integrations/sources/paypal-transactions +connectionSpecification: + $schema: http://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + required: + - client_id + - client_secret + - start_date + - is_sandbox + properties: + client_id: + type: string + title: Client ID + description: "The Client ID of your Paypal developer application." + airbyte_secret: true + order: 0 + client_secret: + type: string + title: Client secret + description: "The Client Secret of your Paypal developer application." + airbyte_secret: true + order: 1 + start_date: + title: Start Date + description: >- + Start Date for data extraction in ISO + format. Date must be in range from 3 years till 12 hrs before + present time. + type: string + examples: ["2021-06-11T23:59:59", "2021-06-11T23:59:59+00:00"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ + format: "date-time" + order: 2 + is_sandbox: + title: "Sandbox" + description: "Determines whether to use the sandbox or production environment." + type: "boolean" + default: false + dispute_start_date: + title: Dispute Start Date Range + description: >- + Start Date parameter for the list dispute endpoint in ISO + format. This Start Date must be in range within 180 days before + present time, and requires ONLY 3 miliseconds(mandatory). + If you don't use this option, it defaults to a start date set 180 days in the past. + type: string + examples: ["2021-06-11T23:59:59.000Z"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ + format: "date-time" + order: 3 + refresh_token: + type: "string" + title: "Refresh token" + description: "The key to refresh the expired access token." + airbyte_secret: true + time_window: + type: "integer" + title: "Number of days per request" + description: "The number of days per request. Must be a number between 1 and 31." + default: 7 + minimum: 1 + maximum: 31 \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py new file mode 100644 index 000000000000..3902530ac51e --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py @@ -0,0 +1,83 @@ +import pytest +import requests_mock +import time +import logging +import requests +from unittest.mock import patch + +from source_paypal_transaction.components import PayPalOauth2Authenticator +from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException + +@pytest.fixture +def mock_authenticator(): + return PayPalOauth2Authenticator( + config={}, + parameters={}, + client_id='test_client_id', + client_secret='test_client_secret', + token_refresh_endpoint='https://test.token.endpoint', + grant_type='test_grant_type' + ) + +def test_get_refresh_access_token_response(mock_authenticator): + expected_response_json = {'access_token': 'test_access_token', 'expires_in': 3600} + with requests_mock.Mocker() as mock_request: + mock_request.post('https://test.token.endpoint', json=expected_response_json, status_code=200) + # Call _get_refresh method + mock_authenticator._get_refresh_access_token_response() + + assert mock_authenticator.access_token == expected_response_json['access_token'] + +def test_token_expiration(mock_authenticator): + # Mock response for initial token request + initial_response_json = {'access_token': 'initial_access_token', 'expires_in': 1} + # Mock response for token refresh request + refresh_response_json = {'access_token': 'refreshed_access_token', 'expires_in': 3600} + with requests_mock.Mocker() as mock_request: + + mock_request.post('https://test.token.endpoint', json=initial_response_json, status_code=200) + mock_authenticator._get_refresh_access_token_response() + + # Assert that the initial access token is set correctly + assert mock_authenticator.access_token == initial_response_json['access_token'] + time.sleep(2) + + mock_request.post('https://test.token.endpoint', json=refresh_response_json, status_code=200) + mock_authenticator._get_refresh_access_token_response() + + # Assert that the access token is refreshed + assert mock_authenticator.access_token == refresh_response_json['access_token'] + + +def test_backoff_retry(mock_authenticator, caplog): + + mock_response = {'access_token': 'test_access_token', 'expires_in': 3600} + mock_reason = "Too Many Requests" + + with requests_mock.Mocker() as mock_request: + mock_request.post('https://test.token.endpoint', json=mock_response, status_code=429, reason=mock_reason) + with caplog.at_level(logging.INFO): + try: + mock_authenticator._get_refresh_access_token_response() + except requests.exceptions.HTTPError: + pass # Ignore the HTTPError + else: + pytest.fail("Expected DefaultBackoffException to be raised") + +@pytest.fixture +def authenticator_parameters(): + return { + "client_id": "test_client_id", + "client_secret": "test_client_secret", + "config": {}, + "parameters": {}, + "token_refresh_endpoint": "https://test.token.endpoint", + "grant_type": "test_grant_type" + } + +def test_get_headers(authenticator_parameters): + expected_basic_auth = "Basic dGVzdF9jbGllbnRfaWQ6dGVzdF9jbGllbnRfc2VjcmV0" + authenticator = PayPalOauth2Authenticator(**authenticator_parameters) + headers = authenticator.get_headers() + assert headers == {"Authorization": expected_basic_auth} + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py index 9a3cce34d229..5b6328e2ceb8 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -1,15 +1,51 @@ +# conftest.py import pytest +import json +from datetime import datetime +from unittest.mock import patch + from source_paypal_transaction import SourcePaypalTransaction + @pytest.fixture(name="config") def config_fixture(): + #From File test + # with open('../secrets/config.json') as f: + # return json.load(f) + #Mock test return { - "client_id": "your_client_id", - "client_secret": "your_client_secret", - "start_date": "2022-01-01T00:00:00Z", - "is_sandbox": True + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "start_date": "2024-01-30T00:00:00Z", + "end_date": "2024-02-01T00:00:00Z", + "dispute_start_date": "2024-02-01T00:00:00.000Z", + "dispute_end_date": "2024-02-05T23:59:00.000Z", + "buyer_username": "Your Buyer email", + "buyer_password": "Your Buyer Password", + "payer_id": "ypur ACCOUNT ID", + "is_sandbox": True } + @pytest.fixture(name="source") def source_fixture(): - return SourcePaypalTransaction() \ No newline at end of file + return SourcePaypalTransaction() + +def validate_date_format(date_str, format): + try: + datetime.strptime(date_str, format) + return True + except ValueError: + return False + +def test_date_formats_in_config(config): + start_date_format = "%Y-%m-%dT%H:%M:%SZ" + dispute_date_format = "%Y-%m-%dT%H:%M:%S.%fZ" + assert validate_date_format(config['start_date'], start_date_format), "Start date format is incorrect" + assert validate_date_format(config['end_date'], start_date_format), "End date format is incorrect" + assert validate_date_format(config['dispute_start_date'], dispute_date_format), "Dispute start date format is incorrect" + assert validate_date_format(config['dispute_end_date'], dispute_date_format), "Dispute end date format is incorrect" + +#@pytest.fixture(name="logger_mock") +def logger_mock_fixture(): + return patch("source_paypal_transactions.source.AirbyteLogger") \ No newline at end of file From 6b6b9e896e13e938c3aee50c3c089c865fb134c8 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 7 Feb 2024 21:00:12 -0600 Subject: [PATCH 17/36] Add coveragerc. Documentation md file. Change version and ql level --- .../source-paypal-transaction/.coveragerc | 3 + .../source-paypal-transaction/metadata.yaml | 7 +- .../source_paypal_transaction/manifest.yaml | 6 +- .../unit_tests/conftest.py | 2 +- .../unit_tests/test_source.py | 4 + .../sources/paypal-transaction.md | 277 +++++++++++++++--- 6 files changed, 247 insertions(+), 52 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/.coveragerc create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc b/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc new file mode 100644 index 000000000000..4e4eba3bda57 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/.coveragerc @@ -0,0 +1,3 @@ +[run] +omit = + source_paypal_transaction/run.py \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index ad1a7d8d4454..af34edd024a9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -1,6 +1,6 @@ data: ab_internal: - ql: 300 + ql: 400 sl: 200 allowedHosts: hosts: @@ -34,6 +34,11 @@ data: 2.1.0: message: 'Version 2.1.0 changes the format of the state. The format of the cursor changed from "2021-06-18T16:24:13+03:00" to "2021-06-18T16:24:13Z". The state key for the transactions stream changed to "transaction_updated_date" and the key for the balances stream change to "as_of_time". The upgrade is safe, but rolling back is not.' upgradeDeadline: "2023-09-18" + suggestedStreams: + streams: + - transactions + - balances + - list_payments supportLevel: certified tags: - language:low-code diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index e09544303e22..0e2e1a348a1a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -201,8 +201,7 @@ definitions: # New Stream - Show Product Details #Paypal API only has V1 for this stream #This can't be incremental as there is no time filtering. If you need to have the updates, you need to Append in the full_sync - # This stream works, however has some challenges with performance. This will be commented out on the stream list while - # we resolve the performance challenges for Gold cert. + # This stream works, however has some challenges with performance. Whith a big catalog it can take up to 3 hrs. show_product_details_stream: type: DeclarativeStream primary_key: id @@ -313,7 +312,7 @@ definitions: pagination_strategy: type: PageIncrement start_from_page: 1 - page_size: 20 + page_size: 100 requester: $ref: "#/definitions/requester" http_method: POST @@ -372,7 +371,6 @@ definitions: type: MinMaxDatetime datetime: >- {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} - #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py index 5b6328e2ceb8..658d5e29af7a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -46,6 +46,6 @@ def test_date_formats_in_config(config): assert validate_date_format(config['dispute_start_date'], dispute_date_format), "Dispute start date format is incorrect" assert validate_date_format(config['dispute_end_date'], dispute_date_format), "Dispute end date format is incorrect" -#@pytest.fixture(name="logger_mock") +@pytest.fixture(name="logger_mock") def logger_mock_fixture(): return patch("source_paypal_transactions.source.AirbyteLogger") \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py new file mode 100644 index 000000000000..ccfeb33e4afd --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py @@ -0,0 +1,4 @@ +from source_paypal_transaction import SourcePaypalTransaction + +def test_source(): + assert SourcePaypalTransaction() \ No newline at end of file diff --git a/docs/integrations/sources/paypal-transaction.md b/docs/integrations/sources/paypal-transaction.md index 9390c59dac6f..2401b24322ad 100644 --- a/docs/integrations/sources/paypal-transaction.md +++ b/docs/integrations/sources/paypal-transaction.md @@ -1,58 +1,63 @@ -# Paypal Transaction +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -This page contains the setup guide and reference information for the Paypal Transaction source connector. +# Paypal + +This page contains the setup guide and reference information for the Paypal source connector. + +This connector uses [PayPal APIs](https://developer.paypal.com/api/rest/authentication/) OAuth 2.0 access token to authenticate requests. ## Prerequisites -The [Paypal Transaction API](https://developer.paypal.com/docs/api/transaction-search/v1/) is used to get the history of transactions for a PayPal account. +You will need a Paypal account, which you can get following [these steps](https://developer.paypal.com/docs/platforms/get-started/) + +In the same page, you will also find how to setup a Sandbox so you can test the connector before using it in production. ## Setup guide -### Step 1: Set up Paypal Transaction +### Step 1: Get your Paypal secrets -In order to get an `Client ID` and `Secret` please go to [this](https://developer.paypal.com/docs/platforms/get-started/) page and follow the instructions. After registration you may find your `Client ID` and `Secret` [here](https://developer.paypal.com/developer/accounts/). +After creating your account you will be able to get your `Client ID` and `Secret`. You can find them in your [Apps & Credentials page](https://developer.paypal.com/dashboard/applications/live). -:::note -Our Paypal Transactions Source Connector does not support OAuth at this time due to limitations outside of our control. If OAuth for Paypal Transactions is critical to your business, [please reach out to us](mailto:product@airbyte.io) to discuss how we may be able to partner on this effort. +### Step 2: Set up the Paypal Transaction connector in Airbyte -::: -## Step 2: Set up the Paypal Transaction connector in Airbyte +1. Log into your Airbyte account + - For Cloud [Log in here](https://cloud.airbyte.com/workspaces). - -**For Airbyte Cloud:** +2. In the left navigation bar, click **Sources**. + + a. If this is your first time creating a source, use the search bar and enter **Paypal Transaction** and select it. -1. [Log into your Airbyte Cloud](https://cloud.airbyte.com/workspaces) account. -2. In the left navigation bar, click **Sources**. In the top-right corner, click **+new source**. -3. On the Set up the source page, enter the name for the Paypal Transaction connector and select **Paypal Transaction** from the Source type dropdown. -4. Enter your client id -5. Enter your secret -6. Choose if your account is sandbox -7. Enter the date you want your sync to start from -8. Click **Set up source**. - + b. If you already have sources configured, go to the top-right corner and click **+new source**. Then enter **Paypal Transaction** in the searech bar and select the connector. + +3. Set the name for your source +4. Enter your `Client ID` +5. Enter your `Client secret` +6. `Start Date`: Use the provided datepicker or enter manually a UTC date and time in the format `YYYY-MM-DDTHH:MM:SSZ`. +7. Switch ON/Off the Sandbox toggle. By defaukt the toggle is OFF, meaning it work only in a produciton environment. +8. _(Optional) `Dispute Start Date Range`: Use the provided datepicker or enter manually a UTC date and time in the format `YYYY-MM-DDTHH:MM:SS.sssZ`. + - If you don't add a date and you sync the `lists_disputes stream`, it will use the default value of 180 days in the past to retrieve data + - It is mandatory to add the milliseconds is you enter a datetime. + - This option only works for `lists_disputes stream` - -**For Airbyte Open Source:** +9. _(Optional)`Refresh Token`:_ You can enter manually a refresh token. Right now the stream does this automatically. +10. _(Optional)`Number of days per request`:_ You can specify the days used by the connector when requesting data from the Paypal API. This helps in cases when you have a rate limit and you want to lower the window of retrieving data. + - Paypal has a 10K record limit per request. This option is useful if your sync is every week and you have more than 10K per week + - The default value is 7 + - This Max value you can enter is 31 days + +11. Click **Set up source** -1. Navigate to the Airbyte Open Source dashboard -2. Set the name for your source -3. Enter your client id -4. Enter your secret -5. Choose if your account is sandbox -6. Enter the date you want your sync to start from -7. Click **Set up source** - +:::info -## Supported sync modes +By default, syncs are run with a slice period of 7 days. If you see errors with the message `Result set size is greater than the maximum limit` or an error code like `RESULTSET_TOO_LARGE`: -The PayPal Transaction source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes): +- Try lower the the size of the slice period in your optional parameters in your connection configuration. +- You can try to lower the scheduling sync window in case a day slice period is not enough. Lowering the sync period it may help avoid reaching the 10K limit. + +::: -| Feature | Supported? | -| :------------------------ | :--------- | -| Full Refresh Sync | Yes | -| Incremental - Append Sync | Yes | -| Namespaces | No | ## Supported Streams @@ -60,19 +65,197 @@ This Source is capable of syncing the following core Streams: * [Transactions](https://developer.paypal.com/docs/api/transaction-search/v1/#transactions) * [Balances](https://developer.paypal.com/docs/api/transaction-search/v1/#balances) +* [List Products](https://developer.paypal.com/docs/api/catalog-products/v1/#products_list) +* [Show Product Details](https://developer.paypal.com/docs/api/catalog-products/v1/#products_get) +* [List Disputes](https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_list) +* [Search Invoices](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_search-invoices) +* [List Payments](https://developer.paypal.com/docs/api/payments/v1/#payment_list) + + +### Transactions Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** | `Transactions` | +| :-------------------------- | :------------------------ | +| `Start Date` | Timestamp with TZ (no ms) | +| `Dispute Start Date Range` | NA | +| `Refresh token` | Auto | +| `Number of days per request`| Max 31 , 7(D) | +| `Pagination Strategy` | Page Increment | +| `Page size ` | Max 500 (F) | +| `Full Refresh` | :white_check_mark: | +| `Incremental` | :white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +### Balances Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Balances` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |NA | +| `Page size ` |NA | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + + +### List Products Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + + +| **Param/Feature** |`List Products` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |Page Increment | +| `Page size ` |Max 20 (F) | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +:::caution + +When configuring your stream take in consideration that the way the API works limits the speed on retreiving data. In some cases a +30K catalog retrieval could take between 10-15 minutes. + +::: + +___ + +### Show Products Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Show Prod. Details` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA | +| `Pagination Strategy` |NA | +| `Page size ` |NA | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value -## Performance considerations +**F:** Fixed Value. This means it is not configurable. -Paypal transaction API has some [limits](https://developer.paypal.com/docs/integration/direct/transaction-search/) -* `start_date_min` = 3 years, API call lists transaction for the previous three years. -* `start_date_max` = 1.5 days, it takes a maximum of three hours for executed transactions to appear in the list transactions call. It is set to 1.5 days by default based on experience, otherwise API throw an error. -* `stream_slice_period` = 7 day, the maximum supported date range is 31 days. -* `records_per_request` = 10000, the maximum number of records in a single request. -* `page_size` = 500, the maximum page size is 500. -* `requests_per_minute` = 30, maximum limit is 50 requests per minute from IP address to all endpoint +:::caution + +When configuring this stream consider that the parent stream paginates with 20 number of items (Max alowed page size). The Paypal API calls are not concurrent, so the time it takes depends entirely on the server side. +This stream could take a considerable time syncing, so you should consider running the sync of this and the parent stream (`list_products`) at the end of the day. +Depending on the size of the catalog it could take several hours to sync. + +::: + +___ + +### List Disputes Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`List Disputes` | +| :-------------------------- |:------------------------ | +| `Start Date` |NA | +| `Dispute Start Date Range` |Timestamp with TZ (w/ms) | +| `Refresh token` |Auto | +| `Number of days per request`|Max 180 , 7(D) | +| `Pagination Strategy` |Page Token | +| `Page size ` |Max 50 (F) | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +### Search Invoices Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features + +| **Param/Feature** |`Search Invoices` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|ND | +| `Pagination Strategy` |Page Number | +| `Page size ` |Max 100 (F) | +| `Full Refresh` |:white_check_mark: (D) | +| `Incremental` |:x: | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +**ND:** Not Defined in the source. + + +:::info + +The `start_end` from the configuration, is passed to the body of the request and uses the `creation_date_range.start` and `creation_date_range.end`. More information in the [Paypal Developer API documentation](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_search-invoices). + +::: + + +___ + +### List Payments Stream + +The below table contains the configuraiton parameters available for this connector and the default values and available features. + +| **Param/Feature** |`List Payments` | +| :-------------------------- |:------------------------ | +| `Start Date` |Timestamp with TZ (no ms) | +| `Dispute Start Date Range` |NA | +| `Refresh token` |Auto | +| `Number of days per request`|NA , 7(D) | +| `Pagination Strategy` |Page Cursor | +| `Page size ` |Max 20 (F) | +| `Full Refresh` |:white_check_mark: | +| `Incremental` |:white_check_mark: (D) | + +**D:** Default configured Value + +**F:** Fixed Value. This means it is not configurable. + +___ + +## Performance Considerations + +* **Data Availability:** It takes a maximum of 3 hours for executed transactions to appear in the list transactions call. +* **Number of days per request:** The maximum supported date range is 31 days. +* **Historical Data:** You can't retrieve more than 3yrs of data for the `transactions` stream. For `dispute_start_date` you can only retrieve 180 days of data (see specifications per stream) +* `records_per_request`: The maximum number of records in a single request are 10K (API Server restriction) +* `page_size`: The maximum page size is 500. This has been configured by default. +* `requests_per_minute` = The maximum limit is 50 requests per minute from IP address to all endpoint (API Server restriction). + -By default, syncs are performed with a slice period of 7 days. If you see errors with the message `Result set size is greater than the maximum limit. Change the filter criteria and try again.`, lower the size of the slice period in your connection configuration. ## Data type map @@ -83,10 +266,12 @@ By default, syncs are performed with a slice period of 7 days. If you see errors | `array` | `array` | | `object` | `object` | + ## Changelog | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------| +| 2.3.1 | 2024-02-07 | [34510](https://github.com/airbytehq/airbyte/pull/34510) | Silver certified. New Streams Added | | 2.2.1 | 2024-01-11 | [34155](https://github.com/airbytehq/airbyte/pull/34155) | prepare for airbyte-lib | | 2.2.0 | 2023-10-25 | [31852](https://github.com/airbytehq/airbyte/pull/31852) | The size of the time_window can be configured | | 2.1.2 | 2023-10-23 | [31759](https://github.com/airbytehq/airbyte/pull/31759) | Keep transaction_id as a string and fetch data in 7-day batches From 2fa110bfe0de127841cc8b9a7225e52da4c75955 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 7 Feb 2024 22:16:39 -0600 Subject: [PATCH 18/36] Update CDK version --- .../connectors/source-paypal-transaction/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index d0d10b2f4d0b..91b585c38f5a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -6,7 +6,7 @@ from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ - "airbyte-cdk>=0.51.44", + "airbyte-cdk>=0.61.2", ] TEST_REQUIREMENTS = [ From f7f5028f70b3b8a6d5a5461c94a4c86223c2a3c5 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Wed, 7 Feb 2024 23:37:36 -0600 Subject: [PATCH 19/36] Fix format (airbyte-ci) --- .../acceptance-test-config.yml | 1 - .../bin/disputes_generator.py | 50 +- .../source-paypal-transaction/bin/invoices.py | 249 +++---- .../bin/payments_generator.py | 74 +- .../bin/paypal_transaction_generator.py | 14 +- .../bin/product_catalog.py | 69 +- .../configured_catalog_list_disputes.json | 3 +- .../configured_catalog_list_payments.json | 28 +- .../configured_catalog_search_invoices.json | 2 +- .../source-paypal-transaction/setup.py | 2 +- .../source_paypal_transaction/components.py | 25 +- .../source_paypal_transaction/manifest.yaml | 38 +- .../schemas/list_disputes.json | 52 +- .../schemas/list_payments.json | 329 ++++----- .../schemas/list_products.json | 8 +- .../schemas/search_invoices.json | 641 +++++++++--------- .../schemas/show_product_details.json | 41 +- .../source_paypal_transaction/source.py | 4 +- .../source_paypal_transaction/spec.yaml | 2 +- .../unit_tests/auth_components_test.py | 13 +- .../unit_tests/conftest.py | 4 +- .../unit_tests/test_source.py | 3 + 22 files changed, 799 insertions(+), 853 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index 185a17f571af..944d566eec08 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -104,4 +104,3 @@ acceptance_tests: list_products: - name: description bypass_reason: "Sometimes it is not contained in the response" - diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py index f35460347d2f..c371024b7ff9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/disputes_generator.py @@ -1,3 +1,5 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + # REQUIREMENTS: # 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). # Use the following body (change all the values): @@ -11,79 +13,77 @@ # HOW TO USE: # To create a new payment: python script_name.py create -#To update an existing dispute: +# To update an existing dispute: # python disputes_generator.py update DISPUTE_ID ''[{"op": "replace", "path": "/reason", "value": "The new reason"}]' -#To update a dispute status -#python update_dispute.py require-evidence DISPUTE_ID SELLER_EVIDENCE +# To update a dispute status +# python update_dispute.py require-evidence DISPUTE_ID SELLER_EVIDENCE -import requests +import base64 import json import sys -import base64 + +import requests + + # Function to get a PayPal OAuth token def get_paypal_token(client_id, secret_id): url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" headers = { "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode(), } payload = {"grant_type": "client_credentials"} response = requests.post(url=url, data=payload, headers=headers) - return response.json().get('access_token') + return response.json().get("access_token") + def update_dispute(token, dispute_id, updates): """Update a PayPal dispute.""" url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {token}" - } + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {token}"} response = requests.patch(url, headers=headers, json=updates) print("RESPONSE: ", response.text) return response.json() + def require_evidence(token, dispute_id, action): """Require evidence for a PayPal dispute.""" url = f"https://api-m.paypal.com/v1/customer/disputes/{dispute_id}/require-evidence" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {token}" - } - payload = { - "action": action - } + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {token}"} + payload = {"action": action} response = requests.post(url, headers=headers, json=payload) print("RESPONSE: ", response.text) return response.json() + def read_json(filepath): with open(filepath, "r") as f: return json.loads(f.read()) + def main(): - + operation = sys.argv[1] CREDS = read_json("../secrets/config.json") client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") token = get_paypal_token(client_id, secret_id) - - if operation == 'update': + if operation == "update": dispute_id = sys.argv[2] updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument update_response = update_dispute(token, dispute_id, updates) print("Update Response:", update_response) - - elif sys.argv[1] == 'require-evidence': + + elif sys.argv[1] == "require-evidence": dispute_id = sys.argv[2] action = sys.argv[3] # Either 'BUYER_EVIDENCE' or 'SELLER_EVIDENCE' evidence_response = require_evidence(token, dispute_id, action) print("Evidence Requirement Response:", evidence_response) else: print("Invalid command. Use 'create', 'update', or 'require-evidence'.") - + if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py index 4a096a0cdf94..4acc5f2e0542 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py @@ -1,29 +1,35 @@ -import requests -import random -import string +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + +import argparse import base64 import json -import argparse +import random +import string from datetime import datetime, timedelta +import requests + + # Function to generate a random alphanumeric string def generate_random_string(length=10): - return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) + return "".join(random.choices(string.ascii_letters + string.digits, k=length)) + def read_json(filepath): with open(filepath, "r") as f: return json.loads(f.read()) + # Function to get a PayPal OAuth token def get_paypal_token(client_id, secret_id): url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" headers = { "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode(), } payload = {"grant_type": "client_credentials"} response = requests.post(url=url, data=payload, headers=headers) - return response.json().get('access_token') + return response.json().get("access_token") # Function to create a draft invoice @@ -37,160 +43,95 @@ def create_draft_invoice(access_token, invoice_date, term_type, due_date): # "payment_term": {"term_type": term_type, "due_date": due_date}, # } "detail": { - "invoice_number": generate_random_string(8), - "invoice_date": invoice_date, - "payment_term": {"term_type": term_type, "due_date": due_date}, - "currency_code": "USD", - "reference": "", - "note": "", - "terms_and_conditions": "", - "memo": "" - }, - "invoicer": { - "name": { - "given_name": "David", - "surname": "Larusso" + "invoice_number": generate_random_string(8), + "invoice_date": invoice_date, + "payment_term": {"term_type": term_type, "due_date": due_date}, + "currency_code": "USD", + "reference": "", + "note": "", + "terms_and_conditions": "", + "memo": "", }, - "address": { - "address_line_1": "123 Townsend St", - "address_line_2": "Floor 6", - "admin_area_2": "San Francisco", - "admin_area_1": "CA", - "postal_code": "94107", - "country_code": "US" + "invoicer": { + "name": {"given_name": "David", "surname": "Larusso"}, + "address": { + "address_line_1": "123 Townsend St", + "address_line_2": "Floor 6", + "admin_area_2": "San Francisco", + "admin_area_1": "CA", + "postal_code": "94107", + "country_code": "US", + }, + "phones": [{"country_code": "001", "national_number": "4085551234", "phone_type": "MOBILE"}], + "website": "www.example.com", + "tax_id": "XX-XXXXXXX", + "logo_url": "https://example.com/logo.png", + "additional_notes": "", }, - "phones": [ + "primary_recipients": [ { - "country_code": "001", - "national_number": "4085551234", - "phone_type": "MOBILE" - } - ], - "website": "www.example.com", - "tax_id": "XX-XXXXXXX", - "logo_url": "https://example.com/logo.png", - "additional_notes": "" - }, - "primary_recipients": [ - { - "billing_info": { - "name": { - "given_name": "Stephanie", - "surname": "Meyers" - }, - "address": { - "address_line_1": "1234 Main Street", - "admin_area_2": "Anytown", - "admin_area_1": "CA", - "postal_code": "98765", - "country_code": "US" + "billing_info": { + "name": {"given_name": "Stephanie", "surname": "Meyers"}, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US", + }, + "email_address": "foobuyer@example.com", + "phones": [{"country_code": "001", "national_number": "4884551234", "phone_type": "HOME"}], + "additional_info_value": "add-info", }, - "email_address": "foobuyer@example.com", - "phones": [ - { - "country_code": "001", - "national_number": "4884551234", - "phone_type": "HOME" - } - ], - "additional_info_value": "add-info" - }, - "shipping_info": { - "name": { - "given_name": "Stephanie", - "surname": "Meyers" + "shipping_info": { + "name": {"given_name": "Stephanie", "surname": "Meyers"}, + "address": { + "address_line_1": "1234 Main Street", + "admin_area_2": "Anytown", + "admin_area_1": "CA", + "postal_code": "98765", + "country_code": "US", + }, }, - "address": { - "address_line_1": "1234 Main Street", - "admin_area_2": "Anytown", - "admin_area_1": "CA", - "postal_code": "98765", - "country_code": "US" - } } - } - ], - "items": [ - { - "name": "Yoga Mat", - "description": "Elastic mat to practice yoga.", - "quantity": "1", - "unit_amount": { - "currency_code": "USD", - "value": "50.00" - }, - "tax": { - "name": "Sales Tax", - "percent": "7.25" + ], + "items": [ + { + "name": "Yoga Mat", + "description": "Elastic mat to practice yoga.", + "quantity": "1", + "unit_amount": {"currency_code": "USD", "value": "50.00"}, + "tax": {"name": "Sales Tax", "percent": "7.25"}, + "discount": {"percent": "5"}, + "unit_of_measure": "QUANTITY", }, - "discount": { - "percent": "5" + { + "name": "Yoga t-shirt", + "quantity": "1", + "unit_amount": {"currency_code": "USD", "value": "10.00"}, + "tax": {"name": "Sales Tax", "percent": "7.25"}, + "discount": {"amount": {"currency_code": "USD", "value": "5.00"}}, + "unit_of_measure": "QUANTITY", }, - "unit_of_measure": "QUANTITY" + ], + "configuration": { + "partial_payment": {"allow_partial_payment": True, "minimum_amount_due": {"currency_code": "USD", "value": "20.00"}}, + "allow_tip": True, + "tax_calculated_after_discount": True, + "tax_inclusive": False, }, - { - "name": "Yoga t-shirt", - "quantity": "1", - "unit_amount": { - "currency_code": "USD", - "value": "10.00" - }, - "tax": { - "name": "Sales Tax", - "percent": "7.25" - }, - "discount": { - "amount": { - "currency_code": "USD", - "value": "5.00" - } - }, - "unit_of_measure": "QUANTITY" - } - ], - "configuration": { - "partial_payment": { - "allow_partial_payment": True, - "minimum_amount_due": { - "currency_code": "USD", - "value": "20.00" + "amount": { + "breakdown": { + "custom": {"label": "Packing Charges", "amount": {"currency_code": "USD", "value": "10.00"}}, + "shipping": {"amount": {"currency_code": "USD", "value": "10.00"}, "tax": {"name": "Sales Tax", "percent": "7.25"}}, + "discount": {"invoice_discount": {"percent": "5"}}, } }, - "allow_tip": True, - "tax_calculated_after_discount": True, - "tax_inclusive": False - }, - "amount": { - "breakdown": { - "custom": { - "label": "Packing Charges", - "amount": { - "currency_code": "USD", - "value": "10.00" - } - }, - "shipping": { - "amount": { - "currency_code": "USD", - "value": "10.00" - }, - "tax": { - "name": "Sales Tax", - "percent": "7.25" - } - }, - "discount": { - "invoice_discount": { - "percent": "5" - } - } - } - } - } response = requests.post(url, headers=headers, json=data) return response.json() + # Function to send an existing draft invoice def send_draft_invoice(access_token, invoice_id, subject, note, additional_recipients): url = f"https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/send" @@ -200,11 +141,12 @@ def send_draft_invoice(access_token, invoice_id, subject, note, additional_recip "note": note, "send_to_recipient": True, "additional_recipients": additional_recipients, - "send_to_invoicer": False + "send_to_invoicer": False, } response = requests.post(url, headers=headers, json=data) return response.json() + # Main function def main(): parser = argparse.ArgumentParser(description="PayPal Invoice Actions") @@ -212,7 +154,7 @@ def main(): parser.add_argument("--invoice_id", help="Invoice ID (required for send_draft)") parser.add_argument("--subject", help="Subject for the invoice email") parser.add_argument("--note", help="Note for the invoice email") - parser.add_argument("--additional_recipients", nargs='*', help="Additional recipients for the invoice email") + parser.add_argument("--additional_recipients", nargs="*", help="Additional recipients for the invoice email") args = parser.parse_args() CREDS = read_json("../secrets/config.json") @@ -221,13 +163,13 @@ def main(): secret_id = CREDS.get("client_secret") access_token = get_paypal_token(client_id, secret_id) - if args.action == 'create_draft': - invoice_date = datetime.now().strftime('%Y-%m-%d') + if args.action == "create_draft": + invoice_date = datetime.now().strftime("%Y-%m-%d") term_type = "NET_30" - due_date = (datetime.now() + timedelta(days=30)).strftime('%Y-%m-%d') + due_date = (datetime.now() + timedelta(days=30)).strftime("%Y-%m-%d") result = create_draft_invoice(access_token, invoice_date, term_type, due_date) print("Draft Invoice Created:", result) - elif args.action == 'send_draft': + elif args.action == "send_draft": if not args.invoice_id: print("Invoice ID is required for sending a draft invoice.") return @@ -236,5 +178,6 @@ def main(): else: print("Invalid action specified") + if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py index 9a7df324ccb5..ab7f51c51ef9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -1,3 +1,5 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + # REQUIREMENTS: # 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). # Use the following body (change all the values): @@ -11,96 +13,83 @@ # HOW TO USE: # To create a new payment: python script_name.py create -#To update an existing product: +# To update an existing product: # python script_name.py update PAYMENT_ID '[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "50.00", "currency": "USD"}}]' # NOTE: This is version does not work for CREATE PAYMENT as the HEADER requires data I can't get -import requests +import base64 import json import sys -import base64 + +import requests + # Function to get a PayPal OAuth token def get_paypal_token(client_id, secret_id): url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" headers = { "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode(), } payload = {"grant_type": "client_credentials"} response = requests.post(url=url, data=payload, headers=headers) - return response.json().get('access_token') + return response.json().get("access_token") + def create_payment(token, security_context): """Create a PayPal payment.""" url = "https://api-m.paypal.com/v1/payments/payment" headers = { "Content-Type": "application/json", - #"Authorization": f"Bearer {token}", - "X-PAYPAL-SECURITY-CONTEXT": security_context + # "Authorization": f"Bearer {token}", + "X-PAYPAL-SECURITY-CONTEXT": security_context, } payload = { "intent": "sale", - "transactions": [{ - "amount": { - "total": "30.00", - "currency": "USD", - "details": { - "subtotal": "30.00" - } - }, - "description": "This is a test - Pines test.", - "item_list": { - "items": [{ - "name": "My item", - "sku": "123445667", - "price": "15.00", - "currency": "USD", - "quantity": 2 - }], + "transactions": [ + { + "amount": {"total": "30.00", "currency": "USD", "details": {"subtotal": "30.00"}}, + "description": "This is a test - Pines test.", + "item_list": { + "items": [{"name": "My item", "sku": "123445667", "price": "15.00", "currency": "USD", "quantity": 2}], + }, } - }], - "payer": { - "payment_method": "paypal" - }, - "redirect_urls": { - "return_url": "https://example.com/return", - "cancel_url": "https://example.com/cancel" - } + ], + "payer": {"payment_method": "paypal"}, + "redirect_urls": {"return_url": "https://example.com/return", "cancel_url": "https://example.com/cancel"}, } - + response = requests.post(url, headers=headers, json=payload) return response.json() + def update_payment(token, payment_id, updates): """Update a PayPal payment.""" url = f"https://api-m.paypal.com/v1/payments/payment/{payment_id}" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {token}" - } + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {token}"} response = requests.patch(url, headers=headers, json=updates) return response.json() + def read_json(filepath): with open(filepath, "r") as f: return json.loads(f.read()) + def main(): CREDS = read_json("../secrets/config.json") client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") token = get_paypal_token(client_id, secret_id) - #security_context = '{"actor":{"account_number":"MDXWPD67GEP5W","party_id":"1659371090107732880","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dmOUZMwuKocrqe72Zx9D-Lf4"},"auth_token":"A015QQVR4S3u79k.UvhQ-AP4EhQikqOogdx-wIbvcvZ7Qaw","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"2245934915437588879","party_id":"2245934915437588879","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' - + # security_context = '{"actor":{"account_number":"MDXWPD67GEP5W","party_id":"1659371090107732880","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dmOUZMwuKocrqe72Zx9D-Lf4"},"auth_token":"A015QQVR4S3u79k.UvhQ-AP4EhQikqOogdx-wIbvcvZ7Qaw","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"2245934915437588879","party_id":"2245934915437588879","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' - if sys.argv[1] == 'create': + if sys.argv[1] == "create": payment = create_payment(token, security_context) print("Created Payment:", payment) - elif sys.argv[1] == 'update': + elif sys.argv[1] == "update": payment_id = sys.argv[2] updates = json.loads(sys.argv[3]) # Expecting JSON string as the third argument update_response = update_payment(token, payment_id, updates) @@ -109,7 +98,8 @@ def main(): else: print("Invalid command. Use 'create' or 'update'.") + if __name__ == "__main__": main() -#'[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "25000.00", "currency": "BTC"}}]' \ No newline at end of file +#'[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "25000.00", "currency": "BTC"}}]' diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index 463f327e3da1..b7319f27e6fb 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -114,7 +114,7 @@ def get_api_token(): auth = (client_id, secret) response = requests.request(method="POST", url=token_refresh_endpoint, data=data, headers=headers, auth=auth) response_json = response.json() - print("RESPONSE -->",response_json) + print("RESPONSE -->", response_json) API_TOKEN = response_json["access_token"] return API_TOKEN @@ -153,7 +153,7 @@ def make_payment(): # APPROVE PAYMENT def login(): - #driver = webdriver.Chrome("/usr/bin/chromedriver") + # driver = webdriver.Chrome("/usr/bin/chromedriver") driver = webdriver.Chrome() # SIGN_IN @@ -173,9 +173,7 @@ def approve_payment(driver, url): sleep(3) if not cookies_accepted: try: - cookies_button = WebDriverWait(driver, 10).until( - EC.element_to_be_clickable((By.ID, "acceptAllButton")) - ) + cookies_button = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "acceptAllButton"))) cookies_button.click() cookies_accepted = True except Exception as e: @@ -198,6 +196,7 @@ def approve_payment(driver, url): wait.until(EC.title_is("Example Domain")) print(f"Payment approved: {driver.current_url}") + def execute_payment(url): try: # Attempt to make the POST request @@ -208,11 +207,14 @@ def execute_payment(url): print(f"Your payment has been successfully executed to {url} with STATE: {response_json['state']}") else: # If the response code is not 200, print the error message - print(f"Your payment execution was not successful. You got {response.status_code} with message {response.json().get('message', 'No message available')}.") + print( + f"Your payment execution was not successful. You got {response.status_code} with message {response.json().get('message', 'No message available')}." + ) except requests.exceptions.RequestException as e: # If an error occurs during the request, print the error print(f"An error occurred: {e}") + TOTAL_TRANSACTIONS = int(sys.argv[1]) if len(sys.argv) > 1 else 3 CREDS = read_json("../secrets/config.json") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index 811c85ef406e..dd3856f3b04b 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -1,3 +1,5 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + # # REQUIREMENTS: # 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). @@ -12,46 +14,46 @@ # HOW TO USE: # To create a new product: python script_name.py --action create -#To update an existing product: python script_name.py --action update --product_id +# To update an existing product: python script_name.py --action update --product_id # NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized # TODO: Generate N products in one run. -import requests -import random -import string +import argparse import base64 import json -import argparse +import random +import string + +import requests + def read_json(filepath): with open(filepath, "r") as f: return json.loads(f.read()) + def generate_random_string(length=10): """Generate a random string of fixed length.""" letters = string.ascii_letters - return ''.join(random.choice(letters) for i in range(length)) + return "".join(random.choice(letters) for i in range(length)) + def get_paypal_token(client_id, secret_id): """Get a bearer token from PayPal.""" url = "https://api-m.sandbox.paypal.com/v1/oauth2/token" headers = { "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode() - } - payload = { - "grant_type": "client_credentials" + "Authorization": "Basic " + base64.b64encode(f"{client_id}:{secret_id}".encode()).decode(), } + payload = {"grant_type": "client_credentials"} response = requests.post(url=url, data=payload, headers=headers) - return response.json().get('access_token') + return response.json().get("access_token") + def create_paypal_product(access_token): """Create a product in PayPal.""" url = "https://api-m.sandbox.paypal.com/v1/catalogs/products" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {access_token}" - } + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} payload = { "name": "Pines-T-Shirt-" + generate_random_string(5), "type": "PHYSICAL", @@ -59,31 +61,29 @@ def create_paypal_product(access_token): "description": "Cotton XL", "category": "CLOTHING", "image_url": "https://example.com/gallary/images/" + generate_random_string(10) + ".jpg", - "home_url": "https://example.com/catalog/" + generate_random_string(10) + ".jpg" + "home_url": "https://example.com/catalog/" + generate_random_string(10) + ".jpg", } response = requests.post(url=url, json=payload, headers=headers) return response.json() + def update_paypal_product(access_token, product_id, updates): """Update a product in PayPal.""" url = f"https://api-m.sandbox.paypal.com/v1/catalogs/products/{product_id}" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {access_token}" - } + headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} response = requests.patch(url=url, json=updates, headers=headers) - if response.status_code == 204: + if response.status_code == 204: print(f"Update Successful. Response {response.status_code}. This succesful repsonse has no response body") - return None - else: - print(f"Error: {response.status_code}, {response.text}") return None - + else: + print(f"Error: {response.status_code}, {response.text}") + return None + # Parse command line arguments -parser = argparse.ArgumentParser(description='Create or Update a PayPal Product.') -parser.add_argument('--action', choices=['create', 'update'], required=True, help='Action to perform: create or update') -parser.add_argument('--product_id', help='Product ID for update action') +parser = argparse.ArgumentParser(description="Create or Update a PayPal Product.") +parser.add_argument("--action", choices=["create", "update"], required=True, help="Action to perform: create or update") +parser.add_argument("--product_id", help="Product ID for update action") args = parser.parse_args() # Common setup @@ -92,19 +92,12 @@ def update_paypal_product(access_token, product_id, updates): secret_id = CREDS.get("client_secret") access_token = get_paypal_token(client_id, secret_id) # Perform action based on arguments -if args.action == 'create': +if args.action == "create": product = create_paypal_product(access_token) print("Created product:", product) -elif args.action == 'update' and args.product_id: - updates = [ - { - "op": "replace", - "path": "/description", - "value": "My Update. Does it changes it?" - } - ] +elif args.action == "update" and args.product_id: + updates = [{"op": "replace", "path": "/description", "value": "My Update. Does it changes it?"}] product = update_paypal_product(access_token, args.product_id, updates) print("Updated product:", product) else: print("Invalid arguments") - diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json index b00142c4c708..ce3ee289234a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_disputes.json @@ -9,8 +9,7 @@ "supported_sync_modes": ["full_refresh", "incremental"] }, "sync_mode": "incremental", - "destination_sync_mode": "append" + "destination_sync_mode": "append" } ] } - diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json index 5a688c56ed10..07cca1e51c96 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_list_payments.json @@ -1,15 +1,15 @@ { - "streams": [ - { - "stream": { - "name": "list_payments", - "json_schema": {}, - "source_defined_cursor": true, - "default_cursor_field": ["update_time"], - "supported_sync_modes": ["full_refresh", "incremental"] - }, - "sync_mode": "incremental", - "destination_sync_mode": "append" - } - ] -} \ No newline at end of file + "streams": [ + { + "stream": { + "name": "list_payments", + "json_schema": {}, + "source_defined_cursor": true, + "default_cursor_field": ["update_time"], + "supported_sync_modes": ["full_refresh", "incremental"] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json index 2d054072e24e..32b0401ece61 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/configured_catalog_search_invoices.json @@ -11,4 +11,4 @@ "destination_sync_mode": "append" } ] -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index 91b585c38f5a..3982933562ab 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -6,7 +6,7 @@ from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ - "airbyte-cdk>=0.61.2", + "airbyte-cdk>=0.62.0", ] TEST_REQUIREMENTS = [ diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py index 685367064932..af883e9c1c19 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/components.py @@ -6,16 +6,14 @@ import logging from dataclasses import dataclass from datetime import datetime, timedelta +from typing import Any, Iterable, Mapping, MutableMapping, Optional import backoff import requests from airbyte_cdk.sources.declarative.auth import DeclarativeOauth2Authenticator -from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester -from airbyte_cdk.sources.declarative.types import StreamState, StreamSlice -from typing import Any, MutableMapping, Optional, Mapping, Iterable - - +from airbyte_cdk.sources.declarative.types import StreamSlice, StreamState +from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException logger = logging.getLogger("airbyte") @@ -61,28 +59,21 @@ def _get_refresh_access_token_response(self): request_body = self.build_refresh_request_body() logger.info(f"Sending request to URL: {request_url}") - - response = requests.request( - method="POST" - , url=request_url - , data=request_body - , headers=request_headers - ) + + response = requests.request(method="POST", url=request_url, data=request_body, headers=request_headers) self._log_response(response) response.raise_for_status() - + response_json = response.json() - self.access_token = response_json.get('access_token') + self.access_token = response_json.get("access_token") return response.json() - + except requests.exceptions.RequestException as e: if e.response and (e.response.status_code == 429 or e.response.status_code >= 500): raise DefaultBackoffException(request=e.response.request, response=e.response) raise except Exception as e: raise Exception(f"Error while refreshing access token: {e}") from e - - diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index 0e2e1a348a1a..e566c2d7abb8 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -70,7 +70,7 @@ definitions: fields: all error_handler: type: CompositeErrorHandler - error_handlers: + error_handlers: - type: DefaultErrorHandler description: "Handle HTTP 400 with error message: Data for the given start date is not available. " response_filters: @@ -119,7 +119,7 @@ definitions: $parameters: path: "v1/reporting/transactions" field_path: transaction_details - + #Stream balances #Paypal API only has V1 for this stream balances_stream: @@ -164,7 +164,7 @@ definitions: inject_into: request_parameter $parameters: path: "v1/reporting/balances" - + #New Stream - List Product #Paypal API only has V1 for this stream list_products_stream: @@ -182,13 +182,13 @@ definitions: start_from_page: 1 page_size: 20 page_token_option: - type: RequestOption - inject_into: request_parameter - field_name: page + type: RequestOption + inject_into: request_parameter + field_name: page page_size_option: - inject_into: request_parameter - field_name: page_size - type: RequestOption + inject_into: request_parameter + field_name: page_size + type: RequestOption requester: $ref: "#/definitions/requester" http_method: GET @@ -224,9 +224,9 @@ definitions: - type: ParentStreamConfig parent_key: "id" partition_field: "id" - stream: + stream: $ref: "#/definitions/list_products_stream" - + #Stream List Disputes #Paypal API only has V1 for this stream list_disputes_stream: @@ -248,9 +248,9 @@ definitions: inject_into: request_parameter field_name: page_size pagination_strategy: - type: PageIncrement - start_from_page: 1 - page_size: 50 + type: PageIncrement + start_from_page: 1 + page_size: 50 requester: $ref: "#/definitions/requester" http_method: GET @@ -289,7 +289,7 @@ definitions: path: "v1/customer/disputes" field_path: items - #Stream Search Invoices + #Stream Search Invoices # Currently it does not support incremental sync as metadata does not contain last_update_date search_invoices_stream: type: DeclarativeStream @@ -323,11 +323,11 @@ definitions: start: "{{ config['start_date'] }}" end: >- {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} - #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items - path: "v2/invoicing/search-invoices" - + path: "v2/invoicing/search-invoices" + #Stream List Payments #Currently uses V1 which is about to be derecated #But there is no endpoint in v2 for listing payments @@ -397,4 +397,4 @@ streams: check: stream_names: - - "balances" \ No newline at end of file + - "balances" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json index 2b0711b67149..8d4c9ff57a97 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_disputes.json @@ -1,32 +1,32 @@ { - "$schema": "https://json-schema.org/draft-07/schema#", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "dispute_id": { "type": ["null", "string"] }, - "create_time": { "type": "string", "format": "date-time" }, - "update_time": { "type": "string", "format": "date-time" }, - "updated_time_cut": { "type": "string", "format": "date-time" }, - "status": { "type": ["null", "string"] }, - "reason": { "type": ["null", "string"] }, - "dispute_state": { "type": ["null", "string"] }, - "dispute_amount": { + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "dispute_id": { "type": ["null", "string"] }, + "create_time": { "type": "string", "format": "date-time" }, + "update_time": { "type": "string", "format": "date-time" }, + "updated_time_cut": { "type": "string", "format": "date-time" }, + "status": { "type": ["null", "string"] }, + "reason": { "type": ["null", "string"] }, + "dispute_state": { "type": ["null", "string"] }, + "dispute_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "links": { + "type": ["null", "array"], + "items": { "type": ["null", "object"], "properties": { - "currency_code": { "type": ["null", "string"] }, - "value": { "type": ["null", "string"] } - } - }, - "links": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "href": {"type": ["null", "string"]}, - "rel": {"type": ["null", "string"]}, - "method": {"type": ["null", "string"]} - } + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } - } \ No newline at end of file + } +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json index bbfed47c59b5..6ce37d9d6d3e 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_payments.json @@ -1,26 +1,97 @@ { - "$schema": "https://json-schema.org/draft-07/schema#", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "string"] }, - "intent": { "type": ["null", "string"] }, - "state": { "type": ["null", "string"] }, - "cart": { "type": ["null", "string"] }, - "payer": { - "type": ["null", "object"], - "additionalProperties": true, + "$schema": "https://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "intent": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "cart": { "type": ["null", "string"] }, + "payer": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "payment_method": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, + "payer_info": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "email": { "type": ["null", "string"] }, + "first_name": { "type": ["null", "string"] }, + "last_name": { "type": ["null", "string"] }, + "payer_id": { "type": ["null", "string"] }, + "shipping_address": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "recipient_name": { "type": ["null", "string"] }, + "line1": { "type": ["null", "string"] }, + "city": { "type": ["null", "string"] }, + "state": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + }, + "phone": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] } + } + } + } + }, + "transactions": { + "type": ["null", "array"], + "items": { + "type": "object", "properties": { - "payment_method": { "type": ["null", "string"] }, - "status": { "type": ["null", "string"] }, - "payer_info": { + "reference_id": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } + } + } + } + }, + "payee": { "type": ["null", "object"], "additionalProperties": true, "properties": { - "email": { "type": ["null", "string"] }, - "first_name": { "type": ["null", "string"] }, - "last_name": { "type": ["null", "string"] }, - "payer_id": { "type": ["null", "string"] }, + "merchant_id": { "type": ["null", "string"] }, + "email": { "type": ["null", "string"] } + } + }, + "description": { "type": ["null", "string"] }, + "item_list": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "items": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "price": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "tax": { "type": ["null", "string"] }, + "quantity": { "type": ["null", "integer"] }, + "image_url": { "type": ["null", "string"] } + } + } + }, "shipping_address": { "type": ["null", "object"], "additionalProperties": true, @@ -32,141 +103,73 @@ "postal_code": { "type": ["null", "string"] }, "country_code": { "type": ["null", "string"] } } - }, - "phone": { "type": ["null", "string"] }, - "country_code": { "type": ["null", "string"] } - } - } - } - }, - "transactions": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "reference_id": { "type": ["null", "string"] }, - "amount": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "total": { "type": ["null", "string"] }, - "currency": { "type": ["null", "string"] }, - "details": { - "type": ["null", "object"], - "properties": { - "subtotal": { "type": ["null", "string"] }, - "shipping": { "type": ["null", "string"] }, - "insurance": { "type": ["null", "string"] }, - "handling_fee": { "type": ["null", "string"] }, - "shipping_discount": { "type": ["null", "string"] }, - "discount": { "type": ["null", "string"] } - } - } } - }, - "payee": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "merchant_id": { "type": ["null", "string"] }, - "email": { "type": ["null", "string"] } - } - }, - "description": { "type": ["null", "string"] }, - "item_list": { - "type": ["null", "object"], - "additionalProperties": true, + } + }, + "related_resources": { + "type": ["null", "array"], + "items": { + "type": "object", "properties": { - "items": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "name": { "type": ["null", "string"] }, - "description": { "type": ["null", "string"] }, - "price": { "type": ["null", "string"] }, - "currency": { "type": ["null", "string"] }, - "tax": { "type": ["null", "string"] }, - "quantity": { "type": ["null", "integer"] }, - "image_url": { "type": ["null", "string"] } - } - } - }, - "shipping_address": { + "sale": { "type": ["null", "object"], "additionalProperties": true, "properties": { - "recipient_name": { "type": ["null", "string"] }, - "line1": { "type": ["null", "string"] }, - "city": { "type": ["null", "string"] }, + "id": { "type": ["null", "string"] }, "state": { "type": ["null", "string"] }, - "postal_code": { "type": ["null", "string"] }, - "country_code": { "type": ["null", "string"] } - } - } - } - }, - "related_resources": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "sale": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "string"] }, - "state": { "type": ["null", "string"] }, - "amount": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "total": { "type": ["null", "string"] }, - "currency": { "type": ["null", "string"] }, - "details": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "subtotal": { "type": ["null", "string"] }, - "shipping": { "type": ["null", "string"] }, - "insurance": { "type": ["null", "string"] }, - "handling_fee": { "type": ["null", "string"] }, - "shipping_discount": { "type": ["null", "string"] }, - "discount": { "type": ["null", "string"] } - } + "amount": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "total": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] }, + "details": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "subtotal": { "type": ["null", "string"] }, + "shipping": { "type": ["null", "string"] }, + "insurance": { "type": ["null", "string"] }, + "handling_fee": { "type": ["null", "string"] }, + "shipping_discount": { "type": ["null", "string"] }, + "discount": { "type": ["null", "string"] } } } - }, - "payment_mode": { "type": ["null", "string"] }, - "protection_eligibility": { "type": ["null", "string"] }, - "protection_eligibility_type": { "type": ["null", "string"] }, - "transaction_fee": { - "type": ["null", "object"], - "additionalProperties": true, + } + }, + "payment_mode": { "type": ["null", "string"] }, + "protection_eligibility": { "type": ["null", "string"] }, + "protection_eligibility_type": { + "type": ["null", "string"] + }, + "transaction_fee": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "value": { "type": ["null", "string"] }, + "currency": { "type": ["null", "string"] } + } + }, + "purchase_unit_reference_id": { + "type": ["null", "string"] + }, + "parent_payment": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", "properties": { - "value": { "type": ["null", "string"] }, - "currency": { "type": ["null", "string"] } - } - }, - "purchase_unit_reference_id": { "type": ["null", "string"] }, - "parent_payment": { "type": ["null", "string"] }, - "create_time": { - "type": ["null", "string"], - "format": "date-time" - }, - "update_time": { - "type": ["null", "string"], - "format": "date-time" - }, - "links": { - "type": "array", - "items": { - "type": "object", - "properties": { - "href": { "type": ["null", "string"] }, - "rel": { "type": ["null", "string"] }, - "method": { "type": ["null", "string"] } - } + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } @@ -176,26 +179,26 @@ } } } - }, - "create_time": { - "type": ["null", "string"], - "format": "date-time" - }, - "update_time": { - "type": ["null", "string"], - "format": "date-time" - }, - "links": { - "type": "array", - "items": { - "type": "object", - "properties": { - "href": { "type": ["null", "string"] }, - "rel": { "type": ["null", "string"] }, - "method": { "type": ["null", "string"] } - } + } + }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } + } } - \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json index d587291c7550..b700519c4c72 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/list_products.json @@ -6,7 +6,7 @@ "id": { "type": ["null", "string"] }, "name": { "type": ["null", "string"] }, "description": { "type": ["null", "string"] }, - "create_time": { + "create_time": { "type": ["null", "string"], "format": "date-time" }, @@ -16,9 +16,9 @@ "type": "object", "additionalProperties": true, "properties": { - "href": {"type": ["null", "string"]}, - "rel": {"type": ["null", "string"]}, - "method": {"type": ["null", "string"]} + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json index 5505ce1f73db..e0887a02b9e1 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/search_invoices.json @@ -1,340 +1,357 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "id": { "type": ["null", "string"] }, - "status": { "type": ["null", "string"] }, - "primary_recipients": { - "type": ["null", "array"], - "items": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "id": { "type": ["null", "string"] }, + "status": { "type": ["null", "string"] }, + "primary_recipients": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "billing_info": { + "type": ["null", "object"], + "properties": { + "business_name": { "type": ["null", "string"] }, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": { "type": ["null", "string"] }, + "given_name": { "type": ["null", "string"] }, + "surname": { "type": ["null", "string"] }, + "middle_name": { "type": ["null", "string"] }, + "suffix": { "type": ["null", "string"] }, + "alternate_full_name": { "type": ["null", "string"] }, + "full_name": { "type": ["null", "string"] } + } + }, + "address": { "type": ["null", "object"], "properties": { - "billing_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} - } - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "address_line_4": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]}, - "phones": {"type": ["null", "array"]}, - "additiona_info": {"type": ["null", "string"]}, - "email_address": {"type": ["null", "string"]}, - "language": {"type": ["null", "string"]} - } - } - } - }, - "shipping_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} - } - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "address_line_4": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]} - } - } - } - } - + "address_line_1": { "type": ["null", "string"] }, + "address_line_2": { "type": ["null", "string"] }, + "address_line_3": { "type": ["null", "string"] }, + "address_line_4": { "type": ["null", "string"] }, + "admin_area_1": { "type": ["null", "string"] }, + "admin_area_2": { "type": ["null", "string"] }, + "admin_area_3": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] }, + "address_details": { "type": ["null", "object"] }, + "phones": { "type": ["null", "array"] }, + "additiona_info": { "type": ["null", "string"] }, + "email_address": { "type": ["null", "string"] }, + "language": { "type": ["null", "string"] } } + } } - }, - "additional_recipients": { "type": ["null", "array"]}, - "detail": { + }, + "shipping_info": { "type": ["null", "object"], "properties": { - "reference": { "type": ["null", "string"] }, - "note": { "type": ["null", "string"] }, - "terms_and_conditions": { "type": ["null", "string"] }, - "memo": { "type": ["null", "string"] }, - "attachments": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "id": { "type": ["null", "string"] }, - "reference_url": { "type": ["null", "string"] }, - "content_type": { "type": ["null", "string"] }, - "size": { "type": ["null", "string"] }, - "create_time": { "type": ["null", "string"] } - } - } - }, - "currency_code": { "type": ["null", "string"] }, - "invoice_number": { "type": ["null", "string"] }, - "invoice_date": { "type": ["null", "string"], "format": "date" }, - "payment_term": { - "type": ["null", "object"], - "properties": { - "term_type": { "type": ["null", "string"]}, - "due_date": { "type": ["null", "string"], "format": "date" } - } - }, - "metadata": { - "type": ["null", "object"], - "properties": { - "created_by": { "type": ["null", "string"]}, - "last_updated_by": { "type": ["null", "string"]}, - "create_time": { "type": ["null", "string"], "format": "date-time" }, - "last_update_time": { "type": ["null", "string"], "format": "date-time" }, - "cancelled_by": { "type": ["null", "string"]}, - "last_seen_by": { "type": ["null", "string"]}, - "recipient_view_url": { "type": ["null", "string"]}, - "invoicer_view_url": { "type": ["null", "string"]}, - "cancel_time": { "type": ["null", "string"], "format": "date-time" }, - "first_sent_time": { "type": ["null", "string"], "format": "date-time" }, - "last_sent_time": { "type": ["null", "string"], "format": "date-time" }, - "created_by_flow": { "type": ["null", "string"]} - } - } + "business_name": { "type": ["null", "string"] }, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": { "type": ["null", "string"] }, + "given_name": { "type": ["null", "string"] }, + "surname": { "type": ["null", "string"] }, + "middle_name": { "type": ["null", "string"] }, + "suffix": { "type": ["null", "string"] }, + "alternate_full_name": { "type": ["null", "string"] }, + "full_name": { "type": ["null", "string"] } + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": { "type": ["null", "string"] }, + "address_line_2": { "type": ["null", "string"] }, + "address_line_3": { "type": ["null", "string"] }, + "address_line_4": { "type": ["null", "string"] }, + "admin_area_1": { "type": ["null", "string"] }, + "admin_area_2": { "type": ["null", "string"] }, + "admin_area_3": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] }, + "address_details": { "type": ["null", "object"] } + } } - }, - "last_update_time": { - "type": ["null", "string"], - "format": "date-time" - }, - "invoicer": { - "type": ["null", "object"], - "properties": { - "business_name": { "type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]} - }, - "phones": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "country_code": {"type": ["null", "string"]}, - "national_number": {"type": ["null", "string"]}, - "extension_number": {"type": ["null", "string"]}, - "phone_type": {"type": ["null", "string"]} - } - } - }, - "website": {"type": ["null", "string"]}, - "tax_id": {"type": ["null", "string"]}, - "additional_notes": {"type": ["null", "string"]}, - "email_address": { "type": ["null", "string"]} } - } - - } - }, - "configuration": { - "type": ["null", "object"], - "properties": { - "tax_calculated_after_discount": {"type": ["null", "string"]}, - "tax_inclusive": {"type": ["null", "string"]}, - "allow_tip": {"type": ["null", "string"]}, - "partial_payment": { - "type": ["null", "object"], - "properties": { - "allow_partial_payment": {"type": ["null", "string"]}, - "minimum_amount_due": {"type": ["null", "object"]} - } - }, - "template_id": {"type": ["null", "string"]} - } - }, - "amount": { + } + } + }, + "additional_recipients": { "type": ["null", "array"] }, + "detail": { + "type": ["null", "object"], + "properties": { + "reference": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "terms_and_conditions": { "type": ["null", "string"] }, + "memo": { "type": ["null", "string"] }, + "attachments": { + "type": ["null", "array"], + "items": { "type": ["null", "object"], "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]}, - "breakdown": { - "type": ["null", "object"], - "properties": { - "item_total": {"type": ["null", "object"]}, - "discount": {"type": ["null", "object"]}, - "tax_total": {"type": ["null", "object"]}, - "shipping": {"type": ["null", "object"]}, - "custom": {"type": ["null", "object"]} - } - } + "id": { "type": ["null", "string"] }, + "reference_url": { "type": ["null", "string"] }, + "content_type": { "type": ["null", "string"] }, + "size": { "type": ["null", "string"] }, + "create_time": { "type": ["null", "string"] } } + } }, - "due_amount": { - "type": ["null", "object"], - "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} - } + "currency_code": { "type": ["null", "string"] }, + "invoice_number": { "type": ["null", "string"] }, + "invoice_date": { "type": ["null", "string"], "format": "date" }, + "payment_term": { + "type": ["null", "object"], + "properties": { + "term_type": { "type": ["null", "string"] }, + "due_date": { "type": ["null", "string"], "format": "date" } + } }, - "gratuity": { + "metadata": { + "type": ["null", "object"], + "properties": { + "created_by": { "type": ["null", "string"] }, + "last_updated_by": { "type": ["null", "string"] }, + "create_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "last_update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "cancelled_by": { "type": ["null", "string"] }, + "last_seen_by": { "type": ["null", "string"] }, + "recipient_view_url": { "type": ["null", "string"] }, + "invoicer_view_url": { "type": ["null", "string"] }, + "cancel_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "first_sent_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "last_sent_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "created_by_flow": { "type": ["null", "string"] } + } + } + } + }, + "last_update_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "invoicer": { + "type": ["null", "object"], + "properties": { + "business_name": { "type": ["null", "string"] }, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": { "type": ["null", "string"] }, + "given_name": { "type": ["null", "string"] }, + "surname": { "type": ["null", "string"] }, + "middle_name": { "type": ["null", "string"] }, + "suffix": { "type": ["null", "string"] }, + "alternate_full_name": { "type": ["null", "string"] }, + "full_name": { "type": ["null", "string"] } + }, + "address": { "type": ["null", "object"], "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} - } - }, - "payments": { - "transactions": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "payment_id": { "type": ["null", "string"] }, - "note": { "type": ["null", "string"] }, - "type": { "type": ["null", "string"] }, - "payment_date":{ "type": ["null", "string"], "format": "date-time" }, - "method": { "type": ["null", "string"] }, - "amount": { - "type": ["null", "object"], - "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} - } - }, - "shipping_info": { - "type": ["null", "object"], - "properties": { - "business_name": {"type": ["null", "string"]}, - "name": { - "type": ["null", "object"], - "properties": { - "prefix": {"type": ["null", "string"]}, - "given_name": {"type": ["null", "string"]}, - "surname": {"type": ["null", "string"]}, - "middle_name": {"type": ["null", "string"]}, - "suffix": {"type": ["null", "string"]}, - "alternate_full_name": {"type": ["null", "string"]}, - "full_name": {"type": ["null", "string"]} - } - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": {"type": ["null", "string"]}, - "address_line_2": {"type": ["null", "string"]}, - "address_line_3": {"type": ["null", "string"]}, - "admin_area_1": {"type": ["null", "string"]}, - "admin_area_2": {"type": ["null", "string"]}, - "admin_area_3": {"type": ["null", "string"]}, - "postal_code": {"type": ["null", "string"]}, - "country_code": {"type": ["null", "string"]}, - "address_details": {"type": ["null", "object"]} - - } - } - } - } - } - } + "address_line_1": { "type": ["null", "string"] }, + "address_line_2": { "type": ["null", "string"] }, + "address_line_3": { "type": ["null", "string"] }, + "admin_area_1": { "type": ["null", "string"] }, + "admin_area_2": { "type": ["null", "string"] }, + "admin_area_3": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] }, + "address_details": { "type": ["null", "object"] } }, - "paid_amount": { + "phones": { + "type": ["null", "array"], + "items": { "type": ["null", "object"], "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} + "country_code": { "type": ["null", "string"] }, + "national_number": { "type": ["null", "string"] }, + "extension_number": { "type": ["null", "string"] }, + "phone_type": { "type": ["null", "string"] } } - } + } + }, + "website": { "type": ["null", "string"] }, + "tax_id": { "type": ["null", "string"] }, + "additional_notes": { "type": ["null", "string"] }, + "email_address": { "type": ["null", "string"] } + } + } + } + }, + "configuration": { + "type": ["null", "object"], + "properties": { + "tax_calculated_after_discount": { "type": ["null", "string"] }, + "tax_inclusive": { "type": ["null", "string"] }, + "allow_tip": { "type": ["null", "string"] }, + "partial_payment": { + "type": ["null", "object"], + "properties": { + "allow_partial_payment": { "type": ["null", "string"] }, + "minimum_amount_due": { "type": ["null", "object"] } + } }, - "refunds": { - "transactions": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "refund_id": { "type": ["null", "string"] }, - "type": { "type": ["null", "string"] }, - "refund_date":{ "type": ["null", "string"], "format": "date-time" }, - "method": { "type": ["null", "string"] }, - "amount": { - "type": ["null", "object"], - "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} - } - } - } - } + "template_id": { "type": ["null", "string"] } + } + }, + "amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] }, + "breakdown": { + "type": ["null", "object"], + "properties": { + "item_total": { "type": ["null", "object"] }, + "discount": { "type": ["null", "object"] }, + "tax_total": { "type": ["null", "object"] }, + "shipping": { "type": ["null", "object"] }, + "custom": { "type": ["null", "object"] } + } + } + } + }, + "due_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "gratuity": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "payments": { + "transactions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "payment_id": { "type": ["null", "string"] }, + "note": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "payment_date": { + "type": ["null", "string"], + "format": "date-time" }, - "refund_amount": { - "type": ["null", "object"], - "properties": { - "currency_code": {"type": ["null", "string"]}, - "value": {"type": ["null", "string"]} + "method": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + }, + "shipping_info": { + "type": ["null", "object"], + "properties": { + "business_name": { "type": ["null", "string"] }, + "name": { + "type": ["null", "object"], + "properties": { + "prefix": { "type": ["null", "string"] }, + "given_name": { "type": ["null", "string"] }, + "surname": { "type": ["null", "string"] }, + "middle_name": { "type": ["null", "string"] }, + "suffix": { "type": ["null", "string"] }, + "alternate_full_name": { "type": ["null", "string"] }, + "full_name": { "type": ["null", "string"] } + } + }, + "address": { + "type": ["null", "object"], + "properties": { + "address_line_1": { "type": ["null", "string"] }, + "address_line_2": { "type": ["null", "string"] }, + "address_line_3": { "type": ["null", "string"] }, + "admin_area_1": { "type": ["null", "string"] }, + "admin_area_2": { "type": ["null", "string"] }, + "admin_area_3": { "type": ["null", "string"] }, + "postal_code": { "type": ["null", "string"] }, + "country_code": { "type": ["null", "string"] }, + "address_details": { "type": ["null", "object"] } + } } + } } - }, - "links": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "href": { "type": ["null", "string"], "format": "uri" }, - "rel": { "type": ["null", "string"] }, - "method": { "type": ["null", "string"] } - } + } + } + }, + "paid_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + } + }, + "refunds": { + "transactions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "refund_id": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "refund_date": { + "type": ["null", "string"], + "format": "date-time" + }, + "method": { "type": ["null", "string"] }, + "amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } } + } + } + }, + "refund_amount": { + "type": ["null", "object"], + "properties": { + "currency_code": { "type": ["null", "string"] }, + "value": { "type": ["null", "string"] } + } + } + }, + "links": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "href": { "type": ["null", "string"], "format": "uri" }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } + } } - } \ No newline at end of file + } +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json index 0316579b9b2d..822b85737f60 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/schemas/show_product_details.json @@ -2,28 +2,27 @@ "$schema": "https://json-schema.org/draft-07/schema#", "type": ["null", "object"], "additionalProperties": true, - "properties": { - "id": {"type": ["null", "string"]}, - "name": {"type": ["null", "string"]}, - "description": {"type": ["null", "string"]}, - "type": {"type": ["null", "string"]}, - "category": {"type": ["null", "string"]}, - "image_url": {"type": ["null", "string"]}, - "home_url": {"type": ["null", "string"]}, - "create_time": {"type": ["null", "string"], "format": "date-time"}, - "update_time": {"type": ["null", "string"], "format": "date-time"}, - "links": { - "type": "array", - "items": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "href": {"type": ["null", "string"]}, - "rel": {"type": ["null", "string"]}, - "method": {"type": ["null", "string"]} - } + "properties": { + "id": { "type": ["null", "string"] }, + "name": { "type": ["null", "string"] }, + "description": { "type": ["null", "string"] }, + "type": { "type": ["null", "string"] }, + "category": { "type": ["null", "string"] }, + "image_url": { "type": ["null", "string"] }, + "home_url": { "type": ["null", "string"] }, + "create_time": { "type": ["null", "string"], "format": "date-time" }, + "update_time": { "type": ["null", "string"], "format": "date-time" }, + "links": { + "type": "array", + "items": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "href": { "type": ["null", "string"] }, + "rel": { "type": ["null", "string"] }, + "method": { "type": ["null", "string"] } } } } + } } - \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index 6ccfaa6f25d5..767e7907fd8e 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -2,9 +2,11 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource import logging + from airbyte_cdk import AirbyteLogger +from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource + logger = logging.getLogger("airbyte") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml index 0357797ee717..d8217490029f 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -62,4 +62,4 @@ connectionSpecification: description: "The number of days per request. Must be a number between 1 and 31." default: 7 minimum: 1 - maximum: 31 \ No newline at end of file + maximum: 31 diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py index 3902530ac51e..ef781a857d46 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py @@ -1,12 +1,15 @@ -import pytest -import requests_mock -import time +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + import logging -import requests +import time from unittest.mock import patch -from source_paypal_transaction.components import PayPalOauth2Authenticator +import pytest +import requests +import requests_mock from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException +from source_paypal_transaction.components import PayPalOauth2Authenticator + @pytest.fixture def mock_authenticator(): diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py index 658d5e29af7a..06dd08dc74a6 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/conftest.py @@ -1,9 +1,11 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + # conftest.py -import pytest import json from datetime import datetime from unittest.mock import patch +import pytest from source_paypal_transaction import SourcePaypalTransaction diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py index ccfeb33e4afd..a6be3eb1f19b 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py @@ -1,4 +1,7 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + from source_paypal_transaction import SourcePaypalTransaction + def test_source(): assert SourcePaypalTransaction() \ No newline at end of file From 710ad0f58bdbbc38aa44c75f55cff8cc31d293c1 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 8 Feb 2024 00:01:19 -0600 Subject: [PATCH 20/36] Comment out Sandbox tests. Leave only configg.json for CI tests --- .../acceptance-test-config.yml | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index 944d566eec08..bd5c7bf914dc 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -12,10 +12,10 @@ acceptance_tests: backward_compatibility_tests_config: disable_for_version: "0.1.13" #Test With Sandbox Credentials - - spec_path: "source_paypal_transaction/spec.yaml" - config_path: secrets/config_sandbox.json - backward_compatibility_tests_config: - disable_for_version: "0.1.13" + # - spec_path: "source_paypal_transaction/spec.yaml" + # config_path: secrets/config_sandbox.json + # backward_compatibility_tests_config: + # disable_for_version: "0.1.13" connection: tests: #Test With Prod Credentials @@ -25,53 +25,29 @@ acceptance_tests: - config_path: integration_tests/sample_files/invalid_config.json status: failed #Test with Sandbox Credentials - - config_path: secrets/config_sandbox.json - status: succeed + # - config_path: secrets/config_sandbox.json + # status: succeed discovery: tests: - config_path: secrets/config.json backward_compatibility_tests_config: disable_for_version: "2.0.0" # Change in cursor field for transactions stream - - config_path: secrets/config_sandbox.json - backward_compatibility_tests_config: - disable_for_version: "2.0.0" # Change in cursor field for transactions stream + # - config_path: secrets/config_sandbox.json + # backward_compatibility_tests_config: + # disable_for_version: "2.0.0" # Change in cursor field for transactions stream basic_read: tests: #Test Prod Environment - Uncomment and change according to your prod setup #Change the expected records, remember to align them with the timeframe you have selected #Do not select streams that take more than 5 mins to load data as that can lead to timeouts - # - config_path: secrets/config.json - # empty_streams: - # - name: show_product_details - # bypass_reason: "Products may not exist" - # - name: list_products - # bypass_reason: "Product List may be too big causing timeout errors" - # - name: search_invoices - # bypass_reason: "Order makes the diff fail." - # ignored_fields: - # balances: - # - name: last_refresh_time - # bypass_reason: "field changes during every read" - # list_products: - # - name: description - # bypass_reason: "Sometimes it is not contained in the response" - # timeout_seconds: 3200 - # expect_records: - # path: "integration_tests/sample_files/expected_records.jsonl" - # extra_fields: yes - # exact_order: yes - # extra_records: no - # fail_on_extra_columns: False - ################## - ## Test Sandbox ## - - config_path: secrets/config_sandbox.json + - config_path: secrets/config.json empty_streams: - name: show_product_details bypass_reason: "Products may not exist" - - name: list_disputes - bypass_reason: "There may not be Disputes in the Sandbox" + - name: list_products + bypass_reason: "Product List may be too big causing timeout errors" - name: search_invoices - bypass_reason: "Retrieval Order makes the diff fail." + bypass_reason: "Order makes the diff fail." ignored_fields: balances: - name: last_refresh_time @@ -79,13 +55,37 @@ acceptance_tests: list_products: - name: description bypass_reason: "Sometimes it is not contained in the response" - timeout_seconds: 1200 + timeout_seconds: 3200 expect_records: - path: "integration_tests/sample_files/expected_records_sandbox.jsonl" - extra_fields: no - exact_order: no - extra_records: yes - fail_on_extra_columns: false + path: "integration_tests/sample_files/expected_records.jsonl" + extra_fields: yes + exact_order: yes + extra_records: no + fail_on_extra_columns: False + ################## + ## Test Sandbox ## + # - config_path: secrets/config_sandbox.json + # empty_streams: + # - name: show_product_details + # bypass_reason: "Products may not exist" + # - name: list_disputes + # bypass_reason: "There may not be Disputes in the Sandbox" + # - name: search_invoices + # bypass_reason: "Retrieval Order makes the diff fail." + # ignored_fields: + # balances: + # - name: last_refresh_time + # bypass_reason: "field changes during every read" + # list_products: + # - name: description + # bypass_reason: "Sometimes it is not contained in the response" + # timeout_seconds: 1200 + # expect_records: + # path: "integration_tests/sample_files/expected_records_sandbox.jsonl" + # extra_fields: no + # exact_order: no + # extra_records: yes + # fail_on_extra_columns: false incremental: tests: - config_path: secrets/config.json From 106c760775906e144cb20cc2e99f517f7a59e6ea Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 8 Feb 2024 00:25:49 -0600 Subject: [PATCH 21/36] Add empty streams to pass CI tests using GSM sandbox credentials --- .../acceptance-test-config.yml | 37 +++---------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index bd5c7bf914dc..d9f0caa57a58 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -1,6 +1,7 @@ # See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) # for more information about how to configure these tests # Make sure the paths you have in each path matches with your data. +#For multiple env testing, you can duplicate the tests and change the path to the proper credentials file connector_image: airbyte/source-paypal-transaction:dev test_strictness_level: high acceptance_tests: @@ -11,11 +12,6 @@ acceptance_tests: config_path: secrets/config.json backward_compatibility_tests_config: disable_for_version: "0.1.13" - #Test With Sandbox Credentials - # - spec_path: "source_paypal_transaction/spec.yaml" - # config_path: secrets/config_sandbox.json - # backward_compatibility_tests_config: - # disable_for_version: "0.1.13" connection: tests: #Test With Prod Credentials @@ -32,14 +28,12 @@ acceptance_tests: - config_path: secrets/config.json backward_compatibility_tests_config: disable_for_version: "2.0.0" # Change in cursor field for transactions stream - # - config_path: secrets/config_sandbox.json - # backward_compatibility_tests_config: - # disable_for_version: "2.0.0" # Change in cursor field for transactions stream basic_read: tests: #Test Prod Environment - Uncomment and change according to your prod setup #Change the expected records, remember to align them with the timeframe you have selected #Do not select streams that take more than 5 mins to load data as that can lead to timeouts + #You can comment the lines if you are sure you have data for the below streams. - config_path: secrets/config.json empty_streams: - name: show_product_details @@ -48,6 +42,9 @@ acceptance_tests: bypass_reason: "Product List may be too big causing timeout errors" - name: search_invoices bypass_reason: "Order makes the diff fail." + #Have to add for testing PR CI. + - name: lidt_disputes + bypass_reason: "Disputes may not exist." ignored_fields: balances: - name: last_refresh_time @@ -62,30 +59,6 @@ acceptance_tests: exact_order: yes extra_records: no fail_on_extra_columns: False - ################## - ## Test Sandbox ## - # - config_path: secrets/config_sandbox.json - # empty_streams: - # - name: show_product_details - # bypass_reason: "Products may not exist" - # - name: list_disputes - # bypass_reason: "There may not be Disputes in the Sandbox" - # - name: search_invoices - # bypass_reason: "Retrieval Order makes the diff fail." - # ignored_fields: - # balances: - # - name: last_refresh_time - # bypass_reason: "field changes during every read" - # list_products: - # - name: description - # bypass_reason: "Sometimes it is not contained in the response" - # timeout_seconds: 1200 - # expect_records: - # path: "integration_tests/sample_files/expected_records_sandbox.jsonl" - # extra_fields: no - # exact_order: no - # extra_records: yes - # fail_on_extra_columns: false incremental: tests: - config_path: secrets/config.json From 341abc383281a008fd2a9f5a45e1b64baaff7230 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 8 Feb 2024 00:47:16 -0600 Subject: [PATCH 22/36] Fix format JS. Validate records and streams --- .../source-paypal-transaction/acceptance-test-config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index d9f0caa57a58..fcee35ba4a7d 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -42,8 +42,8 @@ acceptance_tests: bypass_reason: "Product List may be too big causing timeout errors" - name: search_invoices bypass_reason: "Order makes the diff fail." - #Have to add for testing PR CI. - - name: lidt_disputes + #Have to add for testing PR CI. + - name: list_disputes bypass_reason: "Disputes may not exist." ignored_fields: balances: @@ -54,7 +54,7 @@ acceptance_tests: bypass_reason: "Sometimes it is not contained in the response" timeout_seconds: 3200 expect_records: - path: "integration_tests/sample_files/expected_records.jsonl" + path: "integration_tests/sample_files/expected_records_sandbox.jsonl" extra_fields: yes exact_order: yes extra_records: no From 93e7687efcffe89b60fce5d22acde87c921f2572 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 15 Feb 2024 15:09:10 -0600 Subject: [PATCH 23/36] Fix comments. Add test and test files --- .../source-paypal-transaction/README.md | 95 +++- .../acceptance-test-config.yml | 5 + .../source-paypal-transaction/bin/invoices.py | 19 + .../bin/product_catalog.py | 34 +- .../sample_files/sample_config.json | 10 +- .../source-paypal-transaction/metadata.yaml | 2 +- .../source-paypal-transaction/setup.py | 5 +- .../source_paypal_transaction/manifest.yaml | 3 +- .../source_paypal_transaction/source.py | 5 - .../unit_tests/auth_components_test.py | 2 + .../unit_tests/pagination_cursor.py | 146 ++++++ .../unit_tests/pagination_increment.py | 79 +++ .../unit_tests/test_files/page_1.json | 135 ++++++ .../unit_tests/test_files/page_2.json | 160 +++++++ .../token_PAY-0L38757939422510JMW5ZJVA.json | 451 ++++++++++++++++++ .../token_PAYID-MW5XXZY5YL87592N34454913.json | 391 +++++++++++++++ .../test_files/token_page_init.json | 399 ++++++++++++++++ .../unit_tests/test_source.py | 7 - 18 files changed, 1917 insertions(+), 31 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_cursor.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_increment.py create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_1.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_2.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAY-0L38757939422510JMW5ZJVA.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAYID-MW5XXZY5YL87592N34454913.json create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_page_init.json delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/README.md b/airbyte-integrations/connectors/source-paypal-transaction/README.md index a451e1a48d23..76b879d9ba0c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/README.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/README.md @@ -5,6 +5,14 @@ For information about how to use this connector within Airbyte, see [the documen ## Local development +#### Prerequisites + * Python (~=3.9) + * Paypal Client ID and Client Secret + * If you are going to use the data generator scripts you need to setup yourPaypal Sandbox and a Buyer user in your sandbox, to simulate the data. YOu cna get that information in the [Apps & Credentials page](https://developer.paypal.com/dashboard/applications/live). + * Buyer Username + * Buyer Password + * Payer ID (Account ID) + #### Create credentials **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/paypal-transaction) to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_paypal_transaction/spec.yaml` file. @@ -16,7 +24,16 @@ and place them into `secrets/config.json`. ### Locally running the connector docker image +* You must have created your credentials under the `secrets/` folder +* For the read command, you can create separate catalogs to test the streams individually. All catalogs are under the folder `integration_tests`. Select the one you want to test with the read command. +``` +python main.py spec +python main.py check --config secrets/config.json +python main.py discover --config secrets/config.json +#Example with list_payments catalog and the debug flag +python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog_list_payments.json --debug +``` #### Use `airbyte-ci` to build your connector The Airbyte way of building this connector is to use our `airbyte-ci` tool. @@ -28,6 +45,7 @@ airbyte-ci connectors --name=source-paypal-transaction build ``` Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-paypal-transaction:dev`. + ##### Customizing our build process When contributing on our connector you might need to customize the build process to add a system dependency or set an env var. You can customize our build process by adding a `build_customization.py` module to your connector. @@ -89,16 +107,91 @@ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-paypal-transaction:dev docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-paypal-transaction:dev read --config /secrets/config_oauth.json --catalog /integration_tests/configured_catalog.json ``` -## Testing +## Testing with CI test suite You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md): ```bash airbyte-ci connectors --name=source-paypal-transaction test ``` +If you ar etesting locally, you can use your local credentials (config.json file) by using `--use-local-secrtes` + +```bash +airbyte-ci connectors --name source-paypal-transaction --use-local-secrets test +``` + ### Customizing acceptance Tests Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. +## Running Unit tests locally + +To run unit tests locally, form the root `source_paypal_transaction` directory run: + +```bash +python -m pytest unit_test +``` + +## Test changes in the sandbox + +If you have a [Paypal Sandbox](https://developer.paypal.com/tools/sandbox/accounts/) you will be able to use some APIs to create new data and test how data is being created in your destinaiton and choose the best syn strategy that suits better your use case. +Some endpoints will require special permissions on the sandbox to update and change some values. + +In the `bin` folder you will find several data generator scripts: + +* **disputes_generator.py:** + * Update dispute: Uses the _PATCH_ method of the `https://api-m.paypal.com/v1/customer/disputes/{dispute_id}` endpoint. You need the ID and create a payload to pass it as an argument. See more information [here](https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_patch). + + ```bash + python disputes_generator.py update DISPUTE_ID ''[{"op": "replace", "path": "/reason", "value": "The new reason"}]' + ``` + + * Update Evidence status: Uses the _POST_ method of the `https://api-m.paypal.com/v1/customer/disputes/{dispute_id}/require-evidence` endpoint. You need the ID and select an option to pass it as an argument. See more information [here](https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_require-evidence) + ```bash + python update_dispute.py require-evidence DISPUTE_ID SELLER_EVIDENCE + ``` + +* **invoices.py:** + * Create draft invoice: Uses the _POST_ method of the `https://api-m.sandbox.paypal.com/v2/invoicing/invoices` endpoint. It will automatically generate an invoice (no need to pass any parameters). See more information [here](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_create). + + ```bash + python invoices.py create_draft + ``` + + * Send a Draft Invoice: Uses the _POST_ method of the `https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/send` endpoint. You need the Invoice ID, a subject and a note (just to have something to update) and an email as an argument. See more information [here](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_send) + ```bash + python invoices.py send_draft --invoice_id "INV2-XXXX-XXXX-XXXX-XXXX" --subject "Your Invoice Subject" --note "Your custom note" --additional_recipients example@email.com + ``` + +* **payments_generator.py:** + * Partially update payment: Uses the _PATCH_ method of the `https://api-m.paypal.com/v1/payments/payment/{payment_id}` endpoint. You need the payment ID and a payload with new values. (no need to pass any parameters). See more information [here](https://developer.paypal.com/docs/api/invoicing/v2/#invoices_create). + + ```bash + python script_name.py update PAYMENT_ID '[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "50.00", "currency": "USD"}}]' + ``` + +* **paypal_transaction_generator.py:** + Make sure you have the `buyer_username`, `buyer_password` and `payer_id` in your config file. You can get the sample configuratin in the `sample_config.json`. + + * Generate transactions: This uses Selenium, so you will be prompted to your account to simulate the complete transaction flow. You can add a number at the end of the command to do more than one transaction. By default the script runs 3 transactions. + + **NOTE: Be midnfu of the number of transactions, as it will be interacting with your machine, and you may not be able to use it while creating the transactions** + + ```bash + python paypal_transaction_generator.py [NUMBER_OF_DESIRED_TRANSACTIONS] + ``` + +* **product_catalog.py:** + * Create a product: Uses the _POST_ method of the `https://api-m.sandbox.paypal.com/v1/catalogs/products` endpoint. You need to add the description and the category in the command line. For the proper category see more information [here](https://developer.paypal.com/docs/api/catalog-products/v1/#products_create). + + ```bash + python product_catalog.py --action create --description "YOUR DESCRIPTION" --category PAYPAL_CATEGORY + ``` + + * Update a product: Uses the _PATCH_ method of the `https://developer.paypal.com/docs/api/catalog-products/v1/#products_patch` endpoint. You need the product ID, a description and the Category as an argument. See more information [here](https://developer.paypal.com/docs/api/catalog-products/v1/#products_patch) + ```bash + python product_catalog.py --action update --product_id PRODUCT_ID --update_payload '[{"op": "replace", "path": "/description", "value": "My Update. Does it changes it?"}]' + ``` + ## Dependency Management All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development. We split dependencies between two groups, dependencies that are: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml index fcee35ba4a7d..f4682c9534da 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-paypal-transaction/acceptance-test-config.yml @@ -26,6 +26,7 @@ acceptance_tests: discovery: tests: - config_path: secrets/config.json + # - config_path: secrets/config_sandbox.json backward_compatibility_tests_config: disable_for_version: "2.0.0" # Change in cursor field for transactions stream basic_read: @@ -35,6 +36,7 @@ acceptance_tests: #Do not select streams that take more than 5 mins to load data as that can lead to timeouts #You can comment the lines if you are sure you have data for the below streams. - config_path: secrets/config.json + # - config_path: secrets/config_sandbox.json empty_streams: - name: show_product_details bypass_reason: "Products may not exist" @@ -55,6 +57,7 @@ acceptance_tests: timeout_seconds: 3200 expect_records: path: "integration_tests/sample_files/expected_records_sandbox.jsonl" + #path: "integration_tests/sample_files/expected_records.jsonl" extra_fields: yes exact_order: yes extra_records: no @@ -62,6 +65,7 @@ acceptance_tests: incremental: tests: - config_path: secrets/config.json + # - config_path: secrets/config_sandbox.json configured_catalog_path: integration_tests/incremental_catalog.json future_state: future_state_path: integration_tests/sample_files/abnormal_state.json @@ -69,6 +73,7 @@ acceptance_tests: full_refresh: tests: - config_path: secrets/config.json + # - config_path: secrets/config_sandbox.json configured_catalog_path: integration_tests/full_refresh_catalog.json ignored_fields: balances: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py index 4acc5f2e0542..8c651cf9320f 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py @@ -1,5 +1,24 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# REQUIREMENTS: +# 1. Put your sandbox credentials in ../secrets/config.json (Create them if it doesn't exist). +# Use the following body (change all the values): +# { +# "client_id": "YOUT_CLIENT_ID", +# "client_secret": "YOUR_SECRET_CLIENT_ID", +# "start_date": "2021-06-01T00:00:00Z", +# "end_date": "2024-06-10T00:00:00Z", +# "is_sandbox": true +# } +# How to Use: +# To Create a Draft Invoice: +# Execute the script with create_draft to generate a new invoice draft. +# The script automatically sets the invoice and due dates based on the current date and a 30-day term. +# python invoices.py create_draft +# To Send a Draft Invoice: +# Use send_draft action along with the required --invoice_id parameter, and optional parameters for email subject, note, and additional recipients. +# python invoices.py send_draft --invoice_id "INV2-XXXX-XXXX-XXXX-XXXX" --subject "Your Invoice Subject" --note "Your custom note" --additional_recipients example@email.com + import argparse import base64 import json diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py index dd3856f3b04b..9ad9a7553814 100755 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/product_catalog.py @@ -13,8 +13,11 @@ # } # HOW TO USE: -# To create a new product: python script_name.py --action create -# To update an existing product: python script_name.py --action update --product_id +# To create a new product: +# python product_catalog.py --action create --description "This is a test product" --category TRAVEL +# To update an existing product: +# python product_catalog.py --action update --product_id PRODUCT_ID --update_payload '[{"op": "replace", "path": "/description", "value": "My Update. Does it changes it?"}]' +# The CATEGORY must be one of the listed in this page: https://developer.paypal.com/docs/api/catalog-products/v1/#products_create # NOTE: This is version one, it conly creates 1 product at a time. This has not been parametrized # TODO: Generate N products in one run. @@ -50,7 +53,7 @@ def get_paypal_token(client_id, secret_id): return response.json().get("access_token") -def create_paypal_product(access_token): +def create_paypal_product(access_token, description="Cotton XL", category="clothing"): """Create a product in PayPal.""" url = "https://api-m.sandbox.paypal.com/v1/catalogs/products" headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} @@ -58,8 +61,8 @@ def create_paypal_product(access_token): "name": "Pines-T-Shirt-" + generate_random_string(5), "type": "PHYSICAL", "id": generate_random_string(10), - "description": "Cotton XL", - "category": "CLOTHING", + "description": description, + "category": category, "image_url": "https://example.com/gallary/images/" + generate_random_string(10) + ".jpg", "home_url": "https://example.com/catalog/" + generate_random_string(10) + ".jpg", } @@ -83,7 +86,11 @@ def update_paypal_product(access_token, product_id, updates): # Parse command line arguments parser = argparse.ArgumentParser(description="Create or Update a PayPal Product.") parser.add_argument("--action", choices=["create", "update"], required=True, help="Action to perform: create or update") -parser.add_argument("--product_id", help="Product ID for update action") +parser.add_argument("--description", help="Product description for create action", required=True) +parser.add_argument("--category", help="Product category for create action", required=True) +parser.add_argument("--product_id", help="Product ID for update action", required=True) +parser.add_argument("--update_payload", help="Operation for update action", required=True) + args = parser.parse_args() # Common setup @@ -91,13 +98,18 @@ def update_paypal_product(access_token, product_id, updates): client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") access_token = get_paypal_token(client_id, secret_id) + # Perform action based on arguments if args.action == "create": - product = create_paypal_product(access_token) + product = create_paypal_product(access_token, args.description, args.category) print("Created product:", product) -elif args.action == "update" and args.product_id: - updates = [{"op": "replace", "path": "/description", "value": "My Update. Does it changes it?"}] - product = update_paypal_product(access_token, args.product_id, updates) - print("Updated product:", product) +elif args.action == "update" and args.product_id and args.update_payload: + try: + # updates = [{"op": "replace", "path": "/description", "value": "My Update. Does it changes it?"}] + operations = json.loads(args.update_payload) + product = update_paypal_product(access_token, args.product_id, operations) + print("Updated product:", product) + except json.JSONDecodeError: + print(f"Invalid JSON in update payload") else: print("Invalid arguments") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json index 11d8539eeb3f..9cfcf4147ffe 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json +++ b/airbyte-integrations/connectors/source-paypal-transaction/integration_tests/sample_files/sample_config.json @@ -1,6 +1,12 @@ { "client_id": "PAYPAL_CLIENT_ID", "client_secret": "PAYPAL_SECRET", - "start_date": "2021-06-01T00:00:00+00:00", - "is_sandbox": false + "start_date": "2024-01-20T00:00:00Z", + "end_date": "2024-02-01T23:59:00Z", + "dispute_start_date": "2024-02-01T00:00:00.000Z", + "dispute_end_date": "2024-02-05T23:59:00.000Z", + "is_sandbox": true, + "buyer_username": "BUYER_USERNAME@SOMETHING.com", + "buyer_password": "BUYER_PASSWORD", + "payer_id": "ACCOUNT_ID" } diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index af34edd024a9..3449c818497c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -11,7 +11,7 @@ data: connectorSubtype: api connectorType: source definitionId: d913b0f2-cc51-4e55-a44c-8ba1697b9239 - dockerImageTag: 2.3.1 + dockerImageTag: 2.3.0 dockerRepository: airbyte/source-paypal-transaction documentationUrl: https://docs.airbyte.com/integrations/sources/paypal-transaction githubIssueLabel: source-paypal-transaction diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index 3982933562ab..0368f3c97491 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -12,7 +12,8 @@ TEST_REQUIREMENTS = [ "pytest~=8.0", "pytest-mock~=3.12", - "requests-mock", + "requests-mock~=1.11", + "selenium~=4.17.2", ] setup( @@ -24,7 +25,7 @@ name="source_paypal_transaction", description="Source implementation for Paypal Transaction.", author="Airbyte", - author_email="contact@airbyte.io", + author_email="jose.pineda@airbyte.io", packages=find_packages(), install_requires=MAIN_REQUIREMENTS, package_data={ diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index e566c2d7abb8..fb52b56193b2 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -323,7 +323,6 @@ definitions: start: "{{ config['start_date'] }}" end: >- {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} - #"{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -390,7 +389,7 @@ streams: - "#/definitions/transactions_stream" - "#/definitions/balances_stream" - "#/definitions/list_products_stream" - #- "#/definitions/show_product_details_stream" + - "#/definitions/show_product_details_stream" - "#/definitions/list_disputes_stream" - "#/definitions/search_invoices_stream" - "#/definitions/list_payments_stream" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py index 767e7907fd8e..4260da59befa 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/source.py @@ -2,14 +2,9 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -import logging - from airbyte_cdk import AirbyteLogger from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource -logger = logging.getLogger("airbyte") - - """ This file provides the necessary constructs to interpret a provided declarative YAML configuration file into source connector. diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py index ef781a857d46..dd19b6306e77 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/auth_components_test.py @@ -84,3 +84,5 @@ def test_get_headers(authenticator_parameters): headers = authenticator.get_headers() assert headers == {"Authorization": expected_basic_auth} + + diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_cursor.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_cursor.py new file mode 100644 index 000000000000..958db41262da --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_cursor.py @@ -0,0 +1,146 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + +import json +import os +from dataclasses import dataclass, field +from typing import Any, List, Mapping, Optional, Union + +import pytest +import requests +import requests_mock +from airbyte_cdk.sources.declarative.decoders.decoder import Decoder +from airbyte_cdk.sources.declarative.decoders.json_decoder import JsonDecoder +from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean +from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString +from airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy import PaginationStrategy +from airbyte_cdk.sources.declarative.types import Config + + +@dataclass +class CursorPaginationStrategy(PaginationStrategy): + """ + Pagination strategy that evaluates an interpolated string to define the next page token + Attributes: + page_size (Optional[int]): the number of records to request + cursor_value (Union[InterpolatedString, str]): template string evaluating to the cursor value + config (Config): connection config + stop_condition (Optional[InterpolatedBoolean]): template string evaluating when to stop paginating + decoder (Decoder): decoder to decode the response + """ + cursor_value: Union[InterpolatedString, str] + config: Config + parameters: Mapping[str, Any] + page_size: Optional[int] = None + stop_condition: Optional[Union[InterpolatedBoolean, str]] = None + decoder: Decoder = field(default_factory=JsonDecoder) + + def __post_init__(self): + if isinstance(self.cursor_value, str): + self.cursor_value = InterpolatedString.create(self.cursor_value, parameters=self.parameters) + if isinstance(self.stop_condition, str): + self.stop_condition = InterpolatedBoolean(condition=self.stop_condition, parameters=self.parameters) + + @property + def initial_token(self) -> Optional[Any]: + return None + + + def next_page_token(self, response: requests.Response, last_records: List[Mapping[str, Any]]) -> Optional[Any]: + decoded_response = self.decoder.decode(response) + headers = response.headers + headers["link"] = response.links + + print("STOP CONDITION", self.stop_condition) + + if self.stop_condition: + should_stop = self.stop_condition.eval(self.config, response=decoded_response, headers=headers, last_records=last_records) + if should_stop: + print("Stopping...") + return None + + # Update cursor_value with the next_id from the response + self.cursor_value = InterpolatedString.create(decoded_response.get("next_id"), parameters=self.parameters) + token = self.cursor_value.eval(config=self.config, last_records=last_records, response=decoded_response, headers=headers) + print("TOKEN", token) + return token if token else None + + def reset(self): + pass + + def get_page_size(self) -> Optional[int]: + return self.page_size + + +@pytest.fixture +def mock_responses(): + return [ + "token_page_init.json", + "token_PAY-0L38757939422510JMW5ZJVA.json", + "token_PAYID-MW5XXZY5YL87592N34454913.json" + ] + +@pytest.fixture +def cursor_pagination_strategy(mock_responses, stop_condition = None): + parameters = {} + decoder = JsonDecoder(parameters=parameters) + cursor_value = "start_id" # Initialize with a default value + + for response_file in mock_responses: + if cursor_value == "start_id": + cursor_value = load_mock_data(response_file).get("next_id") + else: + break # Stop after getting the next_id from the first response + + return CursorPaginationStrategy( + cursor_value=cursor_value, + config={}, + parameters=parameters, + page_size=3, + stop_condition=stop_condition, + decoder=decoder + ) + + +def load_mock_data(filename): + with open(os.path.join("./unit_tests/test_files", filename), "r") as file: + return json.load(file) + +def test_cursor_pagination(cursor_pagination_strategy, mock_responses): + with requests_mock.Mocker() as m: + base_url = "http://example.com/api/resource" + + # Mock responses + for i, response_file in enumerate(mock_responses): + print("") + print("####################################") + if i == 0: + url = f"{base_url}?count=3" + print("FIRST ITERATION:", response_file, i, url) + + if i > 0: + url += f"&start_id={next_id}" + print("NEXT ITERATIONS:", response_file, i, url) + m.get(url, json=load_mock_data(response_file), status_code=200) + # Get next_id from the response if it's not the last response + + if i < len(mock_responses) - 1: + next_id = load_mock_data(response_file)["next_id"] + print("FOUND NEXT ID:", next_id) + + else: + next_id = None + cursor_pagination_strategy(mock_responses, stop_condition = True) + + # Make API call and process response + response = requests.get(url) + print("GET RESPONSE:", response) + assert response.status_code == 200 + + decoded_response = response.json() + last_records = decoded_response["payments"] + next_id = cursor_pagination_strategy.next_page_token(response, last_records) + print("NEXT ID:", next_id) + + # Verify the pagination stopped + assert next_id is None + print("No more pages") diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_increment.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_increment.py new file mode 100644 index 000000000000..05b98d04f90a --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/pagination_increment.py @@ -0,0 +1,79 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + +import os +import re + +import pytest +import requests +import requests_mock +from airbyte_cdk.sources.declarative.requesters.paginators import DefaultPaginator, PaginationStrategy + + +class MockPaginationStrategy(PaginationStrategy): + def __init__(self, page_size): + self.page_size = page_size + self.current_page = 1 + + @property + def initial_token(self): + return self.current_page + + def next_page_token(self, response, last_records): + self.current_page += 1 + return self.current_page if self.current_page <= 5 else None + + def reset(self): + self.current_page = 1 + + @property + def get_page_size(self): + return self.page_size + +@pytest.fixture +def mock_pagination_strategy(): + return MockPaginationStrategy(page_size=500) + +@pytest.fixture +def paginator(): + pagination_strategy = MockPaginationStrategy(page_size=3) + return DefaultPaginator( + pagination_strategy=pagination_strategy, + config={}, + url_base="http://example.com/v1/reporting/transactions", + parameters={} + ) + +def load_mock_data(page): + with open(f"./unit_tests/test_files/page_{page}.json", "r") as file: + return file.read() + +# Test to verify pagination logic transitions from page 1 to page 2 +def test_pagination_logic(paginator): + page_1_data = load_mock_data(1) + page_2_data = load_mock_data(2) + + paginator_url_1 = f"{paginator.url_base.string}?page=1&page_size={paginator.pagination_strategy.get_page_size}" + paginator_url_2 = f"{paginator.url_base.string}?page=2&page_size={paginator.pagination_strategy.get_page_size}" + + with requests_mock.Mocker() as m: + m.get(paginator_url_1, text=page_1_data, status_code=200) + m.get(paginator_url_2, text=page_2_data, status_code=200) + + response_page_1 = requests.get(paginator_url_1) + response_page_1._content = str.encode(page_1_data) + response_page_2 = requests.get(paginator_url_2) + response_page_2._content = str.encode(page_2_data) + + + # Simulate getting the next page token from page 1's response + next_page_token_page_1 = paginator.next_page_token(response_page_1, []) + print("NEXT PAGE TOKEN", next_page_token_page_1) + + # Assert that the next page token indicates moving to page 2 + assert next_page_token_page_1['next_page_token'] == 2, "Failed to transition from page 1 to page 2" + + + # Check that the correct page size is used in requests and that we have the right number of pages + assert len(m.request_history) == 2 + assert "page_size=3" in m.request_history[0].url + assert "page_size=3" in m.request_history[1].url \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_1.json b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_1.json new file mode 100644 index 000000000000..8e567afe7c7d --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_1.json @@ -0,0 +1,135 @@ +{ + "transaction_details": [ + { + "transaction_info": { + "transaction_id": "2N603077GD600560F", + "transaction_event_code": "T1503", + "transaction_initiation_date": "2024-02-10T00:01:56+0000", + "transaction_updated_date": "2024-02-10T00:01:56+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "-60.75" + }, + "transaction_status": "S", + "ending_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "available_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "protection_eligibility": "02" + }, + "payer_info": { + "address_status": "N", + "payer_name": {} + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }, + { + "transaction_info": { + "transaction_id": "0JN65120FU073310V", + "transaction_event_code": "T0001", + "transaction_initiation_date": "2024-02-10T00:01:57+0000", + "transaction_updated_date": "2024-02-10T00:01:57+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "-10.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-0.25" + }, + "transaction_status": "P", + "transaction_subject": "You have a payout!", + "transaction_note": "Thanks for your patronage!", + "ending_balance": { + "currency_code": "USD", + "value": "2048008.05" + }, + "available_balance": { + "currency_code": "USD", + "value": "2048008.05" + }, + "custom_field": "201403140001", + "protection_eligibility": "02" + }, + "payer_info": { + "email_address": "Ernesto.Witting@yahoo.com", + "address_status": "N", + "payer_name": {} + }, + "shipping_info": { + "name": "John, Merchant" + }, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }, + { + "transaction_info": { + "transaction_id": "4XL46752RR472362C", + "paypal_reference_id": "0JN65120FU073310V", + "paypal_reference_id_type": "TXN", + "transaction_event_code": "T1105", + "transaction_initiation_date": "2024-02-10T00:01:57+0000", + "transaction_updated_date": "2024-02-10T00:01:57+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "10.25" + }, + "transaction_status": "S", + "transaction_subject": "You have a payout!", + "transaction_note": "Thanks for your patronage!", + "ending_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "available_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "protection_eligibility": "02" + }, + "payer_info": { + "address_status": "N", + "payer_name": {} + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + } + ], + "account_number": "C7CYMKZDG8D6E", + "start_date": "2024-02-10T00:00:00+0000", + "end_date": "2024-02-10T05:20:00+0000", + "last_refreshed_datetime": "2024-02-14T01:59:59+0000", + "page": 1, + "total_items": 352, + "total_pages": 118, + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&end_date=2024-02-10T05%3A20%3A00Z&start_date=2024-02-10T00%3A00%3A00Z&page_size=3&page=118", + "rel": "last", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&end_date=2024-02-10T05%3A20%3A00Z&start_date=2024-02-10T00%3A00%3A00Z&page_size=3&page=2", + "rel": "next", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&end_date=2024-02-10T05%3A20%3A00Z&start_date=2024-02-10T00%3A00%3A00Z&page_size=3&page=1", + "rel": "self", + "method": "GET" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_2.json b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_2.json new file mode 100644 index 000000000000..e27274a5d72f --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/page_2.json @@ -0,0 +1,160 @@ +{ + "transaction_details": [ + { + "transaction_info": { + "transaction_id": "794702034R094742N", + "transaction_event_code": "T0001", + "transaction_initiation_date": "2024-02-10T00:01:57+0000", + "transaction_updated_date": "2024-02-10T00:01:57+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "-20.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-0.25" + }, + "transaction_status": "P", + "transaction_subject": "You have a payout!", + "transaction_note": "Thanks for your support!", + "ending_balance": { + "currency_code": "USD", + "value": "2047998.05" + }, + "available_balance": { + "currency_code": "USD", + "value": "2047998.05" + }, + "custom_field": "201403140002", + "protection_eligibility": "02" + }, + "payer_info": { + "address_status": "N", + "payer_name": {} + }, + "shipping_info": { + "name": "John, Merchant" + }, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }, + { + "transaction_info": { + "transaction_id": "74734003LC191551G", + "paypal_reference_id": "794702034R094742N", + "paypal_reference_id_type": "TXN", + "transaction_event_code": "T1105", + "transaction_initiation_date": "2024-02-10T00:01:57+0000", + "transaction_updated_date": "2024-02-10T00:01:57+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "20.25" + }, + "transaction_status": "S", + "transaction_subject": "You have a payout!", + "transaction_note": "Thanks for your support!", + "ending_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "available_balance": { + "currency_code": "USD", + "value": "2048018.30" + }, + "protection_eligibility": "02" + }, + "payer_info": { + "address_status": "N", + "payer_name": {} + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }, + { + "transaction_info": { + "paypal_account_id": "5DEJUG27PZB9J", + "transaction_id": "44R34480PG8833736", + "transaction_event_code": "T0001", + "transaction_initiation_date": "2024-02-10T00:01:57+0000", + "transaction_updated_date": "2024-02-10T00:01:57+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "-30.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-0.25" + }, + "transaction_status": "S", + "transaction_subject": "You have a payout!", + "transaction_note": "Thanks for your patronage!", + "ending_balance": { + "currency_code": "USD", + "value": "2047988.05" + }, + "available_balance": { + "currency_code": "USD", + "value": "2047988.05" + }, + "custom_field": "201403140003", + "protection_eligibility": "02" + }, + "payer_info": { + "account_id": "5DEJUG27PZB9J", + "email_address": "sb-59loi25655860@business.example.com", + "address_status": "N", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Test Store" + }, + "country_code": "US" + }, + "shipping_info": { + "name": "John, Merchant" + }, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + } + ], + "account_number": "C7CYMKZDG8D6E", + "start_date": "2024-02-10T00:00:00+0000", + "end_date": "2024-02-10T05:20:00+0000", + "last_refreshed_datetime": "2024-02-14T01:59:59+0000", + "page": 2, + "total_items": 352, + "total_pages": 118, + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&start_date=2024-02-10T00%3A00%3A00Z&end_date=2024-02-10T05%3A20%3A00Z&page_size=3&page=1", + "rel": "first", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&start_date=2024-02-10T00%3A00%3A00Z&end_date=2024-02-10T05%3A20%3A00Z&page_size=3&page=118", + "rel": "last", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&start_date=2024-02-10T00%3A00%3A00Z&end_date=2024-02-10T05%3A20%3A00Z&page_size=3&page=3", + "rel": "next", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&start_date=2024-02-10T00%3A00%3A00Z&end_date=2024-02-10T05%3A20%3A00Z&page_size=3&page=1", + "rel": "prev", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/reporting/transactions?fields=transaction_info%2Cpayer_info%2Cshipping_info%2Cauction_info%2Ccart_info%2Cincentive_info%2Cstore_info&start_date=2024-02-10T00%3A00%3A00Z&end_date=2024-02-10T05%3A20%3A00Z&page_size=3&page=2", + "rel": "self", + "method": "GET" + } + ] +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAY-0L38757939422510JMW5ZJVA.json b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAY-0L38757939422510JMW5ZJVA.json new file mode 100644 index 000000000000..b0a6520defec --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAY-0L38757939422510JMW5ZJVA.json @@ -0,0 +1,451 @@ +{ + "payments": [ + { + "id": "PAY-0L38757939422510JMW5ZJVA", + "intent": "authorize", + "state": "approved", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "mihai.streza1@mi-pay.com", + "first_name": "Mihai", + "last_name": "Streza", + "payer_id": "QHD3E8SRDDSQL", + "shipping_address": { + "recipient_name": "Mihai Streza" + }, + "phone": "07534201211", + "country_code": "GB" + } + }, + "transactions": [ + { + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E" + }, + "description": "topup", + "invoice_number": "100000000188897", + "soft_descriptor": "PAYPAL *JOHNMERCHAN", + "item_list": { + "items": [ + { + "name": "topup", + "price": "20.00", + "currency": "EUR", + "tax": "0.00", + "quantity": 1 + } + ], + "shipping_address": { + "recipient_name": "Mihai Streza" + } + }, + "related_resources": [ + { + "authorization": { + "id": "3S025738SW168153S", + "state": "captured", + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "billing_agreement_id": "B-42217126VD515152H", + "parent_payment": "PAY-0L38757939422510JMW5ZJVA", + "valid_until": "2024-03-01T12:55:48Z", + "create_time": "2024-02-01T12:55:48Z", + "update_time": "2024-02-01T12:55:51Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/capture", + "rel": "capture", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/void", + "rel": "void", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S/reauthorize", + "rel": "reauthorize", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA", + "rel": "parent_payment", + "method": "GET" + } + ] + } + }, + { + "capture": { + "id": "26U95072LD470800B", + "amount": { + "total": "20.00", + "currency": "EUR" + }, + "state": "completed", + "custom": "", + "transaction_fee": { + "value": "1.39", + "currency": "EUR" + }, + "parent_payment": "PAY-0L38757939422510JMW5ZJVA", + "invoice_number": "100000000188897", + "create_time": "2024-02-01T12:55:51Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/26U95072LD470800B/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/3S025738SW168153S", + "rel": "authorization", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T12:55:48Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0L38757939422510JMW5ZJVA", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAY-5UU821714H9319614MW5ZGTQ", + "intent": "authorize", + "state": "approved", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "mihai.streza1@mi-pay.com", + "first_name": "Mihai", + "last_name": "Streza", + "payer_id": "QHD3E8SRDDSQL", + "shipping_address": { + "recipient_name": "Mihai Streza" + }, + "phone": "07534201211", + "country_code": "GB" + } + }, + "transactions": [ + { + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E" + }, + "description": "topup", + "invoice_number": "100000000188890", + "soft_descriptor": "PAYPAL *JOHNMERCHAN", + "item_list": { + "items": [ + { + "name": "topup", + "price": "20.00", + "currency": "EUR", + "tax": "0.00", + "quantity": 1 + } + ], + "shipping_address": { + "recipient_name": "Mihai Streza" + } + }, + "related_resources": [ + { + "authorization": { + "id": "4MN954876H428782W", + "state": "captured", + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "billing_agreement_id": "B-9YM05135W51321351", + "parent_payment": "PAY-5UU821714H9319614MW5ZGTQ", + "valid_until": "2024-03-01T12:49:18Z", + "create_time": "2024-02-01T12:49:18Z", + "update_time": "2024-02-01T12:49:21Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/4MN954876H428782W", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/4MN954876H428782W/capture", + "rel": "capture", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/4MN954876H428782W/void", + "rel": "void", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/4MN954876H428782W/reauthorize", + "rel": "reauthorize", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5UU821714H9319614MW5ZGTQ", + "rel": "parent_payment", + "method": "GET" + } + ] + } + }, + { + "capture": { + "id": "3LS31047RT411632Y", + "amount": { + "total": "20.00", + "currency": "EUR" + }, + "state": "completed", + "custom": "", + "transaction_fee": { + "value": "1.39", + "currency": "EUR" + }, + "parent_payment": "PAY-5UU821714H9319614MW5ZGTQ", + "invoice_number": "100000000188890", + "create_time": "2024-02-01T12:49:21Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/3LS31047RT411632Y", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/3LS31047RT411632Y/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/4MN954876H428782W", + "rel": "authorization", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5UU821714H9319614MW5ZGTQ", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T12:49:18Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5UU821714H9319614MW5ZGTQ", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAYID-MW5Y7VQ3XR69795B78311812", + "intent": "sale", + "state": "approved", + "cart": "21D62257BL170881B", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "ABpaypal@gmail.com", + "first_name": "kiran", + "last_name": "ingale", + "payer_id": "MEZSMT5X3R5HW", + "shipping_address": { + "recipient_name": "kiran ingale", + "line1": "3210 D Street", + "city": "SANFORD", + "state": "CA", + "postal_code": "27331", + "country_code": "US" + }, + "phone": "3333333333", + "country_code": "US" + } + }, + "transactions": [ + { + "reference_id": "default", + "amount": { + "total": "1434.45", + "currency": "USD", + "details": { + "subtotal": "1434.45", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "soft_descriptor": "JOHNMERCHAN JOHNMERCHAN", + "item_list": { + "shipping_address": { + "recipient_name": "kiran ingale", + "line1": "3210 D Street", + "city": "SANFORD", + "state": "CA", + "postal_code": "27331", + "country_code": "US" + } + }, + "related_resources": [ + { + "sale": { + "id": "6UA65534T65937149", + "state": "refunded", + "amount": { + "total": "1434.45", + "currency": "USD", + "details": { + "subtotal": "1434.45", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "50.55", + "currency": "USD" + }, + "purchase_unit_reference_id": "default", + "parent_payment": "PAYID-MW5Y7VQ3XR69795B78311812", + "create_time": "2024-02-01T12:34:30Z", + "update_time": "2024-02-01T12:35:49Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/6UA65534T65937149", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/6UA65534T65937149/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5Y7VQ3XR69795B78311812", + "rel": "parent_payment", + "method": "GET" + } + ], + "soft_descriptor": "JOHNMERCHAN JOHNMERCHAN" + } + }, + { + "refund": { + "id": "9JS27953SE332473L", + "state": "completed", + "amount": { + "total": "-1434.45", + "currency": "USD" + }, + "parent_payment": "PAYID-MW5Y7VQ3XR69795B78311812", + "sale_id": "6UA65534T65937149", + "create_time": "2024-02-01T12:35:49Z", + "update_time": "2024-02-01T12:35:49Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/refund/9JS27953SE332473L", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5Y7VQ3XR69795B78311812", + "rel": "parent_payment", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/6UA65534T65937149", + "rel": "sale", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T12:34:30Z", + "update_time": "2024-02-01T12:35:49Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5Y7VQ3XR69795B78311812", + "rel": "self", + "method": "GET" + } + ] + } + ], + "count": 3, + "next_id": "PAYID-MW5XXZY5YL87592N34454913" +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAYID-MW5XXZY5YL87592N34454913.json b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAYID-MW5XXZY5YL87592N34454913.json new file mode 100644 index 000000000000..dfee3371b093 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_PAYID-MW5XXZY5YL87592N34454913.json @@ -0,0 +1,391 @@ +{ + "payments": [ + { + "id": "PAYID-MW5XXZY5YL87592N34454913", + "intent": "sale", + "state": "approved", + "cart": "2P498024GJ403825S", + "payer": { + "payment_method": "paypal", + "status": "UNVERIFIED", + "payer_info": { + "email": "rahul21@yopmail.com", + "first_name": "d", + "last_name": "d", + "payer_id": "KZAHJGF7B2SBU", + "shipping_address": { + "recipient_name": "d d", + "line1": "gfd", + "line2": "gdgd", + "city": "dfgd", + "state": "CA", + "postal_code": "95388", + "country_code": "US" + }, + "phone": "8219746756", + "country_code": "US" + } + }, + "transactions": [ + { + "reference_id": "default", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "soft_descriptor": "PAYPAL *JOHNMERCHAN JOHNMERCHAN", + "item_list": { + "shipping_address": { + "recipient_name": "d d", + "line1": "gfd", + "line2": "gdgd", + "city": "dfgd", + "state": "CA", + "postal_code": "95388", + "country_code": "US" + } + }, + "related_resources": [ + { + "sale": { + "id": "6W206643Y5829092B", + "state": "completed", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "3.48", + "currency": "USD" + }, + "purchase_unit_reference_id": "default", + "receipt_id": "1732798430780793", + "parent_payment": "PAYID-MW5XXZY5YL87592N34454913", + "create_time": "2024-02-01T11:09:27Z", + "update_time": "2024-02-01T11:09:27Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/6W206643Y5829092B", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/6W206643Y5829092B/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5XXZY5YL87592N34454913", + "rel": "parent_payment", + "method": "GET" + } + ], + "soft_descriptor": "PAYPAL *JOHNMERCHAN JOHNMERCHAN" + } + } + ] + } + ], + "create_time": "2024-02-01T11:09:27Z", + "update_time": "2024-02-01T11:09:27Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5XXZY5YL87592N34454913", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAYID-MW5W3EQ07B7347381105242R", + "intent": "sale", + "state": "approved", + "cart": "2FM93347R66426228", + "payer": { + "payment_method": "paypal", + "status": "UNVERIFIED", + "payer_info": { + "email": "admin@admin.com", + "first_name": "d", + "last_name": "d", + "payer_id": "N4KZ3KK4C2DFQ", + "shipping_address": { + "recipient_name": "d d", + "line1": "ytu", + "line2": "tyut", + "city": "tyut", + "state": "CA", + "postal_code": "95388", + "country_code": "US" + }, + "phone": "8219746756", + "country_code": "US" + } + }, + "transactions": [ + { + "reference_id": "default", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "soft_descriptor": "PAYPAL *JOHNMERCHAN JOHNMERCHAN", + "item_list": { + "shipping_address": { + "recipient_name": "d d", + "line1": "ytu", + "line2": "tyut", + "city": "tyut", + "state": "CA", + "postal_code": "95388", + "country_code": "US" + } + }, + "related_resources": [ + { + "sale": { + "id": "17C62595GV9382350", + "state": "completed", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "3.48", + "currency": "USD" + }, + "purchase_unit_reference_id": "default", + "receipt_id": "2958849288346255", + "parent_payment": "PAYID-MW5W3EQ07B7347381105242R", + "create_time": "2024-02-01T10:08:18Z", + "update_time": "2024-02-01T10:08:18Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/17C62595GV9382350", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/17C62595GV9382350/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5W3EQ07B7347381105242R", + "rel": "parent_payment", + "method": "GET" + } + ], + "soft_descriptor": "PAYPAL *JOHNMERCHAN JOHNMERCHAN" + } + } + ] + } + ], + "create_time": "2024-02-01T10:08:18Z", + "update_time": "2024-02-01T10:08:18Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5W3EQ07B7347381105242R", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAYID-MW5WOVY25V45764MA349022Y", + "intent": "sale", + "state": "approved", + "cart": "7CP287511G6711412", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "ABpaypal@gmail.com", + "first_name": "kiran", + "last_name": "ingale", + "payer_id": "MEZSMT5X3R5HW", + "shipping_address": { + "recipient_name": "kiran ingale", + "line1": "3210 D Street", + "city": "SANFORD", + "state": "CA", + "postal_code": "27331", + "country_code": "US" + }, + "phone": "3333333333", + "country_code": "US" + } + }, + "transactions": [ + { + "reference_id": "default", + "amount": { + "total": "1434.45", + "currency": "USD", + "details": { + "subtotal": "1434.45", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "soft_descriptor": "JOHNMERCHAN JOHNMERCHAN", + "item_list": { + "shipping_address": { + "recipient_name": "kiran ingale", + "line1": "3210 D Street", + "city": "SANFORD", + "state": "CA", + "postal_code": "27331", + "country_code": "US" + } + }, + "related_resources": [ + { + "sale": { + "id": "5SF16542W66927019", + "state": "refunded", + "amount": { + "total": "1434.45", + "currency": "USD", + "details": { + "subtotal": "1434.45", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "50.55", + "currency": "USD" + }, + "purchase_unit_reference_id": "default", + "parent_payment": "PAYID-MW5WOVY25V45764MA349022Y", + "create_time": "2024-02-01T09:41:44Z", + "update_time": "2024-02-01T09:45:35Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/5SF16542W66927019", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/5SF16542W66927019/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5WOVY25V45764MA349022Y", + "rel": "parent_payment", + "method": "GET" + } + ], + "soft_descriptor": "JOHNMERCHAN JOHNMERCHAN" + } + }, + { + "refund": { + "id": "4P679266N7690881N", + "state": "completed", + "amount": { + "total": "-1434.45", + "currency": "USD" + }, + "parent_payment": "PAYID-MW5WOVY25V45764MA349022Y", + "sale_id": "5SF16542W66927019", + "create_time": "2024-02-01T09:45:35Z", + "update_time": "2024-02-01T09:45:35Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/refund/4P679266N7690881N", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5WOVY25V45764MA349022Y", + "rel": "parent_payment", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/5SF16542W66927019", + "rel": "sale", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T09:41:43Z", + "update_time": "2024-02-01T09:45:35Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW5WOVY25V45764MA349022Y", + "rel": "self", + "method": "GET" + } + ] + } + ], + "count": 3, + "next_id": "" +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_page_init.json b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_page_init.json new file mode 100644 index 000000000000..025dfc513c85 --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_files/token_page_init.json @@ -0,0 +1,399 @@ +{ + "payments": [ + { + "id": "PAYID-MW55RCA31D103955T218492B", + "intent": "sale", + "state": "approved", + "cart": "06J27273EH485262V", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "sb-vxpcr15413769@personal.example.com", + "first_name": "John", + "last_name": "Doe", + "payer_id": "TWL7BJVYNS7GU", + "shipping_address": { + "recipient_name": "John Doe", + "line1": "1 Main St", + "city": "San Jose", + "state": "CA", + "postal_code": "95131", + "country_code": "US" + }, + "phone": "4083068029", + "country_code": "US" + } + }, + "transactions": [ + { + "reference_id": "1000000000047", + "amount": { + "total": "343.80", + "currency": "USD", + "details": { + "subtotal": "343.80", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "item_list": { + "shipping_address": { + "recipient_name": "John Doe", + "line1": "1 Main St", + "city": "San Jose", + "state": "CA", + "postal_code": "95131", + "country_code": "US" + } + }, + "related_resources": [ + { + "sale": { + "id": "7PE037460E080360M", + "state": "completed", + "amount": { + "total": "343.80", + "currency": "USD", + "details": { + "subtotal": "343.80", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "12.49", + "currency": "USD" + }, + "purchase_unit_reference_id": "1000000000047", + "parent_payment": "PAYID-MW55RCA31D103955T218492B", + "create_time": "2024-02-01T17:44:40Z", + "update_time": "2024-02-01T17:44:40Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/7PE037460E080360M/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T17:44:40Z", + "update_time": "2024-02-01T17:44:40Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW55RCA31D103955T218492B", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAYID-MW53UPA6UB45753B0034831X", + "intent": "sale", + "state": "approved", + "cart": "9A220393SG7753433", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "sb-g43l4x28821325@personal.example.com", + "first_name": "John", + "last_name": "Doe", + "payer_id": "889X39VDHV8QY", + "shipping_address": { + "recipient_name": "John Doe", + "line1": "Via Unit? d'Italia, 5783296", + "city": "Napoli", + "state": "Napoli", + "postal_code": "80127", + "country_code": "IT" + }, + "phone": "9393358454", + "country_code": "IT" + } + }, + "transactions": [ + { + "reference_id": "default", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E", + "email": "john_merchant@example.com" + }, + "description": "T-Shirt", + "item_list": { + "items": [ + { + "name": "T-Shirt", + "description": "Green XL", + "price": "100.00", + "currency": "USD", + "tax": "0.00", + "quantity": 1 + } + ], + "shipping_address": { + "recipient_name": "John Doe", + "line1": "Via Unit? d'Italia, 5783296", + "city": "Napoli", + "state": "Napoli", + "postal_code": "80127", + "country_code": "IT" + } + }, + "related_resources": [ + { + "sale": { + "id": "29N28023XB153584X", + "state": "completed", + "amount": { + "total": "100.00", + "currency": "USD", + "details": { + "subtotal": "100.00", + "shipping": "0.00", + "insurance": "0.00", + "handling_fee": "0.00", + "shipping_discount": "0.00", + "discount": "0.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "transaction_fee": { + "value": "5.48", + "currency": "USD" + }, + "receivable_amount": { + "value": "100.00", + "currency": "USD" + }, + "exchange_rate": "1.098848913950027", + "purchase_unit_reference_id": "default", + "parent_payment": "PAYID-MW53UPA6UB45753B0034831X", + "create_time": "2024-02-01T15:35:25Z", + "update_time": "2024-02-01T15:35:25Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/sale/29N28023XB153584X/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T15:35:24Z", + "update_time": "2024-02-01T15:35:25Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-MW53UPA6UB45753B0034831X", + "rel": "self", + "method": "GET" + } + ] + }, + { + "id": "PAY-81S181868H8011217MW526OI", + "intent": "authorize", + "state": "approved", + "payer": { + "payment_method": "paypal", + "status": "VERIFIED", + "payer_info": { + "email": "mihai.streza1@mi-pay.com", + "first_name": "Mihai", + "last_name": "Streza", + "payer_id": "QHD3E8SRDDSQL", + "shipping_address": { + "recipient_name": "Mihai Streza" + }, + "phone": "07534201211", + "country_code": "GB" + } + }, + "transactions": [ + { + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payee": { + "merchant_id": "C7CYMKZDG8D6E" + }, + "description": "topup", + "invoice_number": "100000000188917", + "soft_descriptor": "PAYPAL *JOHNMERCHAN", + "item_list": { + "items": [ + { + "name": "topup", + "price": "20.00", + "currency": "EUR", + "tax": "0.00", + "quantity": 1 + } + ], + "shipping_address": { + "recipient_name": "Mihai Streza" + } + }, + "related_resources": [ + { + "authorization": { + "id": "05D21713M12255848", + "state": "captured", + "amount": { + "total": "20.00", + "currency": "EUR", + "details": { + "subtotal": "20.00" + } + }, + "payment_mode": "INSTANT_TRANSFER", + "protection_eligibility": "ELIGIBLE", + "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", + "billing_agreement_id": "B-2B029484VC167663Y", + "parent_payment": "PAY-81S181868H8011217MW526OI", + "valid_until": "2024-03-01T14:48:26Z", + "create_time": "2024-02-01T14:48:26Z", + "update_time": "2024-02-01T14:48:30Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/capture", + "rel": "capture", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/void", + "rel": "void", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848/reauthorize", + "rel": "reauthorize", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI", + "rel": "parent_payment", + "method": "GET" + } + ] + } + }, + { + "capture": { + "id": "546282867R0022639", + "amount": { + "total": "20.00", + "currency": "EUR" + }, + "state": "completed", + "custom": "", + "transaction_fee": { + "value": "1.39", + "currency": "EUR" + }, + "parent_payment": "PAY-81S181868H8011217MW526OI", + "invoice_number": "100000000188917", + "create_time": "2024-02-01T14:48:30Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/capture/546282867R0022639/refund", + "rel": "refund", + "method": "POST" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/authorization/05D21713M12255848", + "rel": "authorization", + "method": "GET" + }, + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + ] + } + ], + "create_time": "2024-02-01T14:48:25Z", + "links": [ + { + "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-81S181868H8011217MW526OI", + "rel": "self", + "method": "GET" + } + ] + } + ], + "count": 3, + "next_id": "PAY-0L38757939422510JMW5ZJVA" +} diff --git a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py b/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py deleted file mode 100644 index a6be3eb1f19b..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/unit_tests/test_source.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. - -from source_paypal_transaction import SourcePaypalTransaction - - -def test_source(): - assert SourcePaypalTransaction() \ No newline at end of file From 14ef96a01905f46263ae18d9df29f670eaf86c20 Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Thu, 15 Feb 2024 15:11:32 -0600 Subject: [PATCH 24/36] Update airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md Co-authored-by: Alexandre Girard --- .../connectors/source-paypal-transaction/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md index e421738b76c5..7cddffd5f108 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/CHANGELOG.md @@ -9,5 +9,5 @@ Mark Client ID and Client Secret as required files ## 2.1.0 Migration to Low code -## 2.3.1 +## 2.3.0 Adding New Streams - Payments, Disputes, Invoices, Product Catalog \ No newline at end of file From 3c944ed6fb367efa148aa0e4e759fbfd551e843f Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 15 Feb 2024 20:37:05 -0600 Subject: [PATCH 25/36] Fix conflicts --- .../connectors/source-paypal-transaction/README.md | 1 + .../connectors/source-paypal-transaction/metadata.yaml | 1 + .../connectors/source-paypal-transaction/setup.py | 1 - docs/integrations/sources/paypal-transaction.md | 3 --- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/README.md b/airbyte-integrations/connectors/source-paypal-transaction/README.md index 76b879d9ba0c..21c00ac802f9 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/README.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/README.md @@ -1,3 +1,4 @@ + # Paypal Transaction Source This is the repository for the Paypal Transaction configuration based source connector. diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 3449c818497c..411d7b327841 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -27,6 +27,7 @@ data: enabled: true oss: enabled: true + #Updates in doc changelog releaseDate: 2021-06-10 releaseStage: generally_available releases: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py index 0368f3c97491..fa2b7fa8102a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/setup.py @@ -2,7 +2,6 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # - from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ diff --git a/docs/integrations/sources/paypal-transaction.md b/docs/integrations/sources/paypal-transaction.md index 2401b24322ad..138f0076ab4a 100644 --- a/docs/integrations/sources/paypal-transaction.md +++ b/docs/integrations/sources/paypal-transaction.md @@ -1,6 +1,3 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - # Paypal This page contains the setup guide and reference information for the Paypal source connector. From 6ad0d11c2c0a57beeca56923305a2222e98612f8 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Thu, 15 Feb 2024 21:08:04 -0600 Subject: [PATCH 26/36] Fix merge conflicts Poetry. Update versions in poetry. --- .../source-paypal-transaction/README.md | 116 +- .../source-paypal-transaction/metadata.yaml | 1 - .../source-paypal-transaction/poetry.lock | 1216 +++++++++++++++++ .../source-paypal-transaction/pyproject.toml | 29 + .../source-paypal-transaction/setup.py | 46 - .../sources/paypal-transaction.md | 22 +- 6 files changed, 1318 insertions(+), 112 deletions(-) create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/poetry.lock create mode 100644 airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml delete mode 100644 airbyte-integrations/connectors/source-paypal-transaction/setup.py diff --git a/airbyte-integrations/connectors/source-paypal-transaction/README.md b/airbyte-integrations/connectors/source-paypal-transaction/README.md index 21c00ac802f9..895d965bfa3d 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/README.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/README.md @@ -1,51 +1,63 @@ +# Paypal-Transaction source connector -# Paypal Transaction Source - -This is the repository for the Paypal Transaction configuration based source connector. +This is the repository for the Paypal-Transaction source connector, written in Python. For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/paypal-transaction). ## Local development + #### Prerequisites * Python (~=3.9) + * Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation) * Paypal Client ID and Client Secret * If you are going to use the data generator scripts you need to setup yourPaypal Sandbox and a Buyer user in your sandbox, to simulate the data. YOu cna get that information in the [Apps & Credentials page](https://developer.paypal.com/dashboard/applications/live). * Buyer Username * Buyer Password * Payer ID (Account ID) -#### Create credentials +### Installing the connector + +From this connector directory, run: +```bash +poetry install --with dev +``` + +### Create credentials + **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/paypal-transaction) to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_paypal_transaction/spec.yaml` file. Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. -See `integration_tests/sample_config.json` for a sample config file. - -**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source paypal-transaction test creds` -and place them into `secrets/config.json`. - -### Locally running the connector docker image +See `sample_files/sample_config.json` for a sample config file. * You must have created your credentials under the `secrets/` folder * For the read command, you can create separate catalogs to test the streams individually. All catalogs are under the folder `integration_tests`. Select the one you want to test with the read command. + +### Locally running the connector + ``` -python main.py spec -python main.py check --config secrets/config.json -python main.py discover --config secrets/config.json +poetry run source-paypal-transaction spec +poetry run source-paypal-transaction check --config secrets/config.json +poetry run source-paypal-transaction discover --config secrets/config.json #Example with list_payments catalog and the debug flag python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog_list_payments.json --debug ``` -#### Use `airbyte-ci` to build your connector -The Airbyte way of building this connector is to use our `airbyte-ci` tool. -You can follow install instructions [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md#L1). -Then running the following command will build your connector: +### Running unit tests +To run unit tests locally, from the connector directory run: + +``` +poetry run pytest unit_tests +``` + +### Building the docker image + +1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) +2. Run the following command to build the docker image: ```bash airbyte-ci connectors --name=source-paypal-transaction build ``` -Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-paypal-transaction:dev`. - ##### Customizing our build process When contributing on our connector you might need to customize the build process to add a system dependency or set an env var. @@ -63,53 +75,23 @@ if TYPE_CHECKING: # Feel free to check the dagger documentation for more information on the Container object and its methods. # https://dagger-io.readthedocs.io/en/sdk-python-v0.6.4/ from dagger import Container - - -async def pre_connector_install(base_image_container: Container) -> Container: - return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value") - -async def post_connector_install(connector_container: Container) -> Container: - return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value") ``` -#### Build your own connector image -This connector is built using our dynamic built process in `airbyte-ci`. -The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`. -The build logic is defined using [Dagger](https://dagger.io/) [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py). -It does not rely on a Dockerfile. - -If you would like to patch our connector and build your own a simple approach would be to: +An image will be available on your host with the tag `airbyte/source-paypal-transaction:dev`. -1. Create your own Dockerfile based on the latest version of the connector image. -```Dockerfile -FROM airbyte/source-paypal-transaction:latest -COPY . ./airbyte/integration_code -RUN pip install ./airbyte/integration_code - -# The entrypoint and default env vars are already set in the base image -# ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" -# ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -``` -Please use this as an example. This is not optimized. - -2. Build your image: -```bash -docker build -t airbyte/source-paypal-transaction:dev . -# Running the spec command against your patched connector -docker run airbyte/source-paypal-transaction:dev spec -``` -#### Run +### Running as a docker container Then run any of the connector commands as follows: ``` docker run --rm airbyte/source-paypal-transaction:dev spec -docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-paypal-transaction:dev check --config /secrets/config_oauth.json -docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-paypal-transaction:dev discover --config /secrets/config_oauth.json -docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-paypal-transaction:dev read --config /secrets/config_oauth.json --catalog /integration_tests/configured_catalog.json +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-paypal-transaction:dev check --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-paypal-transaction:dev discover --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-paypal-transaction:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json ``` ## Testing with CI test suite You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md): + ```bash airbyte-ci connectors --name=source-paypal-transaction test ``` @@ -121,9 +103,10 @@ airbyte-ci connectors --name source-paypal-transaction --use-local-secrets test ``` ### Customizing acceptance Tests -Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. +Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. + ## Running Unit tests locally To run unit tests locally, form the root `source_paypal_transaction` directory run: @@ -199,13 +182,26 @@ We split dependencies between two groups, dependencies that are: * required for your connector to work need to go to `MAIN_REQUIREMENTS` list. * required for the testing need to go to `TEST_REQUIREMENTS` list -### Publishing a new version of the connector + +All of your dependencies should be managed via Poetry. + +To add a new dependency, run: +```bash +poetry add +``` + + +Please commit the changes to `pyproject.toml` and `poetry.lock` files. + +## Publishing a new version of the connector You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what? 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-paypal-transaction test` -2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors). +2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)): + - bump the `dockerImageTag` value in in `metadata.yaml` + - bump the `version` value in `pyproject.toml` 3. Make sure the `metadata.yaml` content is up to date. -4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/paypal-transaction.md`). +4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/paypal-transaction.md`). 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention). 6. Pat yourself on the back for being an awesome contributor. 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master. - +8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry. \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml index 411d7b327841..3449c818497c 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/metadata.yaml @@ -27,7 +27,6 @@ data: enabled: true oss: enabled: true - #Updates in doc changelog releaseDate: 2021-06-10 releaseStage: generally_available releases: diff --git a/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock b/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock new file mode 100644 index 000000000000..be73428bcd6b --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock @@ -0,0 +1,1216 @@ +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "airbyte-cdk" +version = "0.62.0" +description = "A framework for writing Airbyte Connectors." +optional = false +python-versions = ">=3.8" +files = [ + {file = "airbyte-cdk-0.62.0.tar.gz", hash = "sha256:622f56bd7101493a74f11c33a45a31c251032333989996f137cac8370873c614"}, + {file = "airbyte_cdk-0.62.0-py3-none-any.whl", hash = "sha256:b21330a566b33dbdddde33243eb9855f086ad4272e3585ca626be1225451a3b8"}, +] + +[package.dependencies] +airbyte-protocol-models = "0.5.1" +backoff = "*" +cachetools = "*" +Deprecated = ">=1.2,<2.0" +dpath = ">=2.0.1,<2.1.0" +genson = "1.2.2" +isodate = ">=0.6.1,<0.7.0" +Jinja2 = ">=3.1.2,<3.2.0" +jsonref = ">=0.2,<1.0" +jsonschema = ">=3.2.0,<3.3.0" +pendulum = "<3.0.0" +pydantic = ">=1.10.8,<2.0.0" +pyrate-limiter = ">=3.1.0,<3.2.0" +python-dateutil = "*" +PyYAML = ">=6.0.1" +requests = "*" +requests-cache = "*" +wcmatch = "8.4" + +[package.extras] +dev = ["avro (>=1.11.2,<1.12.0)", "cohere (==4.21)", "fastavro (>=1.8.0,<1.9.0)", "freezegun", "langchain (==0.0.271)", "markdown", "mypy", "openai[embeddings] (==0.27.9)", "pandas (==2.0.3)", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (==12.0.1)", "pytesseract (==0.3.10)", "pytest", "pytest-cov", "pytest-httpserver", "pytest-mock", "requests-mock", "tiktoken (==0.4.0)", "unstructured (==0.10.27)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] +file-based = ["avro (>=1.11.2,<1.12.0)", "fastavro (>=1.8.0,<1.9.0)", "markdown", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (==12.0.1)", "pytesseract (==0.3.10)", "unstructured (==0.10.27)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] +sphinx-docs = ["Sphinx (>=4.2,<5.0)", "sphinx-rtd-theme (>=1.0,<2.0)"] +vector-db-based = ["cohere (==4.21)", "langchain (==0.0.271)", "openai[embeddings] (==0.27.9)", "tiktoken (==0.4.0)"] + +[[package]] +name = "airbyte-protocol-models" +version = "0.5.1" +description = "Declares the Airbyte Protocol." +optional = false +python-versions = ">=3.8" +files = [ + {file = "airbyte_protocol_models-0.5.1-py3-none-any.whl", hash = "sha256:dfe84e130e51ce2ae81a06d5aa36f6c5ce3152b9e36e6f0195fad6c3dab0927e"}, + {file = "airbyte_protocol_models-0.5.1.tar.gz", hash = "sha256:7c8b16c7c1c7956b1996052e40585a3a93b1e44cb509c4e97c1ee4fe507ea086"}, +] + +[package.dependencies] +pydantic = ">=1.9.2,<2.0.0" + +[[package]] +name = "attrs" +version = "23.2.0" +description = "Classes Without Boilerplate" +optional = false +python-versions = ">=3.7" +files = [ + {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, + {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, +] + +[package.extras] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] +tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] + +[[package]] +name = "backoff" +version = "2.2.1" +description = "Function decoration for backoff and retry" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, + {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, +] + +[[package]] +name = "bracex" +version = "2.4" +description = "Bash style brace expander." +optional = false +python-versions = ">=3.8" +files = [ + {file = "bracex-2.4-py3-none-any.whl", hash = "sha256:efdc71eff95eaff5e0f8cfebe7d01adf2c8637c8c92edaf63ef348c241a82418"}, + {file = "bracex-2.4.tar.gz", hash = "sha256:a27eaf1df42cf561fed58b7a8f3fdf129d1ea16a81e1fadd1d17989bc6384beb"}, +] + +[[package]] +name = "cachetools" +version = "5.3.2" +description = "Extensible memoizing collections and decorators" +optional = false +python-versions = ">=3.7" +files = [ + {file = "cachetools-5.3.2-py3-none-any.whl", hash = "sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1"}, + {file = "cachetools-5.3.2.tar.gz", hash = "sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2"}, +] + +[[package]] +name = "cattrs" +version = "23.2.3" +description = "Composable complex class support for attrs and dataclasses." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cattrs-23.2.3-py3-none-any.whl", hash = "sha256:0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108"}, + {file = "cattrs-23.2.3.tar.gz", hash = "sha256:a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f"}, +] + +[package.dependencies] +attrs = ">=23.1.0" +exceptiongroup = {version = ">=1.1.1", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.1.0,<4.6.3 || >4.6.3", markers = "python_version < \"3.11\""} + +[package.extras] +bson = ["pymongo (>=4.4.0)"] +cbor2 = ["cbor2 (>=5.4.6)"] +msgpack = ["msgpack (>=1.0.5)"] +orjson = ["orjson (>=3.9.2)"] +pyyaml = ["pyyaml (>=6.0)"] +tomlkit = ["tomlkit (>=0.11.8)"] +ujson = ["ujson (>=5.7.0)"] + +[[package]] +name = "certifi" +version = "2024.2.2" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, +] + +[[package]] +name = "cffi" +version = "1.16.0" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, + {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, + {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, + {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, + {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, + {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, + {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, + {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, + {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, + {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, + {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, + {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, + {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, + {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, + {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "3.3.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "deprecated" +version = "1.2.14" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, + {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] + +[[package]] +name = "dpath" +version = "2.0.8" +description = "Filesystem-like pathing and searching for dictionaries" +optional = false +python-versions = ">=3.7" +files = [ + {file = "dpath-2.0.8-py3-none-any.whl", hash = "sha256:f92f595214dd93a00558d75d4b858beee519f4cffca87f02616ad6cd013f3436"}, + {file = "dpath-2.0.8.tar.gz", hash = "sha256:a3440157ebe80d0a3ad794f1b61c571bef125214800ffdb9afc9424e8250fe9b"}, +] + +[[package]] +name = "exceptiongroup" +version = "1.2.0" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "genson" +version = "1.2.2" +description = "GenSON is a powerful, user-friendly JSON Schema generator." +optional = false +python-versions = "*" +files = [ + {file = "genson-1.2.2.tar.gz", hash = "sha256:8caf69aa10af7aee0e1a1351d1d06801f4696e005f06cedef438635384346a16"}, +] + +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "idna" +version = "3.6" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "isodate" +version = "0.6.1" +description = "An ISO 8601 date/time/duration parser and formatter" +optional = false +python-versions = "*" +files = [ + {file = "isodate-0.6.1-py2.py3-none-any.whl", hash = "sha256:0751eece944162659049d35f4f549ed815792b38793f07cf73381c1c87cbed96"}, + {file = "isodate-0.6.1.tar.gz", hash = "sha256:48c5881de7e8b0a0d648cb024c8062dc84e7b840ed81e864c7614fd3c127bde9"}, +] + +[package.dependencies] +six = "*" + +[[package]] +name = "jinja2" +version = "3.1.3" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, + {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "jsonref" +version = "0.3.0" +description = "jsonref is a library for automatic dereferencing of JSON Reference objects for Python." +optional = false +python-versions = ">=3.3,<4.0" +files = [ + {file = "jsonref-0.3.0-py3-none-any.whl", hash = "sha256:9480ad1b500f7e795daeb0ef29f9c55ae3a9ab38fb8d6659b6f4868acb5a5bc8"}, + {file = "jsonref-0.3.0.tar.gz", hash = "sha256:68b330c6815dc0d490dbb3d65ccda265ddde9f7856fd2f3322f971d456ea7549"}, +] + +[[package]] +name = "jsonschema" +version = "3.2.0" +description = "An implementation of JSON Schema validation for Python" +optional = false +python-versions = "*" +files = [ + {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, + {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, +] + +[package.dependencies] +attrs = ">=17.4.0" +pyrsistent = ">=0.14.0" +setuptools = "*" +six = ">=1.11.0" + +[package.extras] +format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] +format-nongpl = ["idna", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "webcolors"] + +[[package]] +name = "markupsafe" +version = "2.1.5" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, + {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, +] + +[[package]] +name = "outcome" +version = "1.3.0.post0" +description = "Capture the outcome of Python function calls." +optional = false +python-versions = ">=3.7" +files = [ + {file = "outcome-1.3.0.post0-py2.py3-none-any.whl", hash = "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b"}, + {file = "outcome-1.3.0.post0.tar.gz", hash = "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8"}, +] + +[package.dependencies] +attrs = ">=19.2.0" + +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "pendulum" +version = "2.1.2" +description = "Python datetimes made easy" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "pendulum-2.1.2-cp27-cp27m-macosx_10_15_x86_64.whl", hash = "sha256:b6c352f4bd32dff1ea7066bd31ad0f71f8d8100b9ff709fb343f3b86cee43efe"}, + {file = "pendulum-2.1.2-cp27-cp27m-win_amd64.whl", hash = "sha256:318f72f62e8e23cd6660dbafe1e346950281a9aed144b5c596b2ddabc1d19739"}, + {file = "pendulum-2.1.2-cp35-cp35m-macosx_10_15_x86_64.whl", hash = "sha256:0731f0c661a3cb779d398803655494893c9f581f6488048b3fb629c2342b5394"}, + {file = "pendulum-2.1.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:3481fad1dc3f6f6738bd575a951d3c15d4b4ce7c82dce37cf8ac1483fde6e8b0"}, + {file = "pendulum-2.1.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9702069c694306297ed362ce7e3c1ef8404ac8ede39f9b28b7c1a7ad8c3959e3"}, + {file = "pendulum-2.1.2-cp35-cp35m-win_amd64.whl", hash = "sha256:fb53ffa0085002ddd43b6ca61a7b34f2d4d7c3ed66f931fe599e1a531b42af9b"}, + {file = "pendulum-2.1.2-cp36-cp36m-macosx_10_15_x86_64.whl", hash = "sha256:c501749fdd3d6f9e726086bf0cd4437281ed47e7bca132ddb522f86a1645d360"}, + {file = "pendulum-2.1.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:c807a578a532eeb226150d5006f156632df2cc8c5693d778324b43ff8c515dd0"}, + {file = "pendulum-2.1.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:2d1619a721df661e506eff8db8614016f0720ac171fe80dda1333ee44e684087"}, + {file = "pendulum-2.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:f888f2d2909a414680a29ae74d0592758f2b9fcdee3549887779cd4055e975db"}, + {file = "pendulum-2.1.2-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:e95d329384717c7bf627bf27e204bc3b15c8238fa8d9d9781d93712776c14002"}, + {file = "pendulum-2.1.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:4c9c689747f39d0d02a9f94fcee737b34a5773803a64a5fdb046ee9cac7442c5"}, + {file = "pendulum-2.1.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:1245cd0075a3c6d889f581f6325dd8404aca5884dea7223a5566c38aab94642b"}, + {file = "pendulum-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:db0a40d8bcd27b4fb46676e8eb3c732c67a5a5e6bfab8927028224fbced0b40b"}, + {file = "pendulum-2.1.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:f5e236e7730cab1644e1b87aca3d2ff3e375a608542e90fe25685dae46310116"}, + {file = "pendulum-2.1.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:de42ea3e2943171a9e95141f2eecf972480636e8e484ccffaf1e833929e9e052"}, + {file = "pendulum-2.1.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7c5ec650cb4bec4c63a89a0242cc8c3cebcec92fcfe937c417ba18277d8560be"}, + {file = "pendulum-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:33fb61601083f3eb1d15edeb45274f73c63b3c44a8524703dc143f4212bf3269"}, + {file = "pendulum-2.1.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:29c40a6f2942376185728c9a0347d7c0f07905638c83007e1d262781f1e6953a"}, + {file = "pendulum-2.1.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:94b1fc947bfe38579b28e1cccb36f7e28a15e841f30384b5ad6c5e31055c85d7"}, + {file = "pendulum-2.1.2.tar.gz", hash = "sha256:b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207"}, +] + +[package.dependencies] +python-dateutil = ">=2.6,<3.0" +pytzdata = ">=2020.1" + +[[package]] +name = "platformdirs" +version = "4.2.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] + +[[package]] +name = "pluggy" +version = "1.4.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + +[[package]] +name = "pydantic" +version = "1.10.14" +description = "Data validation and settings management using python type hints" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pydantic-1.10.14-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7f4fcec873f90537c382840f330b90f4715eebc2bc9925f04cb92de593eae054"}, + {file = "pydantic-1.10.14-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e3a76f571970fcd3c43ad982daf936ae39b3e90b8a2e96c04113a369869dc87"}, + {file = "pydantic-1.10.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d886bd3c3fbeaa963692ef6b643159ccb4b4cefaf7ff1617720cbead04fd1d"}, + {file = "pydantic-1.10.14-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:798a3d05ee3b71967844a1164fd5bdb8c22c6d674f26274e78b9f29d81770c4e"}, + {file = "pydantic-1.10.14-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:23d47a4b57a38e8652bcab15a658fdb13c785b9ce217cc3a729504ab4e1d6bc9"}, + {file = "pydantic-1.10.14-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f9f674b5c3bebc2eba401de64f29948ae1e646ba2735f884d1594c5f675d6f2a"}, + {file = "pydantic-1.10.14-cp310-cp310-win_amd64.whl", hash = "sha256:24a7679fab2e0eeedb5a8924fc4a694b3bcaac7d305aeeac72dd7d4e05ecbebf"}, + {file = "pydantic-1.10.14-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9d578ac4bf7fdf10ce14caba6f734c178379bd35c486c6deb6f49006e1ba78a7"}, + {file = "pydantic-1.10.14-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa7790e94c60f809c95602a26d906eba01a0abee9cc24150e4ce2189352deb1b"}, + {file = "pydantic-1.10.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aad4e10efa5474ed1a611b6d7f0d130f4aafadceb73c11d9e72823e8f508e663"}, + {file = "pydantic-1.10.14-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1245f4f61f467cb3dfeced2b119afef3db386aec3d24a22a1de08c65038b255f"}, + {file = "pydantic-1.10.14-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:21efacc678a11114c765eb52ec0db62edffa89e9a562a94cbf8fa10b5db5c046"}, + {file = "pydantic-1.10.14-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:412ab4a3f6dbd2bf18aefa9f79c7cca23744846b31f1d6555c2ee2b05a2e14ca"}, + {file = "pydantic-1.10.14-cp311-cp311-win_amd64.whl", hash = "sha256:e897c9f35281f7889873a3e6d6b69aa1447ceb024e8495a5f0d02ecd17742a7f"}, + {file = "pydantic-1.10.14-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d604be0f0b44d473e54fdcb12302495fe0467c56509a2f80483476f3ba92b33c"}, + {file = "pydantic-1.10.14-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a42c7d17706911199798d4c464b352e640cab4351efe69c2267823d619a937e5"}, + {file = "pydantic-1.10.14-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:596f12a1085e38dbda5cbb874d0973303e34227b400b6414782bf205cc14940c"}, + {file = "pydantic-1.10.14-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bfb113860e9288d0886e3b9e49d9cf4a9d48b441f52ded7d96db7819028514cc"}, + {file = "pydantic-1.10.14-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bc3ed06ab13660b565eed80887fcfbc0070f0aa0691fbb351657041d3e874efe"}, + {file = "pydantic-1.10.14-cp37-cp37m-win_amd64.whl", hash = "sha256:ad8c2bc677ae5f6dbd3cf92f2c7dc613507eafe8f71719727cbc0a7dec9a8c01"}, + {file = "pydantic-1.10.14-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c37c28449752bb1f47975d22ef2882d70513c546f8f37201e0fec3a97b816eee"}, + {file = "pydantic-1.10.14-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49a46a0994dd551ec051986806122767cf144b9702e31d47f6d493c336462597"}, + {file = "pydantic-1.10.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53e3819bd20a42470d6dd0fe7fc1c121c92247bca104ce608e609b59bc7a77ee"}, + {file = "pydantic-1.10.14-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0fbb503bbbbab0c588ed3cd21975a1d0d4163b87e360fec17a792f7d8c4ff29f"}, + {file = "pydantic-1.10.14-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:336709883c15c050b9c55a63d6c7ff09be883dbc17805d2b063395dd9d9d0022"}, + {file = "pydantic-1.10.14-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4ae57b4d8e3312d486e2498d42aed3ece7b51848336964e43abbf9671584e67f"}, + {file = "pydantic-1.10.14-cp38-cp38-win_amd64.whl", hash = "sha256:dba49d52500c35cfec0b28aa8b3ea5c37c9df183ffc7210b10ff2a415c125c4a"}, + {file = "pydantic-1.10.14-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c66609e138c31cba607d8e2a7b6a5dc38979a06c900815495b2d90ce6ded35b4"}, + {file = "pydantic-1.10.14-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d986e115e0b39604b9eee3507987368ff8148222da213cd38c359f6f57b3b347"}, + {file = "pydantic-1.10.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:646b2b12df4295b4c3148850c85bff29ef6d0d9621a8d091e98094871a62e5c7"}, + {file = "pydantic-1.10.14-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282613a5969c47c83a8710cc8bfd1e70c9223feb76566f74683af889faadc0ea"}, + {file = "pydantic-1.10.14-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:466669501d08ad8eb3c4fecd991c5e793c4e0bbd62299d05111d4f827cded64f"}, + {file = "pydantic-1.10.14-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:13e86a19dca96373dcf3190fcb8797d40a6f12f154a244a8d1e8e03b8f280593"}, + {file = "pydantic-1.10.14-cp39-cp39-win_amd64.whl", hash = "sha256:08b6ec0917c30861e3fe71a93be1648a2aa4f62f866142ba21670b24444d7fd8"}, + {file = "pydantic-1.10.14-py3-none-any.whl", hash = "sha256:8ee853cd12ac2ddbf0ecbac1c289f95882b2d4482258048079d13be700aa114c"}, + {file = "pydantic-1.10.14.tar.gz", hash = "sha256:46f17b832fe27de7850896f3afee50ea682220dd218f7e9c88d436788419dca6"}, +] + +[package.dependencies] +typing-extensions = ">=4.2.0" + +[package.extras] +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] + +[[package]] +name = "pyrate-limiter" +version = "3.1.1" +description = "Python Rate-Limiter using Leaky-Bucket Algorithm" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "pyrate_limiter-3.1.1-py3-none-any.whl", hash = "sha256:c51906f1d51d56dc992ff6c26e8300e32151bc6cfa3e6559792e31971dfd4e2b"}, + {file = "pyrate_limiter-3.1.1.tar.gz", hash = "sha256:2f57eda712687e6eccddf6afe8f8a15b409b97ed675fe64a626058f12863b7b7"}, +] + +[package.extras] +all = ["filelock (>=3.0)", "redis (>=5.0.0,<6.0.0)"] +docs = ["furo (>=2022.3.4,<2023.0.0)", "myst-parser (>=0.17)", "sphinx (>=4.3.0,<5.0.0)", "sphinx-autodoc-typehints (>=1.17,<2.0)", "sphinx-copybutton (>=0.5)", "sphinxcontrib-apidoc (>=0.3,<0.4)"] + +[[package]] +name = "pyrsistent" +version = "0.20.0" +description = "Persistent/Functional/Immutable data structures" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyrsistent-0.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c3aba3e01235221e5b229a6c05f585f344734bd1ad42a8ac51493d74722bbce"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1beb78af5423b879edaf23c5591ff292cf7c33979734c99aa66d5914ead880f"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21cc459636983764e692b9eba7144cdd54fdec23ccdb1e8ba392a63666c60c34"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5ac696f02b3fc01a710427585c855f65cd9c640e14f52abe52020722bb4906b"}, + {file = "pyrsistent-0.20.0-cp310-cp310-win32.whl", hash = "sha256:0724c506cd8b63c69c7f883cc233aac948c1ea946ea95996ad8b1380c25e1d3f"}, + {file = "pyrsistent-0.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:8441cf9616d642c475684d6cf2520dd24812e996ba9af15e606df5f6fd9d04a7"}, + {file = "pyrsistent-0.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0f3b1bcaa1f0629c978b355a7c37acd58907390149b7311b5db1b37648eb6958"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cdd7ef1ea7a491ae70d826b6cc64868de09a1d5ff9ef8d574250d0940e275b8"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cae40a9e3ce178415040a0383f00e8d68b569e97f31928a3a8ad37e3fde6df6a"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6288b3fa6622ad8a91e6eb759cfc48ff3089e7c17fb1d4c59a919769314af224"}, + {file = "pyrsistent-0.20.0-cp311-cp311-win32.whl", hash = "sha256:7d29c23bdf6e5438c755b941cef867ec2a4a172ceb9f50553b6ed70d50dfd656"}, + {file = "pyrsistent-0.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:59a89bccd615551391f3237e00006a26bcf98a4d18623a19909a2c48b8e986ee"}, + {file = "pyrsistent-0.20.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:09848306523a3aba463c4b49493a760e7a6ca52e4826aa100ee99d8d39b7ad1e"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a14798c3005ec892bbada26485c2eea3b54109cb2533713e355c806891f63c5e"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b14decb628fac50db5e02ee5a35a9c0772d20277824cfe845c8a8b717c15daa3"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e2c116cc804d9b09ce9814d17df5edf1df0c624aba3b43bc1ad90411487036d"}, + {file = "pyrsistent-0.20.0-cp312-cp312-win32.whl", hash = "sha256:e78d0c7c1e99a4a45c99143900ea0546025e41bb59ebc10182e947cf1ece9174"}, + {file = "pyrsistent-0.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:4021a7f963d88ccd15b523787d18ed5e5269ce57aa4037146a2377ff607ae87d"}, + {file = "pyrsistent-0.20.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:79ed12ba79935adaac1664fd7e0e585a22caa539dfc9b7c7c6d5ebf91fb89054"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f920385a11207dc372a028b3f1e1038bb244b3ec38d448e6d8e43c6b3ba20e98"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f5c2d012671b7391803263419e31b5c7c21e7c95c8760d7fc35602353dee714"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef3992833fbd686ee783590639f4b8343a57f1f75de8633749d984dc0eb16c86"}, + {file = "pyrsistent-0.20.0-cp38-cp38-win32.whl", hash = "sha256:881bbea27bbd32d37eb24dd320a5e745a2a5b092a17f6debc1349252fac85423"}, + {file = "pyrsistent-0.20.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d270ec9dd33cdb13f4d62c95c1a5a50e6b7cdd86302b494217137f760495b9d"}, + {file = "pyrsistent-0.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ca52d1ceae015859d16aded12584c59eb3825f7b50c6cfd621d4231a6cc624ce"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b318ca24db0f0518630e8b6f3831e9cba78f099ed5c1d65ffe3e023003043ba0"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fed2c3216a605dc9a6ea50c7e84c82906e3684c4e80d2908208f662a6cbf9022"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e14c95c16211d166f59c6611533d0dacce2e25de0f76e4c140fde250997b3ca"}, + {file = "pyrsistent-0.20.0-cp39-cp39-win32.whl", hash = "sha256:f058a615031eea4ef94ead6456f5ec2026c19fb5bd6bfe86e9665c4158cf802f"}, + {file = "pyrsistent-0.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:58b8f6366e152092194ae68fefe18b9f0b4f89227dfd86a07770c3d86097aebf"}, + {file = "pyrsistent-0.20.0-py3-none-any.whl", hash = "sha256:c55acc4733aad6560a7f5f818466631f07efc001fd023f34a6c203f8b6df0f0b"}, + {file = "pyrsistent-0.20.0.tar.gz", hash = "sha256:4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4"}, +] + +[[package]] +name = "pysocks" +version = "1.7.1" +description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "PySocks-1.7.1-py27-none-any.whl", hash = "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299"}, + {file = "PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5"}, + {file = "PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"}, +] + +[[package]] +name = "pytest" +version = "8.0.0" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, + {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.3.0,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-mock" +version = "3.12.0" +description = "Thin-wrapper around the mock package for easier use with pytest" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, + {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, +] + +[package.dependencies] +pytest = ">=5.0" + +[package.extras] +dev = ["pre-commit", "pytest-asyncio", "tox"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pytzdata" +version = "2020.1" +description = "The Olson timezone database for Python." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pytzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f"}, + {file = "pytzdata-2020.1.tar.gz", hash = "sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"}, +] + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-cache" +version = "1.1.1" +description = "A persistent cache for python requests" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "requests_cache-1.1.1-py3-none-any.whl", hash = "sha256:c8420cf096f3aafde13c374979c21844752e2694ffd8710e6764685bb577ac90"}, + {file = "requests_cache-1.1.1.tar.gz", hash = "sha256:764f93d3fa860be72125a568c2cc8eafb151cf29b4dc2515433a56ee657e1c60"}, +] + +[package.dependencies] +attrs = ">=21.2" +cattrs = ">=22.2" +platformdirs = ">=2.5" +requests = ">=2.22" +url-normalize = ">=1.4" +urllib3 = ">=1.25.5" + +[package.extras] +all = ["boto3 (>=1.15)", "botocore (>=1.18)", "itsdangerous (>=2.0)", "pymongo (>=3)", "pyyaml (>=5.4)", "redis (>=3)", "ujson (>=5.4)"] +bson = ["bson (>=0.5)"] +docs = ["furo (>=2023.3,<2024.0)", "linkify-it-py (>=2.0,<3.0)", "myst-parser (>=1.0,<2.0)", "sphinx (>=5.0.2,<6.0.0)", "sphinx-autodoc-typehints (>=1.19)", "sphinx-automodapi (>=0.14)", "sphinx-copybutton (>=0.5)", "sphinx-design (>=0.2)", "sphinx-notfound-page (>=0.8)", "sphinxcontrib-apidoc (>=0.3)", "sphinxext-opengraph (>=0.6)"] +dynamodb = ["boto3 (>=1.15)", "botocore (>=1.18)"] +json = ["ujson (>=5.4)"] +mongodb = ["pymongo (>=3)"] +redis = ["redis (>=3)"] +security = ["itsdangerous (>=2.0)"] +yaml = ["pyyaml (>=5.4)"] + +[[package]] +name = "requests-mock" +version = "1.11.0" +description = "Mock out responses from the requests package" +optional = false +python-versions = "*" +files = [ + {file = "requests-mock-1.11.0.tar.gz", hash = "sha256:ef10b572b489a5f28e09b708697208c4a3b2b89ef80a9f01584340ea357ec3c4"}, + {file = "requests_mock-1.11.0-py2.py3-none-any.whl", hash = "sha256:f7fae383f228633f6bececebdab236c478ace2284d6292c6e7e2867b9ab74d15"}, +] + +[package.dependencies] +requests = ">=2.3,<3" +six = "*" + +[package.extras] +fixture = ["fixtures"] +test = ["fixtures", "mock", "purl", "pytest", "requests-futures", "sphinx", "testtools"] + +[[package]] +name = "selenium" +version = "4.17.2" +description = "" +optional = false +python-versions = ">=3.8" +files = [ + {file = "selenium-4.17.2-py3-none-any.whl", hash = "sha256:5aee79026c07985dc1b0c909f34084aa996dfe5b307602de9016d7a621a473f2"}, + {file = "selenium-4.17.2.tar.gz", hash = "sha256:d43d6972e516855fb242ef9ce4ce759057b115070e702e7b1c1032fe7b38d87b"}, +] + +[package.dependencies] +certifi = ">=2021.10.8" +trio = ">=0.17,<1.0" +trio-websocket = ">=0.9,<1.0" +typing_extensions = ">=4.9.0" +urllib3 = {version = ">=1.26,<3", extras = ["socks"]} + +[[package]] +name = "setuptools" +version = "69.1.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "setuptools-69.1.0-py3-none-any.whl", hash = "sha256:c054629b81b946d63a9c6e732bc8b2513a7c3ea645f11d0139a2191d735c60c6"}, + {file = "setuptools-69.1.0.tar.gz", hash = "sha256:850894c4195f09c4ed30dba56213bf7c3f21d86ed6bdaafb5df5972593bfc401"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, +] + +[[package]] +name = "sortedcontainers" +version = "2.4.0" +description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" +optional = false +python-versions = "*" +files = [ + {file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"}, + {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, +] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "trio" +version = "0.24.0" +description = "A friendly Python library for async concurrency and I/O" +optional = false +python-versions = ">=3.8" +files = [ + {file = "trio-0.24.0-py3-none-any.whl", hash = "sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c"}, + {file = "trio-0.24.0.tar.gz", hash = "sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d"}, +] + +[package.dependencies] +attrs = ">=20.1.0" +cffi = {version = ">=1.14", markers = "os_name == \"nt\" and implementation_name != \"pypy\""} +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +idna = "*" +outcome = "*" +sniffio = ">=1.3.0" +sortedcontainers = "*" + +[[package]] +name = "trio-websocket" +version = "0.11.1" +description = "WebSocket library for Trio" +optional = false +python-versions = ">=3.7" +files = [ + {file = "trio-websocket-0.11.1.tar.gz", hash = "sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f"}, + {file = "trio_websocket-0.11.1-py3-none-any.whl", hash = "sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638"}, +] + +[package.dependencies] +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +trio = ">=0.11" +wsproto = ">=0.14" + +[[package]] +name = "typing-extensions" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, +] + +[[package]] +name = "url-normalize" +version = "1.4.3" +description = "URL normalization for Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "url-normalize-1.4.3.tar.gz", hash = "sha256:d23d3a070ac52a67b83a1c59a0e68f8608d1cd538783b401bc9de2c0fac999b2"}, + {file = "url_normalize-1.4.3-py2.py3-none-any.whl", hash = "sha256:ec3c301f04e5bb676d333a7fa162fa977ad2ca04b7e652bfc9fac4e405728eed"}, +] + +[package.dependencies] +six = "*" + +[[package]] +name = "urllib3" +version = "2.2.0" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.8" +files = [ + {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, + {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, +] + +[package.dependencies] +pysocks = {version = ">=1.5.6,<1.5.7 || >1.5.7,<2.0", optional = true, markers = "extra == \"socks\""} + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "wcmatch" +version = "8.4" +description = "Wildcard/glob file name matcher." +optional = false +python-versions = ">=3.7" +files = [ + {file = "wcmatch-8.4-py3-none-any.whl", hash = "sha256:dc7351e5a7f8bbf4c6828d51ad20c1770113f5f3fd3dfe2a03cfde2a63f03f98"}, + {file = "wcmatch-8.4.tar.gz", hash = "sha256:ba4fc5558f8946bf1ffc7034b05b814d825d694112499c86035e0e4d398b6a67"}, +] + +[package.dependencies] +bracex = ">=2.1.1" + +[[package]] +name = "wrapt" +version = "1.16.0" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +] + +[[package]] +name = "wsproto" +version = "1.2.0" +description = "WebSockets state-machine based protocol implementation" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736"}, + {file = "wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065"}, +] + +[package.dependencies] +h11 = ">=0.9.0,<1" + +[metadata] +lock-version = "2.0" +python-versions = "^3.9,<3.12" +content-hash = "734a63a70fbb15f2bba2328a4f124785e30c369ad58062eb68afc53df56a5ef0" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml b/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml new file mode 100644 index 000000000000..9b646de9f81e --- /dev/null +++ b/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = [ "poetry-core>=1.0.0",] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +version = "2.3.0" +name = "source-paypal-transaction" +description = "Source implementation for Paypal Transaction." +authors = [ "Airbyte ",] +license = "MIT" +readme = "README.md" +documentation = "https://docs.airbyte.com/integrations/sources/paypal-transaction" +homepage = "https://airbyte.com" +repository = "https://github.com/airbytehq/airbyte" +[[tool.poetry.packages]] +include = "source_paypal_transaction" + +[tool.poetry.dependencies] +python = "^3.9,<3.12" +airbyte-cdk = "==0.62.0" + +[tool.poetry.scripts] +source-paypal-transaction = "source_paypal_transaction.run:run" + +[tool.poetry.group.dev.dependencies] +pytest = "^8.0" +pytest-mock = "^3.12" +requests-mock = "^1.11.0" +selenium = "^4.17.2" diff --git a/airbyte-integrations/connectors/source-paypal-transaction/setup.py b/airbyte-integrations/connectors/source-paypal-transaction/setup.py deleted file mode 100644 index fa2b7fa8102a..000000000000 --- a/airbyte-integrations/connectors/source-paypal-transaction/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - -from setuptools import find_packages, setup - -MAIN_REQUIREMENTS = [ - "airbyte-cdk>=0.62.0", -] - -TEST_REQUIREMENTS = [ - "pytest~=8.0", - "pytest-mock~=3.12", - "requests-mock~=1.11", - "selenium~=4.17.2", -] - -setup( - entry_points={ - "console_scripts": [ - "source-paypal-transaction=source_paypal_transaction.run:run", - ], - }, - name="source_paypal_transaction", - description="Source implementation for Paypal Transaction.", - author="Airbyte", - author_email="jose.pineda@airbyte.io", - packages=find_packages(), - install_requires=MAIN_REQUIREMENTS, - package_data={ - "": [ - # Include yaml files in the package (if any) - "*.yml", - "*.yaml", - # Include all json files in the package, up to 4 levels deep - "*.json", - "*/*.json", - "*/*/*.json", - "*/*/*/*.json", - "*/*/*/*/*.json", - ] - }, - extras_require={ - "tests": TEST_REQUIREMENTS, - }, -) diff --git a/docs/integrations/sources/paypal-transaction.md b/docs/integrations/sources/paypal-transaction.md index 138f0076ab4a..22ae87a8c459 100644 --- a/docs/integrations/sources/paypal-transaction.md +++ b/docs/integrations/sources/paypal-transaction.md @@ -56,6 +56,17 @@ By default, syncs are run with a slice period of 7 days. If you see errors with ::: +## Supported sync modes + +The PayPal Transaction source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes): + +| Feature | Supported? | +| :------------------------ | :--------- | +| Full Refresh Sync | Yes | +| Incremental - Append Sync | Yes | +| Namespaces | No | + + ## Supported Streams This Source is capable of syncing the following core Streams: @@ -258,17 +269,18 @@ ___ | Integration Type | Airbyte Type | | :--------------- | :----------- | -| `string` | `string` | -| `number` | `number` | -| `array` | `array` | -| `object` | `object` | +| `string` | `string` | +| `number` | `number` | +| `array` | `array` | +| `object` | `object` | ## Changelog | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------| -| 2.3.1 | 2024-02-07 | [34510](https://github.com/airbytehq/airbyte/pull/34510) | Silver certified. New Streams Added | +| 2.3.0 | 2024-02-07 | [34510](https://github.com/airbytehq/airbyte/pull/34510) | Silver certified. New Streams Added | +| 2.2.2 | 2024-02-09 | [35075](https://github.com/airbytehq/airbyte/pull/35075) | Manage dependencies with Poetry. | 2.2.1 | 2024-01-11 | [34155](https://github.com/airbytehq/airbyte/pull/34155) | prepare for airbyte-lib | | 2.2.0 | 2023-10-25 | [31852](https://github.com/airbytehq/airbyte/pull/31852) | The size of the time_window can be configured | | 2.1.2 | 2023-10-23 | [31759](https://github.com/airbytehq/airbyte/pull/31759) | Keep transaction_id as a string and fetch data in 7-day batches From dd2987c81eca708bb51ee4f70ea7f3e575f8b61b Mon Sep 17 00:00:00 2001 From: alafanechere Date: Fri, 16 Feb 2024 10:20:30 +0100 Subject: [PATCH 27/36] regenerate poetry.lock with poetry 1.6.1 --- .../source-paypal-transaction/poetry.lock | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock b/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock index cd8cd2238647..421031229419 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock +++ b/airbyte-integrations/connectors/source-paypal-transaction/poetry.lock @@ -1,10 +1,8 @@ - -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "airbyte-cdk" version = "0.62.0" - description = "A framework for writing Airbyte Connectors." optional = false python-versions = ">=3.8" @@ -53,16 +51,6 @@ files = [ [package.dependencies] pydantic = ">=1.9.2,<2.0.0" -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - [[package]] name = "attrs" version = "23.2.0" @@ -640,17 +628,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, - - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] [[package]] @@ -795,7 +772,6 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] - [[package]] name = "pytest-mock" version = "3.12.0" @@ -863,7 +839,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1082,17 +1057,6 @@ exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} trio = ">=0.11" wsproto = ">=0.14" -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] - [[package]] name = "typing-extensions" version = "4.9.0" From 7494eca220cba5553caf634f2f9dac501ea76d75 Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Fri, 16 Feb 2024 09:01:23 -0600 Subject: [PATCH 28/36] Update airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml Changing Author back for consistency (suggestion) Co-authored-by: Augustin --- .../connectors/source-paypal-transaction/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml b/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml index 60a079504dc5..00533e610e8a 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml +++ b/airbyte-integrations/connectors/source-paypal-transaction/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api" version = "2.3.0" name = "source-paypal-transaction" description = "Source implementation for Paypal Transaction." -authors = [ "Airbyte ",] +authors = [ "Airbyte ",] license = "MIT" readme = "README.md" documentation = "https://docs.airbyte.com/integrations/sources/paypal-transaction" From f4133253f21b21e08d8f939e365e507aa1a5cc1c Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 16 Feb 2024 11:02:11 -0600 Subject: [PATCH 29/36] Add end date to spec(optional). Change python to poetry in ReadME file --- .../connectors/source-paypal-transaction/README.md | 2 +- .../source_paypal_transaction/spec.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/README.md b/airbyte-integrations/connectors/source-paypal-transaction/README.md index f5e69f3632d5..42d43f36fd15 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/README.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/README.md @@ -40,7 +40,7 @@ poetry run source-paypal-transaction spec poetry run source-paypal-transaction check --config secrets/config.json poetry run source-paypal-transaction discover --config secrets/config.json #Example with list_payments catalog and the debug flag -python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog_list_payments.json --debug +poetry run source-paypal-transaction read --config secrets/config.json --catalog integration_tests/configured_catalog_list_payments.json --debug ``` ### Running unit tests diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml index d8217490029f..fe55ab726e62 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -51,6 +51,15 @@ connectionSpecification: pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$ format: "date-time" order: 3 + end_date: + title: End Date + description: >- + End Date for data extraction in ISO + format. This can be help you select specific range of time, mainly for test purposes + or data integrity tests. When this is not used, now_utc() is used by the streams. + This does not apply to Disputes and Product streams. + order: 4 refresh_token: type: "string" title: "Refresh token" From c516725960e1b6af7e3dd41b75c25cd145b69f1a Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 16 Feb 2024 11:03:37 -0600 Subject: [PATCH 30/36] Add pattern to end_date --- .../source_paypal_transaction/spec.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml index fe55ab726e62..e8084a965331 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -29,7 +29,7 @@ connectionSpecification: format. Date must be in range from 3 years till 12 hrs before present time. type: string - examples: ["2021-06-11T23:59:59", "2021-06-11T23:59:59+00:00"] + examples: ["2021-06-11T23:59:59Z", "2021-06-11T23:59:59+00:00"] pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ format: "date-time" order: 2 @@ -59,6 +59,8 @@ connectionSpecification: format. This can be help you select specific range of time, mainly for test purposes or data integrity tests. When this is not used, now_utc() is used by the streams. This does not apply to Disputes and Product streams. + examples: ["2021-06-11T23:59:59Z", "2021-06-11T23:59:59+00:00"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ order: 4 refresh_token: type: "string" From ee42253bdf3017a17b203f16cd8fbb6edfff0384 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 16 Feb 2024 14:10:38 -0600 Subject: [PATCH 31/36] Change congig[] to config.get and add dat-time --- .../source_paypal_transaction/manifest.yaml | 18 +++++++++--------- .../source_paypal_transaction/spec.yaml | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml index fb52b56193b2..ddc8283179c2 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/manifest.yaml @@ -99,7 +99,7 @@ definitions: start_datetime: type: MinMaxDatetime datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + {{ max( format_datetime(config.get('start_date'), '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption @@ -108,7 +108,7 @@ definitions: end_datetime: type: MinMaxDatetime datetime: >- - {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + {{ format_datetime(config.get('end_date') if config.get('end_date') else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} end_time_option: type: RequestOption field_name: end_date @@ -156,7 +156,7 @@ definitions: start_datetime: type: MinMaxDatetime datetime: >- - {{ max( format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} + {{ max( format_datetime(config.get('start_date'), '%Y-%m-%dT%H:%M:%SZ'), day_delta(-1095, format='%Y-%m-%dT%H:%M:%SZ') ) }} datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption @@ -267,13 +267,13 @@ definitions: datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" start_datetime: type: MinMaxDatetime - datetime: "{{ format_datetime(config['dispute_start_date'] if config['dispute_start_date'] else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" + datetime: "{{ format_datetime(config.get('dispute_start_date') if config.get('dispute_start_date') else (now_utc() - duration('P179D')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z' }}" datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" end_datetime: type: MinMaxDatetime #Adding a time delta as the API has a problem with the slice being too close to the now_utc. Set to 30M datetime: >- - {{ format_datetime(config['dispute_end_date'] if config['dispute_end_date'] else (now_utc() - duration('PT30M')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z'}} + {{ format_datetime(config.get('dispute_end_date') if config.get('dispute_end_date') else (now_utc() - duration('PT30M')), '%Y-%m-%dT%H:%M:%S.%fZ')[:23] + 'Z'}} datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" start_time_option: type: RequestOption @@ -320,9 +320,9 @@ definitions: Content-Type: application/json request_body_json: creation_date_range: - start: "{{ config['start_date'] }}" + start: "{{ config.get('start_date') }}" end: >- - {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + {{ format_datetime(config.get('end_date') if config.get('end_date') else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} $parameters: field_path: items path: "v2/invoicing/search-invoices" @@ -364,12 +364,12 @@ definitions: datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_datetime: #type: MinMaxDatetime - datetime: "{{ config['start_date'] }}" + datetime: "{{ config.get('start_date') }}" datetime_format: "%Y-%m-%dT%H:%M:%SZ" end_datetime: type: MinMaxDatetime datetime: >- - {{ format_datetime(config['end_date'] if config['end_date'] else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} + {{ format_datetime(config.get('end_date') if config.get('end_date') else now_utc(), '%Y-%m-%dT%H:%M:%SZ') }} datetime_format: "%Y-%m-%dT%H:%M:%SZ" start_time_option: type: RequestOption diff --git a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml index e8084a965331..8f3379e51cf6 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml +++ b/airbyte-integrations/connectors/source-paypal-transaction/source_paypal_transaction/spec.yaml @@ -59,8 +59,10 @@ connectionSpecification: format. This can be help you select specific range of time, mainly for test purposes or data integrity tests. When this is not used, now_utc() is used by the streams. This does not apply to Disputes and Product streams. + type: string examples: ["2021-06-11T23:59:59Z", "2021-06-11T23:59:59+00:00"] pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|Z|[+-][0-9]{2}:[0-9]{2})$ + format: "date-time" order: 4 refresh_token: type: "string" From 3891eddfe871a2bb2c8f7e771c46060e4654043f Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Fri, 16 Feb 2024 17:41:31 -0600 Subject: [PATCH 32/36] Update airbyte-integrations/connectors/source-paypal-transaction/README.md Co-authored-by: Alexandre Girard --- .../connectors/source-paypal-transaction/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/README.md b/airbyte-integrations/connectors/source-paypal-transaction/README.md index 42d43f36fd15..6cff7acce3aa 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/README.md +++ b/airbyte-integrations/connectors/source-paypal-transaction/README.md @@ -102,7 +102,7 @@ You can run our full test suite locally using [`airbyte-ci`](https://github.com/ airbyte-ci connectors --name=source-paypal-transaction test ``` -If you ar etesting locally, you can use your local credentials (config.json file) by using `--use-local-secrtes` +If you are testing locally, you can use your local credentials (config.json file) by using `--use-local-secrets` ```bash airbyte-ci connectors --name source-paypal-transaction --use-local-secrets test From d6f252f88bf8b604fa8ae46c276419a82a7daae0 Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Fri, 16 Feb 2024 17:51:29 -0600 Subject: [PATCH 33/36] Update invoices.py Remove dead code --- .../connectors/source-paypal-transaction/bin/invoices.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py index 8c651cf9320f..005a11c06169 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/invoices.py @@ -56,11 +56,6 @@ def create_draft_invoice(access_token, invoice_date, term_type, due_date): url = "https://api-m.sandbox.paypal.com/v2/invoicing/invoices" headers = {"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"} data = { - # "detail": { - # "invoice_number": generate_random_string(8), - # "invoice_date": invoice_date, - # "payment_term": {"term_type": term_type, "due_date": due_date}, - # } "detail": { "invoice_number": generate_random_string(8), "invoice_date": invoice_date, From c197b07a9fdce9c14beb8c4e91db93699014d494 Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Fri, 16 Feb 2024 17:56:50 -0600 Subject: [PATCH 34/36] Update payments_generator.py Edit comments --- .../source-paypal-transaction/bin/payments_generator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py index ab7f51c51ef9..d36987e18cf5 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -15,7 +15,11 @@ # To create a new payment: python script_name.py create # To update an existing product: # python script_name.py update PAYMENT_ID '[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "50.00", "currency": "USD"}}]' +# # NOTE: This is version does not work for CREATE PAYMENT as the HEADER requires data I can't get +# +# Ypu may need to add a security context, but you need the proper set of permissions in your account to be able to send this context +#security_context = '{"actor":{"account_number":"","party_id":"","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dm....Zx9D-Lf4"},"auth_token":"","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"","party_id":"","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' import base64 @@ -83,7 +87,6 @@ def main(): client_id = CREDS.get("client_id") secret_id = CREDS.get("client_secret") token = get_paypal_token(client_id, secret_id) - # security_context = '{"actor":{"account_number":"MDXWPD67GEP5W","party_id":"1659371090107732880","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dmOUZMwuKocrqe72Zx9D-Lf4"},"auth_token":"A015QQVR4S3u79k.UvhQ-AP4EhQikqOogdx-wIbvcvZ7Qaw","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"2245934915437588879","party_id":"2245934915437588879","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' if sys.argv[1] == "create": payment = create_payment(token, security_context) @@ -101,5 +104,3 @@ def main(): if __name__ == "__main__": main() - -#'[{"op": "replace", "path": "/transactions/0/amount", "value": {"total": "25000.00", "currency": "BTC"}}]' From 9b8276d3692ea732b26dea4a2490f1e348b7cd7c Mon Sep 17 00:00:00 2001 From: Jose Gerardo Pineda Date: Fri, 16 Feb 2024 17:58:12 -0600 Subject: [PATCH 35/36] Update paypal_transaction_generator.py Remove dead code --- .../bin/paypal_transaction_generator.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py index b7319f27e6fb..d8067ec1e2bf 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/paypal_transaction_generator.py @@ -178,11 +178,6 @@ def approve_payment(driver, url): cookies_accepted = True except Exception as e: print("Could not find the accept all cookies button, exception:", e) - # cookies = driver.find_element(By.ID, "acceptAllButton") - # if cookies: - # cookies.click() - - # cookies_accepted = True driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") element = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ID, "payment-submit-btn"))) From 85e5080a831f121e80a9ee5ae18455854f8754f4 Mon Sep 17 00:00:00 2001 From: Jose Pineda Date: Fri, 16 Feb 2024 18:14:43 -0600 Subject: [PATCH 36/36] Fix Python format (airbyte-ci) --- .../source-paypal-transaction/bin/payments_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py index d36987e18cf5..6a2f46c3b524 100644 --- a/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py +++ b/airbyte-integrations/connectors/source-paypal-transaction/bin/payments_generator.py @@ -18,8 +18,8 @@ # # NOTE: This is version does not work for CREATE PAYMENT as the HEADER requires data I can't get # -# Ypu may need to add a security context, but you need the proper set of permissions in your account to be able to send this context -#security_context = '{"actor":{"account_number":"","party_id":"","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dm....Zx9D-Lf4"},"auth_token":"","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"","party_id":"","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' +# You may need to add a security context, but you need the proper set of permissions in your account to be able to send this context +# security_context = '{"actor":{"account_number":"","party_id":"","auth_claims":["AUTHORIZATION_CODE"],"auth_state":"ANONYMOUS","client_id":"zf3..4BQ0T9aw-ngFr9dm....Zx9D-Lf4"},"auth_token":"","auth_token_type":"ACCESS_TOKEN","last_validated":1393560555,"scopes":["https://api-m.sandbox.paypal.com/v1/payments/.*","https://api-m.sandbox.paypal.com/v1/vault/credit-card/.*","openid","https://uri.paypal.com/services/payments/futurepayments","https://api-m.sandbox.paypal.com/v1/vault/credit-card","https://api-m.sandbox.paypal.com/v1/payments/.*"],"subjects":[{"subject":{"account_number":"","party_id":"","auth_claims":["PASSWORD"],"auth_state":"LOGGEDIN"}}]}' import base64