From b16d85e6148a7829da7f138788d9cd71c5e8e33b Mon Sep 17 00:00:00 2001 From: Alexandre Girard Date: Thu, 18 Jan 2024 21:52:21 -0800 Subject: [PATCH] source-stripe: Add missing fields to invoices and subscriptions schemas and improve memory usage when reading from substreams (#34347) --- .../integration_tests/expected_records.jsonl | 10 +++++----- .../connectors/source-stripe/metadata.yaml | 2 +- .../connectors/source-stripe/setup.py | 2 +- .../source_stripe/schemas/invoices.json | 8 ++++++++ .../source_stripe/schemas/subscriptions.json | 6 ++++++ .../source-stripe/source_stripe/streams.py | 14 -------------- docs/integrations/sources/stripe.md | 5 +++-- 7 files changed, 24 insertions(+), 23 deletions(-) diff --git a/airbyte-integrations/connectors/source-stripe/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-stripe/integration_tests/expected_records.jsonl index e5df135b15e69d..d3b48ade375a5e 100644 --- a/airbyte-integrations/connectors/source-stripe/integration_tests/expected_records.jsonl +++ b/airbyte-integrations/connectors/source-stripe/integration_tests/expected_records.jsonl @@ -30,9 +30,9 @@ {"stream": "coupons", "data": {"id": "4SUEGKZg", "object": "coupon", "amount_off": 200, "created": 1674209030, "currency": "usd", "duration": "repeating", "duration_in_months": 3, "livemode": false, "max_redemptions": null, "metadata": {}, "name": "\u0406\u0435\u043a\u0448\u0437\u0443", "percent_off": null, "redeem_by": null, "times_redeemed": 0, "valid": true, "updated": 1674209030}, "emitted_at": 1697627296927} {"stream": "coupons", "data": {"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, "updated": 1674208993}, "emitted_at": 1697627296929} {"stream": "disputes", "data": {"id": "dp_1MSI78EcXtiJtvvhxC77m2kh", "object": "dispute", "amount": 700, "balance_transaction": "txn_1MSI78EcXtiJtvvhAGjxP1UM", "balance_transactions": [{"id": "txn_1MSI78EcXtiJtvvhAGjxP1UM", "object": "balance_transaction", "amount": -700, "available_on": 1674518400, "created": 1674211590, "currency": "usd", "description": "Chargeback withdrawal for ch_3MSI77EcXtiJtvvh1GzoukUC", "exchange_rate": null, "fee": 1500, "fee_details": [{"amount": 1500, "application": null, "currency": "usd", "description": "Dispute fee", "type": "stripe_fee"}], "net": -2200, "reporting_category": "dispute", "source": "dp_1MSI78EcXtiJtvvhxC77m2kh", "status": "available", "type": "adjustment"}], "charge": "ch_3MSI77EcXtiJtvvh1GzoukUC", "created": 1674211590, "currency": "usd", "evidence": {"access_activity_log": null, "billing_address": "12345", "cancellation_policy": null, "cancellation_policy_disclosure": null, "cancellation_rebuttal": null, "customer_communication": null, "customer_email_address": null, "customer_name": null, "customer_purchase_ip": null, "customer_signature": null, "duplicate_charge_documentation": null, "duplicate_charge_explanation": null, "duplicate_charge_id": null, "product_description": null, "receipt": null, "refund_policy": null, "refund_policy_disclosure": null, "refund_refusal_explanation": null, "service_date": null, "service_documentation": null, "shipping_address": null, "shipping_carrier": null, "shipping_date": null, "shipping_documentation": null, "shipping_tracking_number": null, "uncategorized_file": null, "uncategorized_text": null}, "evidence_details": {"due_by": 1675036799.0, "has_evidence": false, "past_due": false, "submission_count": 0}, "is_charge_refundable": false, "livemode": false, "metadata": {}, "payment_intent": "pi_3MSI77EcXtiJtvvh1glmQd8s", "payment_method_details": {"card": {"brand": "visa", "network_reason_code": "83"}, "type": "card"}, "reason": "fraudulent", "status": "lost", "updated": 1674211590}, "emitted_at": 1697627298351} -{"stream": "invoices", "data": {"id": "in_1K9GK0EcXtiJtvvhSo2LvGqT", "object": "invoice", "account_country": "US", "account_name": "Airbyte, Inc.", "account_tax_ids": null, "amount_due": 0, "amount_paid": 0, "amount_remaining": 0, "amount_shipping": 0, "application": null, "application_fee_amount": null, "attempt_count": 0, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": false, "status": null}, "billing_reason": "manual", "charge": null, "collection_method": "send_invoice", "created": 1640123796, "currency": "usd", "custom_fields": null, "customer": "cus_Kou8knsO3qQOwU", "customer_address": null, "customer_email": "edward.gao+stripe-test-customer-1@airbyte.io", "customer_name": "edgao-test-customer-1", "customer_phone": null, "customer_shipping": null, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "discounts": [], "due_date": 1688750070.0, "effective_at": 1686158070, "ending_balance": 0, "footer": null, "from_invoice": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9Lb3U4bk9YR0lWV3BhN2EzMXZNUFJSaEdXUUVNR1J0LDg4MTY4MTAw02007rgJxf1v?s=ap", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9Lb3U4bk9YR0lWV3BhN2EzMXZNUFJSaEdXUUVNR1J0LDg4MTY4MTAw02007rgJxf1v/pdf?s=ap", "last_finalization_error": null, "latest_revision": null, "lines": {"object": "list", "data": [{"id": "il_1K9GKLEcXtiJtvvhhHaYMebN", "object": "line_item", "amount": 8400, "amount_excluding_tax": 8400, "currency": "usd", "description": "a box of parsnips", "discount_amounts": [], "discountable": true, "discounts": [], "invoice_item": "ii_1K9GKLEcXtiJtvvhmr2AYOAx", "livemode": false, "metadata": {}, "period": {"end": 1640123817, "start": 1640123817}, "plan": null, "price": {"id": "price_1K9GKLEcXtiJtvvhXbrg33lq", "object": "price", "active": false, "billing_scheme": "per_unit", "created": 1640123817, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_Kou8cQxtIpF1p7", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 8400, "unit_amount_decimal": "8400"}, "proration": false, "proration_details": {"credited_items": null}, "quantity": 1, "subscription": null, "tax_amounts": [], "tax_rates": [], "type": "invoiceitem", "unit_amount_excluding_tax": "8400"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1K9GK0EcXtiJtvvhSo2LvGqT/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number": "CA35DF83-0001", "on_behalf_of": null, "paid": true, "paid_out_of_band": false, "payment_intent": null, "payment_settings": {"default_mandate": null, "payment_method_options": null, "payment_method_types": null}, "period_end": 1640123795.0, "period_start": 1640123795.0, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 8400, "quote": null, "receipt_number": null, "rendering": null, "rendering_options": null, "shipping_cost": null, "shipping_details": null, "starting_balance": 0, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1686158070, "marked_uncollectible_at": null, "paid_at": 1686158100, "voided_at": null}, "subscription": null, "subscription_details": {"metadata": null}, "subtotal": 8400, "subtotal_excluding_tax": 8400, "tax": null, "test_clock": null, "total": 8400, "total_discount_amounts": [], "total_excluding_tax": 8400, "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": 1640123796.0, "updated": 1640123796}, "emitted_at": 1697627300463} -{"stream": "invoices", "data": {"id": "in_1MX37hEcXtiJtvvhRSl1KbQm", "object": "invoice", "account_country": "US", "account_name": "Airbyte, Inc.", "account_tax_ids": null, "amount_due": 5500, "amount_paid": 5500, "amount_remaining": 0, "amount_shipping": 0, "application": null, "application_fee_amount": null, "attempt_count": 1, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": true, "status": "complete"}, "billing_reason": "manual", "charge": "ch_3MX38QEcXtiJtvvh1y8YAJpg", "collection_method": "send_invoice", "created": 1675345605, "currency": "usd", "custom_fields": null, "customer": "cus_NGoTFiJFVbSsvZ", "customer_address": {"city": "", "country": "US", "line1": "Street 2, 34567", "line2": "", "postal_code": "94114", "state": "CA"}, "customer_email": "user1.sample@zohomail.eu", "customer_name": "Test Customer 2", "customer_phone": null, "customer_shipping": {"address": {"city": "", "country": "US", "line1": "Street 2, 34567", "line2": "", "postal_code": "94114", "state": "CA"}, "name": "Test Customer 2", "phone": ""}, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": "Thanks for your business!", "discount": null, "discounts": [], "due_date": 1677937605.0, "effective_at": 1675345650, "ending_balance": 0, "footer": "Test Invoice", "from_invoice": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNNamM2RTF0TmlLcGFRRVFKeHpPdTgzOFFOVzNDLDg4MTY4MTAw02009wP8HGgl?s=ap", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNNamM2RTF0TmlLcGFRRVFKeHpPdTgzOFFOVzNDLDg4MTY4MTAw02009wP8HGgl/pdf?s=ap", "last_finalization_error": null, "latest_revision": null, "lines": {"object": "list", "data": [{"id": "il_1MX384EcXtiJtvvh3j2K123f", "object": "line_item", "amount": 6000, "amount_excluding_tax": 6000, "currency": "usd", "description": "Test Product 1", "discount_amounts": [{"amount": 500, "discount": "di_1MX384EcXtiJtvvhkOrY57Ep"}], "discountable": true, "discounts": ["di_1MX384EcXtiJtvvhkOrY57Ep"], "invoice_item": "ii_1MX384EcXtiJtvvhguyn3iYb", "livemode": false, "metadata": {}, "period": {"end": 1675345628, "start": 1675345628}, "plan": null, "price": {"id": "price_1MX364EcXtiJtvvhE3WgTl4O", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1675345504, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NHcKselSHfKdfc", "recurring": null, "tax_behavior": "exclusive", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 2000, "unit_amount_decimal": "2000"}, "proration": false, "proration_details": {"credited_items": null}, "quantity": 3, "subscription": null, "tax_amounts": [{"amount": 0, "inclusive": false, "tax_rate": "txr_1MX384EcXtiJtvvhAhVE20Ii", "taxability_reason": "not_collecting", "taxable_amount": 0}], "tax_rates": [], "type": "invoiceitem", "unit_amount_excluding_tax": "2000"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1MX37hEcXtiJtvvhRSl1KbQm/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number": "C09C1837-0002", "on_behalf_of": null, "paid": true, "paid_out_of_band": false, "payment_intent": "pi_3MX38QEcXtiJtvvh10zsQJTC", "payment_settings": {"default_mandate": null, "payment_method_options": null, "payment_method_types": null}, "period_end": 1675345605.0, "period_start": 1675345605.0, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "quote": null, "receipt_number": null, "rendering": null, "rendering_options": null, "shipping_cost": null, "shipping_details": null, "starting_balance": 0, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1675345650, "marked_uncollectible_at": null, "paid_at": 1675345673, "voided_at": null}, "subscription": null, "subscription_details": {"metadata": null}, "subtotal": 5500, "subtotal_excluding_tax": 5500, "tax": 0, "test_clock": null, "total": 5500, "total_discount_amounts": [{"amount": 500, "discount": "di_1MX384EcXtiJtvvhkOrY57Ep"}], "total_excluding_tax": 5500, "total_tax_amounts": [{"amount": 0, "inclusive": false, "tax_rate": "txr_1MX384EcXtiJtvvhAhVE20Ii", "taxability_reason": "not_collecting", "taxable_amount": 0}], "transfer_data": null, "webhooks_delivered_at": 1675345605.0, "updated": 1675345605}, "emitted_at": 1697627300891} -{"stream": "invoices", "data": {"id": "in_1MX2yFEcXtiJtvvhMXhUCgKx", "object": "invoice", "account_country": "US", "account_name": "Airbyte, Inc.", "account_tax_ids": null, "amount_due": 72680, "amount_paid": 72680, "amount_remaining": 0, "amount_shipping": 0, "application": null, "application_fee_amount": null, "attempt_count": 1, "attempted": true, "auto_advance": false, "automatic_tax": {"enabled": true, "status": "complete"}, "billing_reason": "manual", "charge": "ch_3MX2zPEcXtiJtvvh1BUGw8EC", "collection_method": "send_invoice", "created": 1675345019, "currency": "usd", "custom_fields": null, "customer": "cus_NGoTFiJFVbSsvZ", "customer_address": {"city": "", "country": "US", "line1": "Street 2, 34567", "line2": "", "postal_code": "94114", "state": "CA"}, "customer_email": "user1.sample@zohomail.eu", "customer_name": "Test Customer 2", "customer_phone": null, "customer_shipping": {"address": {"city": "", "country": "US", "line1": "Street 2, 34567", "line2": "", "postal_code": "94114", "state": "CA"}, "name": "Test Customer 2", "phone": ""}, "customer_tax_exempt": "none", "customer_tax_ids": [], "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": "Thanks for your business!", "discount": null, "discounts": [], "due_date": 1677937018.0, "effective_at": 1675345090, "ending_balance": 0, "footer": "Test Invoice", "from_invoice": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNDT3BXU2sxR0NJUDNaTTZnbXFINW10NHNiaWhDLDg4MTY4MTAw0200pHPBUPO0?s=ap", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNDT3BXU2sxR0NJUDNaTTZnbXFINW10NHNiaWhDLDg4MTY4MTAw0200pHPBUPO0/pdf?s=ap", "last_finalization_error": null, "latest_revision": null, "lines": {"object": "list", "data": [{"id": "il_1MX2yfEcXtiJtvvhiunY2j1x", "object": "line_item", "amount": 25200, "amount_excluding_tax": 25200, "currency": "usd", "description": "edgao-test-product", "discount_amounts": [{"amount": 2520, "discount": "di_1MX2ysEcXtiJtvvh8ORqRVKm"}], "discountable": true, "discounts": ["di_1MX2ysEcXtiJtvvh8ORqRVKm"], "invoice_item": "ii_1MX2yfEcXtiJtvvhfhyOG7SP", "livemode": false, "metadata": {}, "period": {"end": 1675345045, "start": 1675345045}, "plan": null, "price": {"id": "price_1K9GbqEcXtiJtvvhJ3lZe4i5", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1640124902, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_KouQ5ez86yREmB", "recurring": null, "tax_behavior": "inclusive", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 12600, "unit_amount_decimal": "12600"}, "proration": false, "proration_details": {"credited_items": null}, "quantity": 2, "subscription": null, "tax_amounts": [{"amount": 0, "inclusive": true, "tax_rate": "txr_1MX2yfEcXtiJtvvhVcMEMTRj", "taxability_reason": "not_collecting", "taxable_amount": 0}], "tax_rates": [], "type": "invoiceitem", "unit_amount_excluding_tax": "12600"}], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1MX2yFEcXtiJtvvhMXhUCgKx/lines"}, "livemode": false, "metadata": {}, "next_payment_attempt": null, "number": "C09C1837-0001", "on_behalf_of": null, "paid": true, "paid_out_of_band": false, "payment_intent": "pi_3MX2zPEcXtiJtvvh12VBcp6m", "payment_settings": {"default_mandate": null, "payment_method_options": null, "payment_method_types": null}, "period_end": 1675345018.0, "period_start": 1675345018.0, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "quote": null, "receipt_number": null, "rendering": null, "rendering_options": null, "shipping_cost": null, "shipping_details": null, "starting_balance": 50000, "statement_descriptor": null, "status": "paid", "status_transitions": {"finalized_at": 1675345090, "marked_uncollectible_at": null, "paid_at": 1675345122, "voided_at": null}, "subscription": null, "subscription_details": {"metadata": null}, "subtotal": 22680, "subtotal_excluding_tax": 22680, "tax": 0, "test_clock": null, "total": 22680, "total_discount_amounts": [{"amount": 2520, "discount": "di_1MX2ysEcXtiJtvvh8ORqRVKm"}], "total_excluding_tax": 22680, "total_tax_amounts": [{"amount": 0, "inclusive": true, "tax_rate": "txr_1MX2yfEcXtiJtvvhVcMEMTRj", "taxability_reason": "not_collecting", "taxable_amount": 0}], "transfer_data": null, "webhooks_delivered_at": 1675345019.0, "updated": 1675345019}, "emitted_at": 1697627300895} +{"stream":"invoices","data":{"id":"in_1K9GK0EcXtiJtvvhSo2LvGqT","object":"invoice","account_country":"US","account_name":"Airbyte, Inc.","account_tax_ids":null,"amount_due":0,"amount_paid":0,"amount_remaining":0,"amount_shipping":0,"application":null,"application_fee_amount":null,"attempt_count":0,"attempted":true,"auto_advance":false,"automatic_tax":{"enabled":false,"liability":null,"status":null},"billing_reason":"manual","charge":null,"collection_method":"send_invoice","created":1640123796,"currency":"usd","custom_fields":null,"customer":"cus_Kou8knsO3qQOwU","customer_address":null,"customer_email":"edward.gao+stripe-test-customer-1@airbyte.io","customer_name":"edgao-test-customer-1","customer_phone":null,"customer_shipping":null,"customer_tax_exempt":"none","customer_tax_ids":[],"default_payment_method":null,"default_source":null,"default_tax_rates":[],"description":null,"discount":null,"discounts":[],"due_date":1688750070,"effective_at":1686158070,"ending_balance":0,"footer":null,"from_invoice":null,"hosted_invoice_url":"https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9Lb3U4bk9YR0lWV3BhN2EzMXZNUFJSaEdXUUVNR1J0LDk2MTc3MTMw0200ygIKWRVO?s=ap","invoice_pdf":"https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9Lb3U4bk9YR0lWV3BhN2EzMXZNUFJSaEdXUUVNR1J0LDk2MTc3MTMw0200ygIKWRVO/pdf?s=ap","issuer":{"type":"self"},"last_finalization_error":null,"latest_revision":null,"lines":{"object":"list","data":[{"id":"il_1K9GKLEcXtiJtvvhhHaYMebN","object":"line_item","amount":8400,"amount_excluding_tax":8400,"currency":"usd","description":"a box of parsnips","discount_amounts":[],"discountable":true,"discounts":[],"invoice_item":"ii_1K9GKLEcXtiJtvvhmr2AYOAx","livemode":false,"metadata":{},"period":{"end":1640123817,"start":1640123817},"plan":null,"price":{"id":"price_1K9GKLEcXtiJtvvhXbrg33lq","object":"price","active":false,"billing_scheme":"per_unit","created":1640123817,"currency":"usd","custom_unit_amount":null,"livemode":false,"lookup_key":null,"metadata":{},"nickname":null,"product":"prod_Kou8cQxtIpF1p7","recurring":null,"tax_behavior":"unspecified","tiers_mode":null,"transform_quantity":null,"type":"one_time","unit_amount":8400,"unit_amount_decimal":"8400"},"proration":false,"proration_details":{"credited_items":null},"quantity":1,"subscription":null,"tax_amounts":[],"tax_rates":[],"type":"invoiceitem","unit_amount_excluding_tax":"8400"}],"has_more":false,"total_count":1,"url":"/v1/invoices/in_1K9GK0EcXtiJtvvhSo2LvGqT/lines"},"livemode":false,"metadata":{},"next_payment_attempt":null,"number":"CA35DF83-0001","on_behalf_of":null,"paid":true,"paid_out_of_band":false,"payment_intent":null,"payment_settings":{"default_mandate":null,"payment_method_options":null,"payment_method_types":null},"period_end":1640123795,"period_start":1640123795,"post_payment_credit_notes_amount":0,"pre_payment_credit_notes_amount":8400,"quote":null,"receipt_number":null,"rendering":null,"rendering_options":null,"shipping_cost":null,"shipping_details":null,"starting_balance":0,"statement_descriptor":null,"status":"paid","status_transitions":{"finalized_at":1686158070,"marked_uncollectible_at":null,"paid_at":1686158100,"voided_at":null},"subscription":null,"subscription_details":{"metadata":null},"subtotal":8400,"subtotal_excluding_tax":8400,"tax":null,"test_clock":null,"total":8400,"total_discount_amounts":[],"total_excluding_tax":8400,"total_tax_amounts":[],"transfer_data":null,"webhooks_delivered_at":1640123796,"updated":1640123796},"emitted_at":1705636368179} +{"stream":"invoices","data":{"id":"in_1MX37hEcXtiJtvvhRSl1KbQm","object":"invoice","account_country":"US","account_name":"Airbyte, Inc.","account_tax_ids":null,"amount_due":5500,"amount_paid":5500,"amount_remaining":0,"amount_shipping":0,"application":null,"application_fee_amount":null,"attempt_count":1,"attempted":true,"auto_advance":false,"automatic_tax":{"enabled":true,"liability":{"type":"self"},"status":"complete"},"billing_reason":"manual","charge":"ch_3MX38QEcXtiJtvvh1y8YAJpg","collection_method":"send_invoice","created":1675345605,"currency":"usd","custom_fields":null,"customer":"cus_NGoTFiJFVbSsvZ","customer_address":{"city":"","country":"US","line1":"Street 2, 34567","line2":"","postal_code":"94114","state":"CA"},"customer_email":"user1.sample@zohomail.eu","customer_name":"Test Customer 2","customer_phone":null,"customer_shipping":{"address":{"city":"","country":"US","line1":"Street 2, 34567","line2":"","postal_code":"94114","state":"CA"},"name":"Test Customer 2","phone":""},"customer_tax_exempt":"none","customer_tax_ids":[],"default_payment_method":null,"default_source":null,"default_tax_rates":[],"description":"Thanks for your business!","discount":null,"discounts":[],"due_date":1677937605,"effective_at":1675345650,"ending_balance":0,"footer":"Test Invoice","from_invoice":null,"hosted_invoice_url":"https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNNamM2RTF0TmlLcGFRRVFKeHpPdTgzOFFOVzNDLDk2MTc3MTY20200GeEOAZdh?s=ap","invoice_pdf":"https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNNamM2RTF0TmlLcGFRRVFKeHpPdTgzOFFOVzNDLDk2MTc3MTY20200GeEOAZdh/pdf?s=ap","issuer":{"type":"self"},"last_finalization_error":null,"latest_revision":null,"lines":{"object":"list","data":[{"id":"il_1MX384EcXtiJtvvh3j2K123f","object":"line_item","amount":6000,"amount_excluding_tax":6000,"currency":"usd","description":"Test Product 1","discount_amounts":[{"amount":500,"discount":"di_1MX384EcXtiJtvvhkOrY57Ep"}],"discountable":true,"discounts":["di_1MX384EcXtiJtvvhkOrY57Ep"],"invoice_item":"ii_1MX384EcXtiJtvvhguyn3iYb","livemode":false,"metadata":{},"period":{"end":1675345628,"start":1675345628},"plan":null,"price":{"id":"price_1MX364EcXtiJtvvhE3WgTl4O","object":"price","active":true,"billing_scheme":"per_unit","created":1675345504,"currency":"usd","custom_unit_amount":null,"livemode":false,"lookup_key":null,"metadata":{},"nickname":null,"product":"prod_NHcKselSHfKdfc","recurring":null,"tax_behavior":"exclusive","tiers_mode":null,"transform_quantity":null,"type":"one_time","unit_amount":2000,"unit_amount_decimal":"2000"},"proration":false,"proration_details":{"credited_items":null},"quantity":3,"subscription":null,"tax_amounts":[{"amount":0,"inclusive":false,"tax_rate":"txr_1MX384EcXtiJtvvhAhVE20Ii","taxability_reason":"not_collecting","taxable_amount":0}],"tax_rates":[],"type":"invoiceitem","unit_amount_excluding_tax":"2000"}],"has_more":false,"total_count":1,"url":"/v1/invoices/in_1MX37hEcXtiJtvvhRSl1KbQm/lines"},"livemode":false,"metadata":{},"next_payment_attempt":null,"number":"C09C1837-0002","on_behalf_of":null,"paid":true,"paid_out_of_band":false,"payment_intent":"pi_3MX38QEcXtiJtvvh10zsQJTC","payment_settings":{"default_mandate":null,"payment_method_options":null,"payment_method_types":null},"period_end":1675345605,"period_start":1675345605,"post_payment_credit_notes_amount":0,"pre_payment_credit_notes_amount":0,"quote":null,"receipt_number":null,"rendering":null,"rendering_options":null,"shipping_cost":null,"shipping_details":null,"starting_balance":0,"statement_descriptor":null,"status":"paid","status_transitions":{"finalized_at":1675345650,"marked_uncollectible_at":null,"paid_at":1675345673,"voided_at":null},"subscription":null,"subscription_details":{"metadata":null},"subtotal":5500,"subtotal_excluding_tax":5500,"tax":0,"test_clock":null,"total":5500,"total_discount_amounts":[{"amount":500,"discount":"di_1MX384EcXtiJtvvhkOrY57Ep"}],"total_excluding_tax":5500,"total_tax_amounts":[{"amount":0,"inclusive":false,"tax_rate":"txr_1MX384EcXtiJtvvhAhVE20Ii","taxability_reason":"not_collecting","taxable_amount":0}],"transfer_data":null,"webhooks_delivered_at":1675345605,"updated":1675345605},"emitted_at":1705636368184} +{"stream":"invoices","data":{"id":"in_1MX2yFEcXtiJtvvhMXhUCgKx","object":"invoice","account_country":"US","account_name":"Airbyte, Inc.","account_tax_ids":null,"amount_due":72680,"amount_paid":72680,"amount_remaining":0,"amount_shipping":0,"application":null,"application_fee_amount":null,"attempt_count":1,"attempted":true,"auto_advance":false,"automatic_tax":{"enabled":true,"liability":{"type":"self"},"status":"complete"},"billing_reason":"manual","charge":"ch_3MX2zPEcXtiJtvvh1BUGw8EC","collection_method":"send_invoice","created":1675345019,"currency":"usd","custom_fields":null,"customer":"cus_NGoTFiJFVbSsvZ","customer_address":{"city":"","country":"US","line1":"Street 2, 34567","line2":"","postal_code":"94114","state":"CA"},"customer_email":"user1.sample@zohomail.eu","customer_name":"Test Customer 2","customer_phone":null,"customer_shipping":{"address":{"city":"","country":"US","line1":"Street 2, 34567","line2":"","postal_code":"94114","state":"CA"},"name":"Test Customer 2","phone":""},"customer_tax_exempt":"none","customer_tax_ids":[],"default_payment_method":null,"default_source":null,"default_tax_rates":[],"description":"Thanks for your business!","discount":null,"discounts":[],"due_date":1677937018,"effective_at":1675345090,"ending_balance":0,"footer":"Test Invoice","from_invoice":null,"hosted_invoice_url":"https://invoice.stripe.com/i/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNDT3BXU2sxR0NJUDNaTTZnbXFINW10NHNiaWhDLDk2MTc3MTY20200j28bcP5i?s=ap","invoice_pdf":"https://pay.stripe.com/invoice/acct_1JwnoiEcXtiJtvvh/test_YWNjdF8xSndub2lFY1h0aUp0dnZoLF9OSGNDT3BXU2sxR0NJUDNaTTZnbXFINW10NHNiaWhDLDk2MTc3MTY20200j28bcP5i/pdf?s=ap","issuer":{"type":"self"},"last_finalization_error":null,"latest_revision":null,"lines":{"object":"list","data":[{"id":"il_1MX2yfEcXtiJtvvhiunY2j1x","object":"line_item","amount":25200,"amount_excluding_tax":25200,"currency":"usd","description":"edgao-test-product","discount_amounts":[{"amount":2520,"discount":"di_1MX2ysEcXtiJtvvh8ORqRVKm"}],"discountable":true,"discounts":["di_1MX2ysEcXtiJtvvh8ORqRVKm"],"invoice_item":"ii_1MX2yfEcXtiJtvvhfhyOG7SP","livemode":false,"metadata":{},"period":{"end":1675345045,"start":1675345045},"plan":null,"price":{"id":"price_1K9GbqEcXtiJtvvhJ3lZe4i5","object":"price","active":true,"billing_scheme":"per_unit","created":1640124902,"currency":"usd","custom_unit_amount":null,"livemode":false,"lookup_key":null,"metadata":{},"nickname":null,"product":"prod_KouQ5ez86yREmB","recurring":null,"tax_behavior":"inclusive","tiers_mode":null,"transform_quantity":null,"type":"one_time","unit_amount":12600,"unit_amount_decimal":"12600"},"proration":false,"proration_details":{"credited_items":null},"quantity":2,"subscription":null,"tax_amounts":[{"amount":0,"inclusive":true,"tax_rate":"txr_1MX2yfEcXtiJtvvhVcMEMTRj","taxability_reason":"not_collecting","taxable_amount":0}],"tax_rates":[],"type":"invoiceitem","unit_amount_excluding_tax":"12600"}],"has_more":false,"total_count":1,"url":"/v1/invoices/in_1MX2yFEcXtiJtvvhMXhUCgKx/lines"},"livemode":false,"metadata":{},"next_payment_attempt":null,"number":"C09C1837-0001","on_behalf_of":null,"paid":true,"paid_out_of_band":false,"payment_intent":"pi_3MX2zPEcXtiJtvvh12VBcp6m","payment_settings":{"default_mandate":null,"payment_method_options":null,"payment_method_types":null},"period_end":1675345018,"period_start":1675345018,"post_payment_credit_notes_amount":0,"pre_payment_credit_notes_amount":0,"quote":null,"receipt_number":null,"rendering":null,"rendering_options":null,"shipping_cost":null,"shipping_details":null,"starting_balance":50000,"statement_descriptor":null,"status":"paid","status_transitions":{"finalized_at":1675345090,"marked_uncollectible_at":null,"paid_at":1675345122,"voided_at":null},"subscription":null,"subscription_details":{"metadata":null},"subtotal":22680,"subtotal_excluding_tax":22680,"tax":0,"test_clock":null,"total":22680,"total_discount_amounts":[{"amount":2520,"discount":"di_1MX2ysEcXtiJtvvh8ORqRVKm"}],"total_excluding_tax":22680,"total_tax_amounts":[{"amount":0,"inclusive":true,"tax_rate":"txr_1MX2yfEcXtiJtvvhVcMEMTRj","taxability_reason":"not_collecting","taxable_amount":0}],"transfer_data":null,"webhooks_delivered_at":1675345019,"updated":1675345019},"emitted_at":1705636368184} {"stream": "invoice_items", "data": {"id": "ii_1K9GKLEcXtiJtvvhmr2AYOAx", "object": "invoiceitem", "amount": 8400, "currency": "usd", "customer": "cus_Kou8knsO3qQOwU", "date": 1640123817, "description": "a box of parsnips", "discountable": true, "discounts": [], "invoice": "in_1K9GK0EcXtiJtvvhSo2LvGqT", "livemode": false, "metadata": {}, "period": {"end": 1640123817, "start": 1640123817}, "plan": null, "price": {"id": "price_1K9GKLEcXtiJtvvhXbrg33lq", "object": "price", "active": false, "billing_scheme": "per_unit", "created": 1640123817, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_Kou8cQxtIpF1p7", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 8400, "unit_amount_decimal": "8400"}, "proration": false, "quantity": 1, "subscription": null, "tax_rates": [], "test_clock": null, "unit_amount": 8400, "unit_amount_decimal": "8400", "updated": 1640123817}, "emitted_at": 1697627302138} {"stream": "invoice_items", "data": {"id": "ii_1MX384EcXtiJtvvhguyn3iYb", "object": "invoiceitem", "amount": 6000, "currency": "usd", "customer": "cus_NGoTFiJFVbSsvZ", "date": 1675345628, "description": "Test Product 1", "discountable": true, "discounts": ["di_1MX384EcXtiJtvvhkOrY57Ep"], "invoice": "in_1MX37hEcXtiJtvvhRSl1KbQm", "livemode": false, "metadata": {}, "period": {"end": 1675345628, "start": 1675345628}, "plan": null, "price": {"id": "price_1MX364EcXtiJtvvhE3WgTl4O", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1675345504, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NHcKselSHfKdfc", "recurring": null, "tax_behavior": "exclusive", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 2000, "unit_amount_decimal": "2000"}, "proration": false, "quantity": 3, "subscription": null, "tax_rates": [], "test_clock": null, "unit_amount": 2000, "unit_amount_decimal": "2000", "updated": 1675345628}, "emitted_at": 1697627302391} {"stream": "invoice_items", "data": {"id": "ii_1MX2yfEcXtiJtvvhfhyOG7SP", "object": "invoiceitem", "amount": 25200, "currency": "usd", "customer": "cus_NGoTFiJFVbSsvZ", "date": 1675345045, "description": "edgao-test-product", "discountable": true, "discounts": ["di_1MX2ysEcXtiJtvvh8ORqRVKm"], "invoice": "in_1MX2yFEcXtiJtvvhMXhUCgKx", "livemode": false, "metadata": {}, "period": {"end": 1675345045, "start": 1675345045}, "plan": null, "price": {"id": "price_1K9GbqEcXtiJtvvhJ3lZe4i5", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1640124902, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_KouQ5ez86yREmB", "recurring": null, "tax_behavior": "inclusive", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 12600, "unit_amount_decimal": "12600"}, "proration": false, "quantity": 2, "subscription": null, "tax_rates": [], "test_clock": null, "unit_amount": 12600, "unit_amount_decimal": "12600", "updated": 1675345045}, "emitted_at": 1697627302392} @@ -46,8 +46,8 @@ {"stream": "products", "data": {"id": "prod_KouQ5ez86yREmB", "object": "product", "active": true, "attributes": [], "created": 1640124902, "default_price": "price_1K9GbqEcXtiJtvvhJ3lZe4i5", "description": null, "features": [], "images": [], "livemode": false, "metadata": {}, "name": "edgao-test-product", "package_dimensions": null, "shippable": null, "statement_descriptor": null, "tax_code": "txcd_10000000", "type": "service", "unit_label": null, "updated": 1696839715, "url": null}, "emitted_at": 1697627307635} {"stream": "products", "data": {"id": "prod_NHcKselSHfKdfc", "object": "product", "active": true, "attributes": [], "created": 1675345504, "default_price": "price_1MX364EcXtiJtvvhE3WgTl4O", "description": "Test Product 1 description", "features": [], "images": ["https://files.stripe.com/links/MDB8YWNjdF8xSndub2lFY1h0aUp0dnZofGZsX3Rlc3RfdjBOT09UaHRiNVl2WmJ6clNYRUlmcFFD00cCBRNHnV"], "livemode": false, "metadata": {}, "name": "Test Product 1", "package_dimensions": null, "shippable": null, "statement_descriptor": null, "tax_code": "txcd_10301000", "type": "service", "unit_label": null, "updated": 1696839789, "url": null}, "emitted_at": 1697627307877} {"stream": "products", "data": {"id": "prod_NCgx1XP2IFQyKF", "object": "product", "active": true, "attributes": [], "created": 1674209524, "default_price": null, "description": null, "features": [], "images": [], "livemode": false, "metadata": {}, "name": "tu", "package_dimensions": null, "shippable": null, "statement_descriptor": null, "tax_code": "txcd_10000000", "type": "service", "unit_label": null, "updated": 1696839225, "url": null}, "emitted_at": 1697627307879} -{"stream": "subscriptions", "data": {"id": "sub_1O2Dg0EcXtiJtvvhz7Q4zS0n", "object": "subscription", "application": null, "application_fee_percent": null, "automatic_tax": {"enabled": true}, "billing_cycle_anchor": 1697550676.0, "billing_thresholds": null, "cancel_at": 1705499476.0, "cancel_at_period_end": false, "canceled_at": 1697550676.0, "cancellation_details": {"comment": null, "feedback": null, "reason": "cancellation_requested"}, "collection_method": "charge_automatically", "created": 1697550676, "currency": "usd", "current_period_end": 1705499476.0, "current_period_start": 1702821076, "customer": "cus_NGoTFiJFVbSsvZ", "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "ended_at": null, "items": {"object": "list", "data": [{"id": "si_OptSP2o3XZUBpx", "object": "subscription_item", "billing_thresholds": null, "created": 1697550677, "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_1O2Dg0EcXtiJtvvhz7Q4zS0n", "tax_rates": []}], "has_more": false, "total_count": 1.0, "url": "/v1/subscription_items?subscription=sub_1O2Dg0EcXtiJtvvhz7Q4zS0n"}, "latest_invoice": "in_1OOKkUEcXtiJtvvheUUavyuB", "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": null}, "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": "sub_sched_1O2Dg0EcXtiJtvvh7GtbtIhP", "start_date": 1697550676, "status": "active", "test_clock": null, "transfer_data": null, "trial_end": null, "trial_settings": {"end_behavior": {"missing_payment_method": "create_invoice"}}, "trial_start": null, "updated": 1697550676}, "emitted_at": 1700232971060} -{"stream": "subscription_schedule", "data": {"id": "sub_sched_1O2Dg0EcXtiJtvvh7GtbtIhP", "object": "subscription_schedule", "application": null, "canceled_at": null, "completed_at": null, "created": 1697550676, "current_phase": {"end_date": 1705499476, "start_date": 1697550676}, "customer": "cus_NGoTFiJFVbSsvZ", "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": "Test Test", "invoice_settings": "{'days_until_due': None}", "on_behalf_of": null, "transfer_data": null}, "end_behavior": "cancel", "livemode": false, "metadata": {}, "phases": [{"add_invoice_items": [], "application_fee_percent": null, "automatic_tax": {"enabled": true}, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": "charge_automatically", "coupon": null, "currency": "usd", "default_payment_method": null, "default_tax_rates": [], "description": "Test Test", "end_date": 1705499476, "invoice_settings": "{'days_until_due': None}", "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": 1697550676, "transfer_data": null, "trial_end": null}], "released_at": null, "released_subscription": null, "renewal_interval": null, "status": "active", "subscription": "sub_1O2Dg0EcXtiJtvvhz7Q4zS0n", "test_clock": null, "updated": 1697550676}, "emitted_at": 1697627312079} +{"stream": "subscriptions", "data": {"id": "sub_1O2Dg0EcXtiJtvvhz7Q4zS0n", "object": "subscription", "application": null, "application_fee_percent": null, "automatic_tax": {"enabled": true, "liability": {"type": "self"}}, "billing_cycle_anchor": 1697550676.0, "billing_cycle_anchor_config": null, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": 1697550676.0, "cancellation_details": {"comment": null, "feedback": null, "reason": "cancellation_requested"}, "collection_method": "charge_automatically", "created": 1697550676, "currency": "usd", "current_period_end": 1705499476.0, "current_period_start": 1702821076, "customer": "cus_NGoTFiJFVbSsvZ", "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "ended_at": 1705329724.0, "invoice_settings": {"issuer": {"type": "self"}}, "items": {"object": "list", "data": [{"id": "si_OptSP2o3XZUBpx", "object": "subscription_item", "billing_thresholds": null, "created": 1697550677, "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_1O2Dg0EcXtiJtvvhz7Q4zS0n", "tax_rates": []}], "has_more": false, "total_count": 1.0, "url": "/v1/subscription_items?subscription=sub_1O2Dg0EcXtiJtvvhz7Q4zS0n"}, "latest_invoice": "in_1OOKkUEcXtiJtvvheUUavyuB", "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": null}, "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": "sub_sched_1O2Dg0EcXtiJtvvh7GtbtIhP", "start_date": 1697550676, "status": "canceled", "test_clock": null, "transfer_data": null, "trial_end": null, "trial_settings": {"end_behavior": {"missing_payment_method": "create_invoice"}}, "trial_start": null, "updated": 1697550676}, "emitted_at": 1705636378387} +{"stream":"subscription_schedule","data":{"id":"sub_sched_1O2Dg0EcXtiJtvvh7GtbtIhP","object":"subscription_schedule","application":null,"canceled_at":"1705329724","completed_at":null,"created":1697550676,"current_phase":null,"customer":"cus_NGoTFiJFVbSsvZ","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":"Test Test","invoice_settings":"{'days_until_due': None}","on_behalf_of":null,"transfer_data":null},"end_behavior":"cancel","livemode":false,"metadata":{},"phases":[{"add_invoice_items":[],"application_fee_percent":null,"automatic_tax":{"enabled":true},"billing_cycle_anchor":null,"billing_thresholds":null,"collection_method":"charge_automatically","coupon":null,"currency":"usd","default_payment_method":null,"default_tax_rates":[],"description":"Test Test","end_date":1705499476,"invoice_settings":"{'days_until_due': None}","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":1697550676,"transfer_data":null,"trial_end":null}],"released_at":null,"released_subscription":null,"renewal_interval":null,"status":"canceled","subscription":"sub_1O2Dg0EcXtiJtvvhz7Q4zS0n","test_clock":null,"updated":1697550676},"emitted_at":1705636378620} {"stream": "transfers", "data": {"id": "tr_1NH18zEcXtiJtvvhnd827cNO", "object": "transfer", "amount": 10000, "amount_reversed": 0, "balance_transaction": "txn_1NH190EcXtiJtvvhBO3PeR7p", "created": 1686301085, "currency": "usd", "description": null, "destination": "acct_1Jx8unEYmRTj5on1", "destination_payment": "py_1NH18zEYmRTj5on1GkCCsqLK", "livemode": false, "metadata": {}, "reversals": {"object": "list", "data": [], "has_more": false, "total_count": 0.0, "url": "/v1/transfers/tr_1NH18zEcXtiJtvvhnd827cNO/reversals"}, "reversed": false, "source_transaction": null, "source_type": "card", "transfer_group": null, "updated": 1686301085}, "emitted_at": 1697627313262} {"stream": "transfers", "data": {"id": "tr_1NGoaCEcXtiJtvvhjmHtOGOm", "object": "transfer", "amount": 100, "amount_reversed": 100, "balance_transaction": "txn_1NGoaDEcXtiJtvvhsZrNMsdJ", "created": 1686252800, "currency": "usd", "description": null, "destination": "acct_1Jx8unEYmRTj5on1", "destination_payment": "py_1NGoaCEYmRTj5on1LAlAIG3a", "livemode": false, "metadata": {}, "reversals": {"object": "list", "data": [{"id": "trr_1NGolCEcXtiJtvvhOYPck3CP", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1NGolCEcXtiJtvvhZRy4Kd5S", "created": 1686253482, "currency": "usd", "destination_payment_refund": "pyr_1NGolBEYmRTj5on1STal3rmp", "metadata": {}, "source_refund": null, "transfer": "tr_1NGoaCEcXtiJtvvhjmHtOGOm"}], "has_more": false, "total_count": 1.0, "url": "/v1/transfers/tr_1NGoaCEcXtiJtvvhjmHtOGOm/reversals"}, "reversed": true, "source_transaction": null, "source_type": "card", "transfer_group": "ORDER10", "updated": 1686252800}, "emitted_at": 1697627313264} {"stream": "refunds", "data": {"id": "re_3MVuZyEcXtiJtvvh0A6rSbeJ", "object": "refund", "amount": 200000, "balance_transaction": "txn_3MVuZyEcXtiJtvvh0v0QyAMx", "charge": "ch_3MVuZyEcXtiJtvvh0tiVC7DI", "created": 1675074488, "currency": "usd", "destination_details": {"card": {"reference": "5871771120000631", "reference_status": "available", "reference_type": "acquirer_reference_number", "type": "refund"}, "type": "card"}, "metadata": {}, "payment_intent": "pi_3MVuZyEcXtiJtvvh07Ehi4cx", "reason": "fraudulent", "receipt_number": "3278-5368", "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null}, "emitted_at": 1701882752716} diff --git a/airbyte-integrations/connectors/source-stripe/metadata.yaml b/airbyte-integrations/connectors/source-stripe/metadata.yaml index 1301154967ab63..cfedccfdf01976 100644 --- a/airbyte-integrations/connectors/source-stripe/metadata.yaml +++ b/airbyte-integrations/connectors/source-stripe/metadata.yaml @@ -10,7 +10,7 @@ data: connectorSubtype: api connectorType: source definitionId: e094cb9a-26de-4645-8761-65c0c425d1de - dockerImageTag: 5.1.3 + dockerImageTag: 5.2.0 dockerRepository: airbyte/source-stripe documentationUrl: https://docs.airbyte.com/integrations/sources/stripe githubIssueLabel: source-stripe diff --git a/airbyte-integrations/connectors/source-stripe/setup.py b/airbyte-integrations/connectors/source-stripe/setup.py index 4c78d7e312c08f..b059da570f3212 100644 --- a/airbyte-integrations/connectors/source-stripe/setup.py +++ b/airbyte-integrations/connectors/source-stripe/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup -MAIN_REQUIREMENTS = ["airbyte-cdk==0.57.6", "stripe==2.56.0", "pendulum==2.1.2"] +MAIN_REQUIREMENTS = ["airbyte-cdk==0.58.9", "stripe==2.56.0", "pendulum==2.1.2"] # we set `requests-mock~=1.11.0` to ensure concurrency is supported TEST_REQUIREMENTS = ["pytest-mock~=3.6.1", "pytest~=6.1", "requests-mock~=1.11.0", "requests_mock~=1.8", "freezegun==1.2.2"] diff --git a/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/invoices.json b/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/invoices.json index 6959909cc77f60..c21e5c93fd3efc 100644 --- a/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/invoices.json +++ b/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/invoices.json @@ -530,6 +530,14 @@ } } }, + "issuer": { + "type": ["null", "object"], + "properties": { + "type": { + "type": ["null", "string"] + } + } + }, "latest_revision": { "type": ["null", "string"] }, diff --git a/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/subscriptions.json b/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/subscriptions.json index 1a720f6fd0348a..89f180cd453270 100644 --- a/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/subscriptions.json +++ b/airbyte-integrations/connectors/source-stripe/source_stripe/schemas/subscriptions.json @@ -49,6 +49,12 @@ "billing_cycle_anchor": { "type": ["null", "number"] }, + "billing_cycle_anchor_config": { + "type": ["null", "object"] + }, + "invoice_settings": { + "type": ["null", "object"] + }, "cancel_at_period_end": { "type": ["null", "boolean"] }, diff --git a/airbyte-integrations/connectors/source-stripe/source_stripe/streams.py b/airbyte-integrations/connectors/source-stripe/source_stripe/streams.py index 81ca02264d7d55..d8958d9453b7e7 100644 --- a/airbyte-integrations/connectors/source-stripe/source_stripe/streams.py +++ b/airbyte-integrations/connectors/source-stripe/source_stripe/streams.py @@ -707,20 +707,6 @@ def read_records(self, sync_mode: SyncMode, stream_slice: Optional[Mapping[str, items_next_pages = super().read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice, **kwargs) yield from chain(items, items_next_pages) - def stream_slices( - self, sync_mode: SyncMode, cursor_field: Optional[List[str]] = None, stream_state: Optional[Mapping[str, Any]] = None - ) -> Iterable[Optional[Mapping[str, Any]]]: - parent_stream_slices = self.parent.stream_slices( - sync_mode=SyncMode.full_refresh, cursor_field=cursor_field, stream_state=stream_state - ) - for stream_slice in parent_stream_slices: - parent_records = self.parent.read_records( - sync_mode=SyncMode.full_refresh, cursor_field=cursor_field, stream_slice=stream_slice, stream_state=stream_state - ) - for record in parent_records: - self.logger.info(f"Fetching parent stream slices for stream {self.name}.") - yield {"parent": record} - class IncrementalStripeLazySubStreamSelector(IStreamSelector): def __init__(self, updated_cursor_incremental_stream: UpdatedCursorIncrementalStripeStream, lazy_sub_stream: StripeLazySubStream): diff --git a/docs/integrations/sources/stripe.md b/docs/integrations/sources/stripe.md index 1b3f61baf99f86..484771ec6e9908 100644 --- a/docs/integrations/sources/stripe.md +++ b/docs/integrations/sources/stripe.md @@ -216,9 +216,10 @@ Each record is marked with `is_deleted` flag when the appropriate event happens | Version | Date | Pull Request | Subject | |:--------|:-----------|:-------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 5.2.0 | 2024-01-18 | [34347](https://github.com/airbytehq/airbyte/pull//34347) | Add new fields invoices and subscription streams. Upgrade the CDK for better memory usage. | | 5.1.3 | 2023-12-18 | [33306](https://github.com/airbytehq/airbyte/pull/33306/) | Adding integration tests | -| 5.1.2 | 2024-01-04 | [33414](https://github.com/airbytehq/airbyte/pull/33414) | Prepare for airbyte-lib | -| 5.1.1 | 2024-01-04 | [33926](https://github.com/airbytehq/airbyte/pull/33926/) | Update endpoint for `bank_accounts` stream | +| 5.1.2 | 2024-01-04 | [33414](https://github.com/airbytehq/airbyte/pull/33414) | Prepare for airbyte-lib | +| 5.1.1 | 2024-01-04 | [33926](https://github.com/airbytehq/airbyte/pull/33926/) | Update endpoint for `bank_accounts` stream | | 5.1.0 | 2023-12-11 | [32908](https://github.com/airbytehq/airbyte/pull/32908/) | Read full refresh streams concurrently | | 5.0.2 | 2023-12-01 | [33038](https://github.com/airbytehq/airbyte/pull/33038) | Add stream slice logging for SubStream | | 5.0.1 | 2023-11-17 | [32638](https://github.com/airbytehq/airbyte/pull/32638/) | Availability stretegy: check availability of both endpoints (if applicable) - common API + events API |