Skip to content

Commit

Permalink
🎉Source Stripe: New Stream - Subscription Schedule (airbytehq#23624)
Browse files Browse the repository at this point in the history
* bump connector version

* Source stripe: New Stream Subscription Schedule

* fix: schema fixes, updated docs, updated versionTag

* fix: test

* Update stripe.md

* fix: Add empty stream

* schema fix, version bump, source update

* unwanted line fix

* Resolve comments

* fix schemas

* add expected records and update schema

* 🎉Source Twilio: New Stream Conversation Messages (airbytehq#22875)

* bump connector version

* Source Twilio: New Stream Conversation Messages

* fix: Adding correction to syntax

* fix: schema errors, incremental stream fix

* fix: schema, updated docs, dockerVersion, removed unwanted files

* Update twilio.md

* fix schema, add expected records and update stream

* remove extar empty line

* format files

* fix schema for conversation messages

* fix conversation participants schema

* remove conversation participants from incr ctg

* remove unused logging

* update schema

* Update source_definitions.yaml

* Update jira.md

* Update expected_records.jsonl

* Update twilio.md

* Update twilio.md

* Update twilio.md

* auto-bump connector version

---------

Co-authored-by: marcosmarxm <[email protected]>
Co-authored-by: Marcos Marx <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>

* remove json schema from integration test

* add schema json

* Update jira.md

* Update stripe.md

* Update source_definitions.yaml

* auto-bump connector version

---------

Co-authored-by: marcosmarxm <[email protected]>
Co-authored-by: Marcos Marx <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>
  • Loading branch information
4 people authored Apr 17, 2023
1 parent 3a81c01 commit 6cff29b
Show file tree
Hide file tree
Showing 17 changed files with 329 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24442,7 +24442,7 @@
"sourceDefinitionId": "e094cb9a-26de-4645-8761-65c0c425d1de",
"name": "Stripe",
"dockerRepository": "airbyte/source-stripe",
"dockerImageTag": "3.1.0",
"dockerImageTag": "3.2.0",
"documentationUrl": "https://docs.airbyte.com/integrations/sources/stripe",
"icon": "stripe.svg",
"sourceType": "api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@
- name: Stripe
sourceDefinitionId: e094cb9a-26de-4645-8761-65c0c425d1de
dockerRepository: airbyte/source-stripe
dockerImageTag: 3.1.0
dockerImageTag: 3.2.0
documentationUrl: https://docs.airbyte.com/integrations/sources/stripe
icon: stripe.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15075,7 +15075,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-stripe:3.1.0"
- dockerImage: "airbyte/source-stripe:3.2.0"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/stripe"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-stripe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]


LABEL io.airbyte.version=3.1.0
LABEL io.airbyte.version=3.2.0
LABEL io.airbyte.name=airbyte/source-stripe
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
"stream_descriptor": { "name": "subscriptions" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "created": 10000000000 },
"stream_descriptor": { "name": "subscription_schedule" }
}
},
{
"type": "STREAM",
"stream": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,20 @@
"cursor_field": ["created"],
"primary_key": [["id"]]
},
{
"stream": {
"name": "subscription_schedule",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "overwrite",
"cursor_field": ["created"],
"primary_key": [["id"]]
},
{
"stream": {
"name": "transfers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
"destination_sync_mode": "append",
"cursor_field": ["created"],
"primary_key": [["id"]]
},
{
"stream": {
"name": "subscription_schedule",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "overwrite",
"cursor_field": ["created"],
"primary_key": [["id"]]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@
{"stream": "refunds", "data": {"id": "re_3MVuZyEcXtiJtvvh0A6rSbeJ", "object": "refund", "amount": 200000, "balance_transaction": "txn_3MVuZyEcXtiJtvvh0v0QyAMx", "charge": "ch_3MVuZyEcXtiJtvvh0tiVC7DI", "created": 1675074488, "currency": "usd", "metadata": {}, "payment_intent": "pi_3MVuZyEcXtiJtvvh07Ehi4cx", "reason": "fraudulent", "receipt_number": null, "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null}, "emitted_at": 1677521348001}
{"stream": "subscription_items", "data": {"id": "si_NCgxk9rCSy1tBn", "object": "subscription_item", "billing_thresholds": null, "created": 1674209530, "metadata": {}, "plan": {"id": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "object": "plan", "active": true, "aggregate_usage": null, "amount": 600, "amount_decimal": "600", "billing_scheme": "per_unit", "created": 1674209524, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_NCgx1XP2IFQyKF", "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1674209524, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NCgx1XP2IFQyKF", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tax_behavior": "exclusive", "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 600, "unit_amount_decimal": "600"}, "quantity": 1, "subscription": "sub_1MSHZuEcXtiJtvvhlENV0Lhh", "tax_rates": []}, "emitted_at": 1677521351196}
{"stream": "subscriptions", "data": {"id": "sub_1MSHZuEcXtiJtvvhlENV0Lhh", "object": "subscription", "application": null, "application_fee_percent": null, "automatic_tax": {"enabled": false}, "billing_cycle_anchor": 1674209529, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "cancellation_details": {"comment": null, "feedback": null, "reason": null}, "collection_method": "charge_automatically", "created": 1674209529, "currency": "usd", "current_period_end": 1681985529, "current_period_start": 1679307129, "customer": "cus_LIiHR6omh14Xdg", "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": {"id": "di_1MSHZuEcXtiJtvvh3FMkcwwb", "object": "discount", "checkout_session": null, "coupon": {"id": "iJ6qlwM5", "object": "coupon", "amount_off": null, "created": 1674208993, "currency": null, "duration": "forever", "duration_in_months": null, "livemode": false, "max_redemptions": null, "metadata": {}, "name": "\u0415\u0443\u0456\u0435", "percent_off": 10.0, "redeem_by": null, "times_redeemed": 3, "valid": true}, "customer": "cus_LIiHR6omh14Xdg", "end": null, "invoice": null, "invoice_item": null, "promotion_code": null, "start": 1674209529, "subscription": "sub_1MSHZuEcXtiJtvvhlENV0Lhh"}, "ended_at": null, "items": {"object": "list", "data": [{"id": "si_NCgxk9rCSy1tBn", "object": "subscription_item", "billing_thresholds": null, "created": 1674209530, "metadata": {}, "plan": {"id": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "object": "plan", "active": true, "aggregate_usage": null, "amount": 600, "amount_decimal": "600", "billing_scheme": "per_unit", "created": 1674209524, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_NCgx1XP2IFQyKF", "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "price": {"id": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1674209524, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NCgx1XP2IFQyKF", "recurring": {"aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed"}, "tax_behavior": "exclusive", "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 600, "unit_amount_decimal": "600"}, "quantity": 1, "subscription": "sub_1MSHZuEcXtiJtvvhlENV0Lhh", "tax_rates": []}], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_1MSHZuEcXtiJtvvhlENV0Lhh"}, "latest_invoice": "in_1MnfheEcXtiJtvvh9vdKiRvx", "livemode": false, "metadata": {}, "next_pending_invoice_item_invoice": null, "on_behalf_of": null, "pause_collection": null, "payment_settings": {"payment_method_options": null, "payment_method_types": null, "save_default_payment_method": "off"}, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": {"id": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "object": "plan", "active": true, "aggregate_usage": null, "amount": 600, "amount_decimal": "600", "billing_scheme": "per_unit", "created": 1674209524, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_NCgx1XP2IFQyKF", "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}, "quantity": 1, "schedule": null, "start_date": 1674209529, "status": "active", "test_clock": null, "transfer_data": null, "trial_end": null, "trial_settings": {"end_behavior": {"missing_payment_method": "create_invoice"}}, "trial_start": null}, "emitted_at": 1679394516304}
{"stream": "subscription_schedule", "data": {"id": "sub_sched_1MvgI8EcXtiJtvvh7sfEXZHU", "object": "subscription_schedule", "application": null, "canceled_at": null, "completed_at": null, "created": 1681216040, "current_phase": null, "customer": "cus_Kou8knsO3qQOwU", "default_settings": {"application_fee_percent": null, "automatic_tax": {"enabled": false}, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "default_source": null, "description": null, "invoice_settings": null, "on_behalf_of": null, "transfer_data": null}, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [{"add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "currency": "usd", "default_payment_method": null, "default_tax_rates": [], "description": null, "end_date": 1713440895, "invoice_settings": null, "items": [{"billing_thresholds": null, "metadata": {}, "plan": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "price": "price_1MSHZoEcXtiJtvvh6O8TYD8T", "quantity": 1, "tax_rates": []}], "metadata": {}, "on_behalf_of": null, "proration_behavior": "create_prorations", "start_date": 1681818495, "transfer_data": null, "trial_end": null}], "released_at": null, "released_subscription": null, "renewal_interval": null, "status": "not_started", "subscription": null, "test_clock": null}, "emitted_at": 1681227521921}
Original file line number Diff line number Diff line change
Expand Up @@ -3834,6 +3834,19 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "subscription_schedule",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "overwrite",
"cursor_field": ["created"]
},
{
"stream": {
"name": "refunds",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"invoice_items": { "date": 1594946981 },
"transfers": { "created": 1610995824 },
"subscriptions": { "created": 1599686873 },
"subscription_schedule": { "created": 1678454575 },
"balance_transactions": { "created": 1617067556 },
"payouts": { "created": 1617067556 },
"disputes": { "created": 1610996305 },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": ["null", "object"],
"additionalProperties": true,
"properties": {
"id": {
"type": ["null", "string"]
},
"object": {
"type": ["null", "string"]
},
"application": {
"type": ["null", "string"]
},
"canceled_at": {
"type": ["null", "string"]
},
"completed_at": {
"type": ["null", "string"]
},
"created": {
"type": ["null", "integer"]
},
"current_phase": {
"type": ["null", "string"]
},
"customer": {
"type": ["null", "string"]
},
"default_settings": {
"type": ["null", "object"],
"properties": {
"application_fee_percent": {
"type": ["null", "string"]
},
"automatic_tax": {
"type": ["null", "object"],
"properties": {
"enabled": {
"type": ["null", "boolean"]
}
}
},
"billing_cycle_anchor": {
"type": ["null", "string"]
},
"billing_thresholds": {
"type": ["null", "string"]
},
"collection_method": {
"type": ["null", "string"]
},
"default_payment_method": {
"type": ["null", "string"]
},
"description": {
"type": ["null", "string"]
},
"invoice_settings": {
"type": ["null", "string"]
},
"on_behalf_of": {
"type": ["null", "string"]
},
"transfer_data": {
"type": ["null", "string"]
}
}
},
"end_behavior": {
"type": ["null", "string"]
},
"livemode": {
"type": ["null", "boolean"]
},
"metadata": {
"type": ["null", "object"]
},
"phases": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true,
"properties": {
"add_invoice_items": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true,
"properties": {
"price": {
"type": ["null", "string"]
},
"quantity": {
"type": ["null", "string"]
},
"tax_rates": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true,
"properties": {
"id": {
"type": ["null", "string"]
},
"object": {
"type": ["null", "string"]
},
"active": {
"type": ["null", "boolean"]
},
"country": {
"type": ["null", "string"]
},
"created": {
"type": ["null", "string"],
"format": "datetime"
},
"display_name": {
"type": ["null", "string"]
},
"inclusive": {
"type": ["null", "boolean"]
},
"jurisdiction": {
"type": ["null", "string"]
},
"livemode": {
"type": ["null", "boolean"]
},
"metadata": {
"type": ["null", "object"],
"additionalProperties": true
},
"percentage": {
"type": ["null", "number"]
},
"state": {
"type": ["null", "string"]
},
"tax_type": {
"type": ["null", "string"]
}
}
}
}
}
}
},
"application_fee_percent": {
"type": ["null", "string"]
},
"billing_cycle_anchor": {
"type": ["null", "string"]
},
"billing_thresholds": {
"type": ["null", "string"]
},
"collection_method": {
"type": ["null", "string"]
},
"coupon": {
"type": ["null", "string"]
},
"currency": {
"type": ["null", "string"]
},
"default_payment_method": {
"type": ["null", "string"]
},
"default_tax_rates": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true
}
},
"description": {
"type": ["null", "string"]
},
"end_date": {
"type": ["null", "integer"]
},
"invoice_settings": {
"type": ["null", "string"]
},
"items": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true,
"properties": {
"billing_thresholds": {
"type": ["null", "string"]
},
"metadata": {
"type": ["null", "object"],
"additionalProperties": true
},
"price": {
"type": ["null", "string"]
},
"quantity": {
"type": ["null", "integer"]
},
"tax_rates": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": true
}
}
}
}
},
"metadata": {
"type": ["null", "object"],
"additionalProperties": true
},
"on_behalf_of": {
"type": ["null", "string"]
},
"proration_behavior": {
"type": ["null", "string"]
},
"start_date": {
"type": ["null", "integer"]
},
"transfer_data": {
"type": ["null", "string"]
},
"trial_end": {
"type": ["null", "string"]
}
}
}
},
"released_at": {
"type": ["null", "string"]
},
"released_subscription": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
},
"subscription": {
"type": ["null", "string"]
},
"test_clock": {
"type": ["null", "string"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
Refunds,
SubscriptionItems,
Subscriptions,
SubscriptionSchedule,
Transfers,
)

Expand Down Expand Up @@ -80,6 +81,7 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
Refunds(**incremental_args),
SubscriptionItems(**args),
Subscriptions(**incremental_args),
SubscriptionSchedule(**incremental_args),
Transfers(**incremental_args),
ExternalAccountBankAccounts(**args),
ExternalAccountCards(**args),
Expand Down
Loading

0 comments on commit 6cff29b

Please sign in to comment.