Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe - Update Tables #443

Merged
merged 5 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 207 additions & 0 deletions _integration-schemas/stripe/v1/disputes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
---
tap: "stripe"
version: "1"

name: "disputes"
doc-link: "https://stripe.com/docs/api/disputes/object"
singer-schema: "https://github.com/singer-io/tap-stripe/blob/master/tap_stripe/schemas/disputes.json"
description: "This table contains information about customer disputes related to charges on their credit card."

replication-method: "Key-based Incremental"

api-method:
name: "List all disputes"
doc-link: "https://stripe.com/docs/api/disputes/list"

attributes:
- name: "id"
type: "string"
primary-key: true
description: "The dispute ID."
foreign-key-id: "dispute-id"

- name: "created"
type: "date-time"
description: "Time at which the dispute was created. Measured in seconds since the Unix epoch."
replication-key: true

- name: "amount"
type: "integer"
description: "The disputed amount of money."

- name: "balance_transactions"
type: "array"
description: "A list of zero, one, or two balance transactions that show funds withdrawn and reinstated to a Stripe account as a result of the dispute."
subattributes:
- name: "id"
type: "string"
description: "The balance transaction ID."
foreign-key-id: "balance-transaction-id"

- name: "charge"
type: "string"
description: "The ID of the disputed charge."
foreign-key-id: "charge-id"

- name: "currency"
type: "string"
description: "The three-letter ISO currency code of the disputed charge."

- name: "evidence"
type: "object"
description: ""
subattributes:
- name: "access_activity_log"
type: "string"
description: "Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product."
- name: "billing_address"
type: "string"
description: "The billing address provided by the customer."
- name: "cancellation_policy"
type: "string"
description: "The subscription cancellation policy, as shown to the customer."
- name: "cancellation_policy_disclosure"
type: "string"
description: "The explanation of how and when the customer was shown the refund policy prior to purchase."
- name: "cancellation_rebuttal"
type: "string"
description: "The justification for why the customer’s subscription was not canceled."
- name: "customer_communication"
type: "string"
description: "Any communication with the customer that is relevant to your case."
- name: "customer_email_address"
type: "string"
description: "The email address of the customer."
- name: "customer_name"
type: "string"
description: "The name of the customer."
- name: "customer_purchase_ip"
type: "string"
description: "The IP address that the customer used when making the purchase."
- name: "customer_signature"
type: "string"
description: "A relevant document or contract showing the customer’s signature."
- name: "duplicate_charge_documentation"
type: "string"
description: "Documentation for the prior charge that can uniquely identify the charge."
- name: "duplicate_charge_explanation"
type: "string"
description: "The explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate."
- name: "duplicate_charge_id"
type: "string"
description: "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge."
- name: "product_description"
type: "string"
description: "The description of the product or service that was sold."
- name: "receipt"
type: "string"
description: "The receipt or message sent to the customer notifying them of the charge."
- name: "refund_policy"
type: "string"
description: "The refund policy, as shown to the customer."
- name: "refund_policy_disclosure"
type: "string"
description: "Documentation demonstrating that the customer was shown your refund policy prior to purchase."
- name: "refund_refusal_explanation"
type: "string"
description: "The justification for why the customer is not entitled to a refund."
- name: "service_date"
type: "string"
description: "The date on which the customer received or began receiving the purchased service."
- name: "service_documentation"
type: "string"
description: "Documentation showing proof that a service was provided to the customer."
- name: "shipping_address"
type: "string"
description: "The address to which a physical product was shipped."
- name: "shipping_carrier"
type: "string"
description: "The delivery service that shipped a physical product, such as `Fedex`, `UPS`, `USPS`, etc."
- name: "shipping_date"
type: "string"
description: "The date on which a physical product began its route to the shipping address."
- name: "shipping_documentation"
type: "string"
description: "Documentation showing proof that a product was shipped to the customer at the same address the customer provided."
- name: "shipping_tracking_number"
type: "string"
description: "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated, these will be comma-delineated."
- name: "uncategorized_file"
type: "string"
description: "Any additional evidence or statements."
- name: "uncategorized_text"
type: "string"
description: "Any additional evidence or statements."

- name: "evidence_details"
type: "object"
description: "Information about the evidence submitted."
subattributes:
- name: "due_by"
type: "date-time"
description: "The date by which evidence must be submitted in order to successfully challenge dispute."
- name: "has_evidence"
type: "boolean"
description: "Whether or not evidence has been staged for the dispute."
- name: "past_due"
type: "boolean"
description: "Whether the last evidence submission was submitted past the due date."
- name: "submission_count"
type: "integer"
description: "The number of times evidence has been submitted."

- name: "is_charge_refundable"
type: "boolean"
description: "Whether or not the disputed charge is refundable."

- name: "livemode"
type: "boolean"
description: "Has the value `TRUE` if the object exists in live mode or the value `FALSE` if the object exists in test mode."

- name: "metadata"
type: "object"
description: "A set of key-value pairs that you can attach to an object."
subattributes:

- name: "object"
type: "string"
description: "The object type. In this table, the value is `dispute`."

- name: "reason"
type: "string"
description: |
The reason given by the cardholder for the dispute. Possible values are:

- `bank_cannot_process`
- `check_returned`
- `credit_not_processed`
- `customer_initiated`
- `debit_not_authorized`
- `duplicate`
- `fraudulent`
- `general`
- `incorrect_account_details`
- `insufficient_funds`
- `product_not_received`
- `product_unacceptable`
- `subscription_canceled`
- `unrecognized`

- name: "status"
type: "string"
description: |
The current status of the dispute. Possible values are:

- `warning_needs_response`
- `warning_under_review`
- `warning_closed`
- `needs_response`
- `under_review`
- `charge_refunded`
- `won`
- `lost`

- name: "updated"
type: "date-time"
description: "The time at which the dispute was last updated."
---
31 changes: 25 additions & 6 deletions _integration-schemas/stripe/v1/foreign-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ foreign-keys:
- table: "transfers"
- table: "transfers"
join-on: "failure_balance_transaction"
- table: "disputes"
join-on: "balance_transactions.id"

# We don't get this table now,
# but maybe we will at some point
Expand Down Expand Up @@ -52,7 +54,7 @@ foreign-keys:
join-on: "id"
- table: "customers"
subtable: "cards"
join-on: "id"
join-on: "id"

- id: "charge-id"
table: "charges"
Expand All @@ -61,6 +63,8 @@ foreign-keys:
- table: "charges"
join-on: "id"
- table: "invoices"
- table: "disputes"
join-on: "charge-id"

- id: "coupon-id"
table: "coupons"
Expand Down Expand Up @@ -91,7 +95,7 @@ foreign-keys:
- table: "customers"
join-on: "id"
- table: "customers"
subtable: "cards"
subattribute: "cards"
- table: "customers"
subattribute: "discount__coupon"
- table: "invoice_items"
Expand Down Expand Up @@ -132,9 +136,8 @@ foreign-keys:
all-foreign-keys:
- table: "invoice_line_items"
join-on: "id"

- table: "invoices"
subtable: "lines"
subattribute: "lines"
join-on: "value"

- id: "plan-id"
Expand Down Expand Up @@ -168,7 +171,9 @@ foreign-keys:
attribute: "payout"
all-foreign-keys:
- table: "payouts"
join-on: "id"
join-on: "id"
- table: "payout_transactions"
join-on: "payout_id"

- id: "product-id"
table: "products"
Expand Down Expand Up @@ -203,7 +208,7 @@ foreign-keys:
attribute: "subscription"
all-foreign-keys:
- table: "customers"
subtable: "subscriptions"
subattribute: "subscriptions"
join-on: "id"
- table: "customers"
subattribute: "discount__coupon"
Expand All @@ -224,4 +229,18 @@ foreign-keys:
join-on: "source_transfer"
- table: "transfers"
join-on: "id"

- id: "dispute-id"
table: "disputes"
attribute: "id"
all-foreign-keys:
- table: "disputes"
join-on: "id"

- id: "payout-transaction-id"
table: "payout_transactions"
attribute: "id"
all-foreign-keys:
- table: "payout_transactions"
join-on: "id"
---
13 changes: 7 additions & 6 deletions _integration-schemas/stripe/v1/invoice_line_items.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ api-method:
doc-link: "https://stripe.com/docs/api/invoices/invoice_lines"

attributes:
- name: "invoice"
type: "string"
primary-key: true
description: "The ID of the invoice that contains this line item."
foreign-key-id: "invoice-id"

- name: "id"
type: "string"
primary-key: true
description: "The invoice line item ID."
foreign-key-id: "invoice-line-item-id"

- name: "created"
type: "date-time"
replication-key: true
Expand All @@ -51,11 +57,6 @@ attributes:
type: "boolean"
description: "Indicates whether discounts can apply to this line item."

- name: "invoice"
type: "string"
description: "The ID of the invoice that contains this line item."
foreign-key-id: "invoice-id"

- name: "invoice_item"
type: "string"
description: "The invoice item(s) associated with this invoice line item."
Expand Down
27 changes: 27 additions & 0 deletions _integration-schemas/stripe/v1/payout_transactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
tap: "stripe"
version: "1"

name: "payout_transactions"
doc-link: "https://stripe.com/docs/api/payouts"
singer-schema: "https://github.com/singer-io/tap-stripe/blob/master/tap_stripe/schemas/payout_transactions.json"
description: "This table contains info about payout transactions."

replication-method: "Full Table"

api-method:
name: "List all payouts"
doc-link: "https://stripe.com/docs/api/payouts/list"

attributes:
- name: "id"
type: "string"
primary-key: true
description: "The payout transaction ID."
# foreign-key-id: "payout-transaction-id"

- name: "payout_id"
type: "string"
description: "The payout ID."
foreign-key-id: "payout-id"
---
2 changes: 1 addition & 1 deletion _integration-schemas/stripe/v1/payouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ attributes:
type: "string"
primary-key: true
description: "The payout ID."
#foreign-key-id: "payout-id"
foreign-key-id: "payout-id"

- name: "created"
type: "date-time"
Expand Down
18 changes: 15 additions & 3 deletions _integration-schemas/stripe/v1/plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,21 @@ attributes:
type: "array"
description: "The pricing tiers associated with the plan."
subattributes:
- name: "value"
type: "integer"
description: "The pricing tier."
- name: "items"
type: "object"
description: "Details about the pricing tier associated with the plan."
subattributes:
- name: "flat_amount"
type: "integer"
description: "The price for the entire tier."

- name: "unit_amount"
type: "integer"
description: "The per unit price for units relevant to the tier."

- name: "up_to"
type: "integer"
description: "Up to and including to this quantity will be included in the tier."

- name: "tiers_mode"
type: "string"
Expand Down
Loading